Skip to content

Create Survey

POST /api/surveys

Create and start a voice survey campaign to collect responses from multiple phone numbers. The survey uses a published template with interactive questions that recipients can respond to using their phone keypad.

Parameter Type Required Description
request_id string Yes Unique request identifier (16-64 chars) to prevent duplicate requests. Use UUID or random string.
template_name string Yes Name of your published survey template. Template must be in “published” status.
sender string Yes Your active caller sender number (must be assigned to your account and active).
phone_numbers array Yes Array of Bangladeshi phone numbers (01XXXXXXXXX format, max 999 numbers). No duplicates allowed.
metadata object No Custom data to associate with the survey. Will be returned in results and webhook payload.
webhook_url string No URL to receive webhook notification when survey completes.
Terminal window
curl -X POST https://api.awajdigital.com/api/surveys \
-H "Authorization: Bearer your_api_token_here" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"request_id": "unique_survey_request_123",
"template_name": "customer_satisfaction_survey",
"sender": "8801234567890",
"phone_numbers": ["019XXXXXXXX", "018XXXXXXXX", "017XXXXXXXX"],
"metadata": { "campaign_id": "summer2025", "customer_segment": "premium" },
"webhook_url": "https://your-domain.com/webhook"
}'
{
"success": true,
"survey": {
"id": 456,
"name": "api_survey_1_customer_satisfaction_survey_3",
"status": "ready",
"totalCount": 3,
"createdAt": "2025-12-30T10:00:00.000Z",
"metadata": { "campaign_id": "summer2025", "customer_segment": "premium" }
}
}