Files
The Files API allows third-party clients to upload media files to be used in messages (like images, documents, or audio) using an approved API key.
Base URL for these endpoints: {{baseUrl}}/api/third-party/files
Environments
We currently provide two environments for our API. Please replace {{baseUrl}} in the examples below with the appropriate URL:
- Development:
https://api.dev.dash.amili.asia - Production:
https://api.dash.amili.asia
Authentication Required: All endpoints in this section require an active API key passed in the
x-api-keyheader.
Upload Media
Upload a media file (e.g., an image) to get an originalMediaId which you can then use to send media messages. This endpoint requires the send:image scope.
Endpoint
POST /api/third-party/files/upload
Request Body
This endpoint accepts multipart/form-data. You must provide the file under the file field.
Response
The response will contain details about the uploaded media, importantly including the originalMediaId.
{
"id": "file_uuid",
"originalMediaId": "whatsapp_original_media_id",
"uploadedUrl": "https://url_to_uploaded_file",
"type": "image"
}Example
curl -X POST {{baseUrl}}/api/third-party/files/upload \
-H "x-api-key: your_api_key_here" \
-F "file=@/path/to/your/image.jpg"