Upload Media
Upload a media file to the WhatsApp media library. The uploaded media can then be used in messages by referencing its id.
Supported file types and size limits:
| Type | Formats | Max Size |
|---|---|---|
| Image | PNG, JPG, JPEG | 5 MB |
| Video | MP4 | 16 MB |
| Audio | OGG, MP3, M4A, WEBM | 16 MB |
| Document | 100 MB |
Authorization
ApiKeyAuth API key from your dashboard (Settings > API Keys)
In: header
Request Body
multipart/form-data
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://loading/api/v1/media/upload" \ -F file="string"{
"success": true,
"data": {
"id": "clx9media123abc",
"media_id": "clx9media123abc",
"name": "product-photo.jpg",
"mime_type": "image/png",
"size": 245760
}
}{
"success": false,
"message": "to field is required"
}{
"success": false,
"message": "user not authenticated"
}{
"success": false,
"message": "internal server error"
}Send Bulk Message POST
Send the same message to multiple recipients (max 50). The message body follows the same structure as single message operations — specify the `message_type` and its required fields. Recipients are deduplicated automatically. Empty phone numbers are ignored.
Assign agents to a customer PATCH
Idempotently adds one or more agents to a customer's assignments. Agents already on the customer are returned under `already_assigned` and not re-inserted. The `customer` field accepts either the customer's internal id (cuid2) or its public identifier. If you pass an identifier that exists across multiple WABAs in your tenant, also pass `wabaId` to disambiguate — otherwise the call returns `400 ambiguous_customer`.


