Media
Upload and retrieve binary media files (images, documents, audio, video) for use in rich message content types such as RCS or WhatsApp.
Uploads a binary media file (image, document, audio, or video) and returns a mediaId that can be referenced in rich message content fields such as ImageContent.mediaId, DocumentContent.mediaId, etc.
HTTP Basic Authentication. Encode username:password in Base64 and pass as:
Authorization: Basic <base64_encoded_credentials>
Use your eCall account credentials or a dedicated API sub-user created in the eCall portal (Interfaces → Overview).
The file to upload.
File uploaded successfully.
Result of a successful media upload.
Unique identifier of the uploaded media file. Use this in message content.
a3f1c890-bb22-4c1d-a7e3-d3f1a2b4c567The request is invalid. This may be caused by a missing required parameter,
an invalid value, or a constraint violation. Check the errorCode and
errorDetails in the response body for specifics.
The Authorization header is missing or the credentials are invalid.
Verify your username, password, and Base64 encoding.
An unexpected error occurred on the eCall server. Retry after a short delay.
If the problem persists, contact eCall support and include the x-f24-request-id
header value from the response.
POST /api/v2/media HTTP/1.1
Host: rest.ecall.ch
Authorization: Basic username:password
Content-Type: multipart/form-data
Accept: */*
Content-Length: 17
{
"file": "binary"
}{
"mediaId": "a3f1c890-bb22-4c1d-a7e3-d3f1a2b4c567"
}Downloads a previously uploaded media file by its mediaId.
HTTP Basic Authentication. Encode username:password in Base64 and pass as:
Authorization: Basic <base64_encoded_credentials>
Use your eCall account credentials or a dedicated API sub-user created in the eCall portal (Interfaces → Overview).
Unique identifier of the media file, as returned by the upload endpoint.
Media file returned as binary.
The request is invalid. This may be caused by a missing required parameter,
an invalid value, or a constraint violation. Check the errorCode and
errorDetails in the response body for specifics.
The Authorization header is missing or the credentials are invalid.
Verify your username, password, and Base64 encoding.
The requested resource (message ID, media ID, etc.) was not found.
An unexpected error occurred on the eCall server. Retry after a short delay.
If the problem persists, contact eCall support and include the x-f24-request-id
header value from the response.
GET /api/v2/media/{mediaId} HTTP/1.1
Host: rest.ecall.ch
Authorization: Basic username:password
Accept: */*
binaryLast updated
Was this helpful?
