MCP is live.Set upAsk the community
OmniDimension
WhatsApp

Upload media

Upload an image or a document, then send it by its media_id on sendWhatsappMessage. Uploading costs nothing; only the send is charged. The media_id works for 24 hours and only for the number and type it was uploaded for.

Set up WhatsApp first. Connect a WhatsApp number in the dashboard or with Connect numbers. Included on every paid plan. See plans.

POST/whatsapp/media
No parameters needed for POST /whatsapp/media. Press Run.
curl -X POST 'https://backend.omnidim.io/api/v1/whatsapp/media' \
  -H 'Authorization: Bearer YOUR_API_KEY'
Example response
synthetic
{
  "media_id": "string",
  "type": "image",
  "mime": "string",
  "filename": "string",
  "size": 0,
  "expires_at": "string"
}

Authorization

BearerAuth
headerAuthorizationBearer <token>

Bearer token authentication. Obtain your API key from the OmniDimension dashboard.

Request Body

multipart/form-data
phone_number_id*integer

The number that will send the file.

type*string
Value in"image""document"
file*file

The file to upload.

Formatbinary

Response body

application/json

Response Body

The uploaded file.

application/json

An uploaded file, ready to send by its media_id.

media_id?string
type?string
Value in"image""document"
mime?string
filename?string
size?integer
expires_at?string

When the media_id stops working. It lasts 24 hours.