Skip to main content
POST
/
devices
/
{id}
/
messages
/
media
send media message
curl --request POST \
  --url https://api.chatlevel.io/v1/devices/{id}/messages/media \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "to": "[email protected]",
  "toNumber": "31620292537",
  "mediaUrl": "<string>",
  "mediaBase64": "<string>",
  "mediaCaption": "<string>"
}
'
{
  "status": "success",
  "messageId": "3EB0C1F0B2F0A1D5E8F4"
}

Authorizations

Authorization
string
header
required

API key authentication. Provide your API key as: Authorization: Bearer <api_key>

Path Parameters

id
integer
required

Device ID Numeric device identifier

Body

application/json
to
string
required

Full WhatsApp JID. Use for LIDs (e.g., '138087493537914@lid'), groups (e.g., '[email protected]'), or full phone JIDs (e.g., '[email protected]'). Mutually exclusive with toNumber.

toNumber
string

WhatsApp phone number (digits only, 8-15 digits). Will be formatted as [email protected]. Mutually exclusive with 'to'.

Example:

"31620292537"

mediaUrl
string

URL of the media file

mediaBase64
string

Base64 encoded media content

mediaCaption
string

Optional caption for the media

Response

Media message sent successfully

status
string
Example:

"success"

messageId
string