Contacts API

Manage your contact directory, import/export CSV, and organize groups.

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

  • pagePage number
  • searchSearch 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 (CSV)

Bulk import contacts from a CSV file.

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 (CSV 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 (CSV with phone, name columns)'

Response example200

{ "success": true, "data": { "imported": 48, "skipped": 2 } }

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

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_INACTIVETrial expired or subscription not active.
403LIMIT_EXCEEDEDPlan limit reached (sessions, messages, API requests, etc.).
404NOT_FOUNDResource does not exist or is not in your tenant.
409CONFLICTDuplicate resource or invalid state transition.
429RATE_LIMITEDToo many requests; retry after backoff.
500INTERNAL_ERRORUnexpected server error.
502WHATSAPP_UNAVAILABLEWhatsApp session disconnected or provider error.

← Back to Getting Started