Export surveys via API
Generate personalized survey links for a list of recipients in one request. Unlike Send surveys via API, export returns hashed links immediately in the response (no SMS, email, or WhatsApp delivery).
Before you start
- Get your external access token from Profile.
- Copy the Collector ID from the API collector Details screen (Collect → API → Details).
- Ensure the API collector is active and the survey is published.
1. API endpoint
Replace {collector_uuid} with the Collector ID from the Details screen.
Endpoint
POST https://api-cxm.akwad.sa/api/v1/collectors/api/{collector_uuid}/export2. Headers
Content-Type
Content-Type: application/jsonAuthorization
X-External-Access-Token: {your_token}3. Request body
JSON
{
"recipients": [
{
"email": "john1@example.com",
"phone": "+966501234567",
"first_name": "John",
"last_name": "Doe",
"variables": {
"request_number": "REQ-88421"
}
},
{
"email": "jane2@example.com",
"phone": "+966509876543",
"first_name": null,
"last_name": null
}
]
}TIP
first_name, last_name, and variables (context variables) are optional. Each recipient must include a valid email and phone. There is no medium field for export.
4. Response
Example success payload (product contract):
JSON
{
"success": true,
"message": "Export completed.",
"data": {
"accepted_count": 1,
"rejected_count": 1,
"recipients": [
{
"email": "john1@example.com",
"phone": "+966501234567",
"first_name": "John",
"last_name": "Doe",
"survey_link": "https://cxm.akwad.sa/w/9mtmcor2?h=x_jW87z6qzw",
"status": "accepted"
},
{
"email": "jane2@example.com",
"phone": "+966509876543",
"first_name": null,
"last_name": null,
"survey_link": null,
"status": "rejected",
"error": "Recipient already has an active invite."
}
]
}
}INFO
Each accepted recipient receives a unique hashed survey link in survey_link. Use those URLs in your own systems; the API does not send messages on your behalf.
Field reference
- Export request fields - request body table
- Export responses - HTTP status codes and JSON examples (including email/phone conflicts)