media_id. Pass that media_id instead of a media_url in Messages and AI Outbound content. Oliver hosts the file, so your messages don’t depend on your own image hosting staying up.
Files belong to your API account, not to a practice: upload a reminder image once and use it at every practice you send for. X-Client-Id is optional on the media endpoints. Files never expire.
How it works
- Upload: POST the file to
/media, or send aurlfor Oliver to copy once. Store themedia_idit returns. - Send: put
"media_id": "<media_id>"wherever you’d putmedia_url: on acard, on each card of acarousel, or onmediacontent. - Replace (optional): PUT a new file to
/media/{id}. Themedia_idstays the same, and sends after the replace use the new file.
Upload a file
The upload ismultipart/form-data, unlike the other endpoints, which take JSON.
Response (201)
Or copy one you already host
Send a card with it
media_id or media_url on a card, not both. A media_id that doesn’t exist, or belongs to another API account, returns 400 naming the field:
Files
Oliver reads the type from the file itself, not from its name or the upload’s
Content-Type. An unsupported or oversized file returns 400 saying what was found, for example file is image/heic; accepted types are jpeg, png, gif or mp4. Convert iPhone HEIC photos and WebP images to jpeg or png first.
Replacing a file
A replace gives the file a newurl; the media_id doesn’t change.
- Messages sent after the replace show the new file.
- Messages already sent keep the old one.
- An AI Outbound request keeps the image it had when Oliver accepted it, even if its first text goes out after the replace.
Idempotency
Setreference_id to a name you choose, unique within your API account, such as rabies-reminder. Uploading again with the same reference_id returns the existing file with 200 instead of storing a copy, even if you send a different file, so a retry after a timeout is safe. To change the file, replace it. The media endpoints also accept the reference_id in place of the media_id in their URLs, e.g. GET /media/rabies-reminder. Sends need the media_id.
Listing
GET /media lists your files, newest first, 50 a page by default (per_page up to 100; page starts at 0).
