Skip to Content
My App
Api

Message

Send a single message on ANY connected channel — WhatsApp (default), Facebook Messenger, Instagram or Telegram — by setting `channel` and `to` (phone / PSID / IGSID / chat_id). Text, media (image / video / document / audio) or a location pin; a file can be attached directly as a multipart `media` field or referenced by a public URL. Then read a message's delivery status or your history. Note: Facebook, Instagram and Telegram only accept a business-initiated message inside the platform's reply window (the customer must have messaged you first).

GET
/messages

Authorization

http
headerAuthorizationBearer <token>

Response Body

application/json
  1. response
data*array<string>
meta*
Example Request
curl -X GET 'https://aexrux.com/api/v1/messages'
Example Response200
{  "data": [    "string"  ],  "meta": {    "count": 0  }}
POST
/messages

Authorization

http
headerAuthorizationBearer <token>

Request Body

multipart/form-data
  1. body

Send a single WhatsApp message. Scramble reads these rules to document the request body. Supports text, media (by URL) and location; template/bulk sends use the /templates + /broadcasts endpoints.

channel?|

Channel to send on. Defaults to WhatsApp (the workspace's connected engine). Other channels reply into an existing thread on that channel — the recipient must have messaged the connected Page / account / bot first (platform 24h window rules apply). whatsapp — WhatsApp (Unofficial / WABA / Twilio; engine picked by device_id) facebook — Facebook Messenger (to = PSID) instagram — Instagram DM (to = IGSID) telegram — Telegram (to = chat_id)

Value in"whatsapp""whatsapp_unofficial""facebook""instagram""telegram"
connection_id?|

Which connection to send FROM on non-WhatsApp channels (optional — defaults to the workspace's connected Page / account / bot). Accepts the connection's numeric id or its native id (page_id / ig_user_id).

Lengthlength <= 64
to*string

Recipient. WhatsApp: phone in international format (E.164). Facebook: PSID. Instagram: IGSID. Telegram: chat_id. Required.

Lengthlength <= 64
device_id?|

Sending sender (optional — defaults to the workspace's primary). Accepts a Baileys device id (57), a WABA/Twilio provider-config id ("cfg_20" or a bare 20), or an "engine:id" key — resolved across both the devices + wa_provider_configs tables. String, not int, so the "cfg_20" form from /api/v1/devices is accepted.

Lengthlength <= 40
type?|

Message type. Defaults to "text".

Value in"text""image""video""document""audio""location"
text?|

Text body (required for text; used as caption for media).

Lengthlength <= 4096
media?|

Image / video / document / audio sends — EITHER way: media — attach the file directly (multipart upload, max 16 MB), OR media_url — a public URL we download for you. No need to host the file first; just send media in the same call.

Formatbinary
Lengthlength <= 16384
media_url?|
Formaturi
Lengthlength <= 2048
latitude?|

Location (when type=location).

Range-90 <= value <= 90
longitude?|
Range-180 <= value <= 180

Response Body

response?stringapplication/json
Example Request
curl -X POST 'https://aexrux.com/api/v1/messages' \  -F 'to=string'
Example Response
"string"
GET
/messages/{id}

Authorization

http
headerAuthorizationBearer <token>

Path Parameters

id*integer

Response Body

application/json
  1. response
data*
meta*string
Example Request
curl -X GET 'https://aexrux.com/api/v1/messages/0'
Example Response
{  "data": {    "id": 0,    "direction": "string",    "from": "string",    "to": "string",    "type": "string",    "body": "string",    "media_url": "string",    "status": "string",    "created_at": "string"  },  "meta": "string"}