Messages
Log, sending, media, and usage.
Send body, statuses, and errors match the session API documentation. Here instance_id is sent with the account key.
Message log
GET /messages?page=1&per_page=25&status=&instance=&type=&to= scope: messages.read
Sending
POST /messages
scope: messages.send
{
"instance_id": "ins_…",
"type": "text",
"to": "9665xxxxxxxx",
"text": "…"
}
POST /messages/batch
scope: messages.send One message
GET /messages/{message_id} messages.read
POST /messages/{message_id}/cancel messages.cancel
POST /messages/{message_id}/unknown-decision messages.unknown Media
POST /media
scope: media.upload
multipart: file + instance_id
GET /media/{media_id}?instance_id=ins_…
scope: media.download Upload sends file together with instance_id. Download requires instance_id in the query.
Usage
GET /usage scope: usage.read GET /usage?instance_id=ins_…
Without instance_id the account queue is counted. With instance_id that session's queue is counted. Subscription status is returned in both cases.