API reference

Contacts

Directory, Excel (.xlsx) import, CSV export, WhatsApp registration checks, tags, and contact groups for campaign audiences.

Creating or importing a contact with a connected session can store WhatsApp registration status. Groups live under /api/contact-groups and can be selected as campaign audiences.

List hygiene

Include country codes. Deduplicate on import. Use POST /api/contacts/{id}/whatsapp-check or bulk check before campaigns. Opt-in should reflect consent for outreach in your region.

GET/api/contacts

List contacts

Paginated list of contacts.

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

Auth: JWT Bearer

Headers

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

Query parameters

  • page — Page number
  • search — Search by name or phone

Code examples

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

Response example200

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

Try in Swagger UI

POST/api/contacts

Create contact

Add a single contact.

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

Auth: JWT Bearer

Headers

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

Request example

{
  "phone": "919876543210",
  "name": "John Smith",
  "email": "john@example.com",
  "optIn": true
}

Code examples

curl -X POST "https://api.actiwapi.com/api/contacts" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer {accessToken}"
  -d '{  "phone": "919876543210",  "name": "John Smith",  "email": "john@example.com",  "optIn": true}'

Response example201

{ "success": true, "data": { "id": "uuid", "phone": "919876543210" } }

Try in Swagger UI

POST/api/contacts/import

Import contacts (Excel)

Bulk import contacts from an Excel .xlsx file. Format the Phone column as Text so large numbers are preserved.

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

Auth: JWT Bearer

Headers

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

Request example

Form field: file (.xlsx with phone, name columns)

Code examples

curl -X POST "https://api.actiwapi.com/api/contacts/import" \
  -H "Content-Type: multipart/form-data" \
  -H "Authorization: Bearer {accessToken}"
  -d 'Form field: file (.xlsx with phone, name columns)'

Response example200

{ "success": true, "data": { "created": 48, "updated": 2, "skipped": 0 } }

Try in Swagger UI

GET/api/contacts/export

Export contacts (CSV)

Download all contacts as CSV.

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

Auth: JWT Bearer

Headers

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

Code examples

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

Response example200

(CSV file download)

Try in Swagger UI

POST/api/contacts/{id}/whatsapp-check

Check contact on WhatsApp

Re-check WhatsApp registration for one saved contact.

URL: https://api.actiwapi.com/api/contacts/{id}/whatsapp-check

Auth: JWT Bearer

Headers

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

Path parameters

  • id — Contact UUID

Code examples

curl -X POST "https://api.actiwapi.com/api/contacts/{id}/whatsapp-check" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer {accessToken}"

Response example200

{ "success": true, "data": { "id": "uuid", "whatsappRegistered": true } }

Try in Swagger UI

POST/api/contacts/whatsapp-check/bulk

Bulk WhatsApp check

Re-check many saved contacts.

URL: https://api.actiwapi.com/api/contacts/whatsapp-check/bulk

Auth: JWT Bearer

Headers

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

Request example

{ "contactIds": ["uuid-1", "uuid-2"] }

Code examples

curl -X POST "https://api.actiwapi.com/api/contacts/whatsapp-check/bulk" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer {accessToken}"
  -d '{ "contactIds": ["uuid-1", "uuid-2"] }'

Response example200

{ "success": true, "data": { "checked": 2 } }

Try in Swagger UI

GET/api/contacts/tags

List tags

Distinct tags used on contacts.

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

Auth: JWT Bearer

Headers

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

Code examples

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

Response example200

{ "success": true, "data": ["vip", "lead"] }

Try in Swagger UI

GET/api/contact-groups

List contact groups

Groups you can use as campaign audiences.

URL: https://api.actiwapi.com/api/contact-groups

Auth: JWT Bearer

Headers

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

Code examples

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

Response example200

{ "success": true, "data": [{ "id": "uuid", "name": "Newsletter" }] }

Try in Swagger UI

POST/api/contact-groups

Create contact group

Create an empty group, then add members.

URL: https://api.actiwapi.com/api/contact-groups

Auth: JWT Bearer

Headers

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

Request example

{ "name": "Newsletter", "description": "Monthly updates" }

Code examples

curl -X POST "https://api.actiwapi.com/api/contact-groups" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer {accessToken}"
  -d '{ "name": "Newsletter", "description": "Monthly updates" }'

Response example201

{ "success": true, "data": { "id": "uuid", "name": "Newsletter" } }

Try in Swagger UI

POST/api/contact-groups/{id}/contacts

Add group members

Attach existing contacts to a group.

URL: https://api.actiwapi.com/api/contact-groups/{id}/contacts

Auth: JWT Bearer

Headers

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

Path parameters

  • id — Group UUID

Request example

{ "contactIds": ["uuid-1", "uuid-2"] }

Code examples

curl -X POST "https://api.actiwapi.com/api/contact-groups/{id}/contacts" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer {accessToken}"
  -d '{ "contactIds": ["uuid-1", "uuid-2"] }'

Response example200

{ "success": true, "data": { "added": 2 } }

Try in Swagger UI

GET/api/external/contacts

List contacts (API key)

List contacts via API key.

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

Auth: API Key

Headers

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

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" }] }

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.