Skip to main content
POST
Start a meal photo upload

Authorizations

Authorization
string
header
default:Bearer sandbox_any_token_works
required

A 15-minute token bound to one patient and one enrollment, issued by POST /v1/oauth/token with the token-exchange grant. Treat it as opaque. When it expires, exchange a fresh assertion; there is no refresh token.

Headers

Idempotency-Key
string
required

A unique key per logical request, for example a UUID. Retrying with the same key and the same body within 24 hours returns the first response (with Idempotent-Replayed: true) instead of creating a duplicate. The same key with a different body is refused with 422 idempotency_key_reused.

Required string length: 8 - 255

Body

application/json
content_type
enum<string>
required
Available options:
image/jpeg,
image/png,
image/heic
Example:

"image/jpeg"

content_length
integer
required

Bytes, at most 10 MB.

Required range: 1 <= x <= 10485760
Example:

1843200

Response

Upload ready.

upload_id
string<uuid>
required
Example:

"8e2c4a60-1f3b-4d5e-9a7c-0b2d4f6a8c1e"

upload_url
string<uri>
required

Pre-signed URL. Upload the bytes with method and headers before expires_at.

Example:

"https://uploads.example.com/meal-photos/8e2c4a60?signature=example"

method
string
required
Allowed value: "PUT"
headers
object
required

Headers to send with the upload, exactly as given.

Example:
expires_at
string<date-time>
required

ISO 8601 in UTC.

Example:

"2026-10-26T14:05:00Z"