Send surveys with API collector
After you create an API distribution channel for a survey in the app (Survey management → Collect → API), use the endpoint below to submit a recipient list. The channel must be active, and message templates plus schedule must be configured in the portal.
1. API endpoint
Replace {collector_uuid} with the Collector ID from the Details screen (Collect → API → Details → Collector ID).
POST https://api-cxm.akwad.sa/api/v1/collectors/api/{collector_uuid}2. Headers
Content-Type: application/jsonX-External-Access-Token: {your_token}3. Request body
{
"medium": "sms",
"recipients": [
{
"email": "john1@example.com",
"phone": "+966501234567",
"first_name": "John",
"last_name": "Doe",
"variables": {
"request_number": "REQ-88421"
}
},
{
"phone": "+966509876543"
}
]
}TIP
medium must be sms, email, or whatsapp. Each recipient must include the contact field for that medium: email when medium is email; phone when medium is sms or whatsapp. The other contact field, first_name, last_name, and variables (context variables) are optional. Empty optional fields are accepted; invalid optional values reject that recipient.
Field reference
See Request body fields for the full table and limits.
For HTTP status codes and JSON response examples, see Send responses.