API reference

External API

Server-to-server WhatsApp integration. Authenticate with X-API-Key. These routes are the only public integration surface for API keys — they do not accept JWT.

Create a key in API Keys, then call /api/external. Successful sends return HTTP 202 with the queued message. Phone numbers must include the country code (digits only or leading +).

Authentication and limits

Pass the full key in the X-API-Key header. Missing, revoked, or wrong-scope keys return 401 or 403. Each call is counted against your plan’s API request quota and is visible in API key analytics.

  • sessions:read — GET /api/external/sessions
  • messages:send — POST send-text, send, send-image
  • messages:read — GET /api/external/messages/{id}
  • contacts:read — GET /api/external/contacts
  • numbers:check — POST /api/external/number-check and /bulk

POST /api/external/messages/send is an alias of send-text. The body field is phone (not to).

GET/api/external/sessions

List sessions

WhatsApp sessions the key may use for sending.

URL: https://api.actiwapi.com/api/external/sessions

Auth: API Key

Headers

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

Code examples

curl -X GET "https://api.actiwapi.com/api/external/sessions" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: {apiKey}"

Response example200

{
  "success": true,
  "data": [{ "id": "uuid", "name": "Sales Line 1", "status": "connected", "phoneNumber": "919876543210" }]
}

Try in Swagger UI

POST/api/external/messages/send-text

Send text

Queue a WhatsApp text message. Requires messages:send.

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", "direction": "outbound" } }

Try in Swagger UI

POST/api/external/messages/send

Send text (alias)

Same as send-text. Kept for older clients.

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

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" \
  -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

POST/api/external/messages/send-image

Send image

Send an image by public mediaUrl (JSON). Requires messages:send.

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

Auth: API Key

Headers

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

Request example

{
  "sessionId": "uuid",
  "phone": "919876543210",
  "mediaUrl": "https://cdn.example.com/offer.jpg",
  "caption": "This week’s offer"
}

Code examples

curl -X POST "https://api.actiwapi.com/api/external/messages/send-image" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: {apiKey}"
  -d '{  "sessionId": "uuid",  "phone": "919876543210",  "mediaUrl": "https://cdn.example.com/offer.jpg",  "caption": "This week’s offer"}'

Response example202

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

Try in Swagger UI

GET/api/external/messages/{id}

Get message status

Delivery state for a message you queued. Requires messages:read.

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

Auth: API Key

Headers

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

Path parameters

  • id — Message UUID

Code examples

curl -X GET "https://api.actiwapi.com/api/external/messages/{id}" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: {apiKey}"

Response example200

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

Try in Swagger UI

GET/api/external/contacts

List contacts

Workspace contacts. Requires contacts:read.

URL: https://api.actiwapi.com/api/external/contacts

Auth: API Key

Headers

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

Query parameters

  • page — Page number
  • limit — Items per page
  • search — Name, phone, or email

Code examples

curl -X GET "https://api.actiwapi.com/api/external/contacts" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: {apiKey}"

Response example200

{
  "success": true,
  "data": [{ "id": "uuid", "phone": "919876543210", "name": "John Smith" }],
  "pagination": { "page": 1, "limit": 20, "total": 142 }
}

Try in Swagger UI

POST/api/external/number-check

Check one number

WhatsApp registration lookup. Requires numbers:check and a connected session.

URL: https://api.actiwapi.com/api/external/number-check

Auth: API Key

Headers

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

Request example

{
  "sessionId": "uuid",
  "phone": "+919876543210"
}

Code examples

curl -X POST "https://api.actiwapi.com/api/external/number-check" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: {apiKey}"
  -d '{  "sessionId": "uuid",  "phone": "+919876543210"}'

Response example200

{
  "success": true,
  "data": {
    "sessionId": "uuid",
    "result": { "phone": "919876543210", "exists": true, "whatsappRegistered": true }
  }
}

Try in Swagger UI

POST/api/external/number-check/bulk

Bulk check numbers

Up to 500 numbers per request. Use phones[] or multiline text.

URL: https://api.actiwapi.com/api/external/number-check/bulk

Auth: API Key

Headers

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

Request example

{
  "sessionId": "uuid",
  "phones": ["+14155552671", "+919876543210"]
}

Code examples

curl -X POST "https://api.actiwapi.com/api/external/number-check/bulk" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: {apiKey}"
  -d '{  "sessionId": "uuid",  "phones": ["+14155552671", "+919876543210"]}'

Response example200

{
  "success": true,
  "data": {
    "summary": { "total": 2, "registered": 1, "notRegistered": 1, "invalid": 0 },
    "results": [],
    "invalid": []
  }
}

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.