Webhooks API

Subscribe to real-time events delivered to your HTTPS endpoints.

GET/api/webhooks/events

List event types

Public list of webhook event types you can subscribe to.

URL: https://api.actiwapi.com/api/webhooks/events

Auth: None

Code examples

curl -X GET "https://api.actiwapi.com/api/webhooks/events" \
  -H "Content-Type: application/json"

Response example200

{
  "success": true,
  "data": [
    "message.received",
    "message.sent",
    "session.connected",
    "session.disconnected",
    "campaign.completed"
  ]
}

Try in Swagger UI

GET/api/webhooks

List webhooks

List configured webhook endpoints.

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

Auth: JWT Bearer

Headers

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

Code examples

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

Response example200

{
  "success": true,
  "data": [{
    "id": "uuid",
    "url": "https://api.yourapp.com/webhooks/actiwapi",
    "events": ["message.received"],
    "isActive": true
  }]
}

Try in Swagger UI

POST/api/webhooks

Create webhook

Register a new webhook subscription.

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

Auth: JWT Bearer

Headers

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

Request example

{
  "url": "https://api.yourapp.com/webhooks/actiwapi",
  "events": ["message.received", "session.disconnected"],
  "secret": "your-signing-secret"
}

Code examples

curl -X POST "https://api.actiwapi.com/api/webhooks" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer {accessToken}"
  -d '{  "url": "https://api.yourapp.com/webhooks/actiwapi",  "events": ["message.received", "session.disconnected"],  "secret": "your-signing-secret"}'

Response example201

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

Try in Swagger UI

GET/api/webhooks/{id}/history

Delivery history

View delivery attempts and HTTP response codes.

URL: https://api.actiwapi.com/api/webhooks/{id}/history

Auth: JWT Bearer

Headers

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

Path parameters

  • idWebhook UUID

Code examples

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

Response example200

{
  "success": true,
  "data": [{
    "event": "message.received",
    "statusCode": 200,
    "deliveredAt": "2026-05-30T10:00:00.000Z"
  }]
}

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