API reference

Messages

Queue outbound WhatsApp text, image, document, and audio. Track delivery with GET /api/messages/{id}. Successful queues return HTTP 202.

JWT sends use `https://api.actiwapi.com/api/messages`. API keys use `https://api.actiwapi.com/api/external/messages/*`. The phone field is required (country code, 8–15 digits). Optional contactId can substitute when the contact already exists.

Phone numbers and pacing

Always include the country code (for example 919876543210 or +919876543210). ActiWAPI serializes outbound traffic per session, applies minimum gaps, and humanizes delays so bursts look less like a bot.

  • Text: JSON { sessionId, phone, text }
  • Image / document / audio: multipart file or mediaUrl / mediaPath
  • Inbox replies use /api/chats/{threadId}/send instead of these routes

Daily message caps and monthly API request limits are on your plan. 403 LIMIT_EXCEEDED means you need an upgrade or add-on.

POST/api/messages/send-text

Send text message

Queue a text message through a connected WhatsApp session.

URL: https://api.actiwapi.com/api/messages/send-text

Auth: JWT Bearer

Headers

HeaderValueRequired
AuthorizationBearer {accessToken}Yes
Content-Typeapplication/jsonYes*

Request example

{
  "sessionId": "uuid",
  "phone": "919876543210",
  "text": "Hello from ActiWAPI!"
}

Code examples

curl -X POST "https://api.actiwapi.com/api/messages/send-text" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer {accessToken}"
  -d '{  "sessionId": "uuid",  "phone": "919876543210",  "text": "Hello from ActiWAPI!"}'

Response example202

{
  "success": true,
  "data": {
    "id": "uuid",
    "status": "queued",
    "direction": "outbound"
  }
}

Try in Swagger UI

POST/api/messages/send-image

Send image

Send an image with optional caption. Use multipart/form-data.

URL: https://api.actiwapi.com/api/messages/send-image

Auth: JWT Bearer

Headers

HeaderValueRequired
AuthorizationBearer {accessToken}Yes
Content-Typeapplication/jsonIf JSON

Request example

Form fields:
  sessionId: uuid
  phone: 919876543210
  caption: Optional caption
  file: (binary image)

Code examples

curl -X POST "https://api.actiwapi.com/api/messages/send-image" \
  -H "Content-Type: multipart/form-data" \
  -H "Authorization: Bearer {accessToken}"
  -d 'Form fields:  sessionId: uuid  phone: 919876543210  caption: Optional caption  file: (binary image)'

Response example202

{ "success": true, "data": { "id": "uuid", "status": "queued" } }

Try in Swagger UI

POST/api/messages/send-document

Send document

Send a PDF or other file. Multipart file, mediaUrl, or mediaPath.

URL: https://api.actiwapi.com/api/messages/send-document

Auth: JWT Bearer

Headers

HeaderValueRequired
AuthorizationBearer {accessToken}Yes
Content-Typeapplication/jsonIf JSON

Request example

Form fields:
  sessionId: uuid
  phone: 919876543210
  file: (binary)
  caption: optional

Code examples

curl -X POST "https://api.actiwapi.com/api/messages/send-document" \
  -H "Content-Type: multipart/form-data" \
  -H "Authorization: Bearer {accessToken}"
  -d 'Form fields:  sessionId: uuid  phone: 919876543210  file: (binary)  caption: optional'

Response example202

{ "success": true, "data": { "id": "uuid", "status": "queued" } }

Try in Swagger UI

POST/api/messages/send-audio

Send audio

Send audio or a voice note (ptt=true by default on some clients).

URL: https://api.actiwapi.com/api/messages/send-audio

Auth: JWT Bearer

Headers

HeaderValueRequired
AuthorizationBearer {accessToken}Yes
Content-Typeapplication/jsonIf JSON

Request example

Form fields:
  sessionId: uuid
  phone: 919876543210
  file: (binary audio)

Code examples

curl -X POST "https://api.actiwapi.com/api/messages/send-audio" \
  -H "Content-Type: multipart/form-data" \
  -H "Authorization: Bearer {accessToken}"
  -d 'Form fields:  sessionId: uuid  phone: 919876543210  file: (binary audio)'

Response example202

{ "success": true, "data": { "id": "uuid", "status": "queued" } }

Try in Swagger UI

GET/api/messages/{id}

Get message status

Retrieve delivery status for a sent message.

URL: https://api.actiwapi.com/api/messages/{id}

Auth: JWT Bearer

Headers

HeaderValueRequired
AuthorizationBearer {accessToken}Yes
Content-Typeapplication/jsonYes*

Path parameters

  • id — Message UUID

Code examples

curl -X GET "https://api.actiwapi.com/api/messages/{id}" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer {accessToken}"

Response example200

{
  "success": true,
  "data": {
    "id": "uuid",
    "status": "delivered",
    "direction": "outbound",
    "remoteJid": "919876543210@s.whatsapp.net"
  }
}

Try in Swagger UI

POST/api/external/messages/send-text

Send text (API key)

Send a text message using your API key.

URL: https://api.actiwapi.com/api/external/messages/send-text

Auth: API Key

Headers

HeaderValueRequired
X-API-Key{apiKey}Yes
Content-Typeapplication/jsonYes*

Request example

{
  "sessionId": "uuid",
  "phone": "919876543210",
  "text": "Hello from ActiWAPI!"
}

Code examples

curl -X POST "https://api.actiwapi.com/api/external/messages/send-text" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: {apiKey}"
  -d '{  "sessionId": "uuid",  "phone": "919876543210",  "text": "Hello from ActiWAPI!"}'

Response example202

{ "success": true, "data": { "id": "uuid", "status": "queued" } }

Try in Swagger UI

Error codes

Failed requests return a JSON envelope with success: false and a human-readable message.

{
  "success": false,
  "message": "Validation failed",
  "errors": {
    "phone": "Valid phone number is required"
  }
}
HTTPCodeDescription
400VALIDATION_ERRORRequest body or query failed validation.
401UNAUTHORIZEDMissing or invalid JWT / API key.
403FORBIDDENAuthenticated but lacking permission or entitlement.
403SUBSCRIPTION_INACTIVEAction not allowed on the current plan (including Free after trial). Upgrade or wait for entitlements.
403LIMIT_EXCEEDEDPlan limit reached (sessions, messages, API requests, etc.).
404NOT_FOUNDResource does not exist or is not in your account.
409CONFLICTDuplicate resource or invalid state transition.
429RATE_LIMITEDToo many requests; retry after backoff.
500INTERNAL_ERRORUnexpected server error.
502WHATSAPP_UNAVAILABLEWhatsApp session disconnected or provider error.