curl -X POST https://api.{cluster}.{platform}.voiger.io/v1/admin/surveys \
-H "Cookie: sid=$VOIGER_SESSION" \
-H "x-workspace-code: your-workspace-code" \
-H "x-csrf-token: $CSRF_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"survey": {
"name": "Post-Call Support Survey",
"status": "active",
"config": {
"repeat_key": "*",
"termination_key": "#",
"timeout": 8,
"max_attempts": 1
},
"messages": {
"invalid": {
"mode": "tts",
"tts": {
"text": "Sorry, that was not a valid choice.",
"language": "en"
}
},
"repeat": {
"mode": "tts",
"tts": {
"text": "Press star to repeat this question.",
"language": "en"
}
},
"thank_you": {
"mode": "tts",
"tts": {
"text": "Thank you for your feedback.",
"language": "en"
}
},
"timeout": {
"mode": "audio",
"audio": {
"id": "8a8c0f4e-1234-4abc-9de0-001122334455"
}
}
},
"outbound_enabled": true,
"questions": [
{
"sequence": 1,
"title": "Overall experience",
"type": "csat",
"mode": "tts",
"tts": {
"text": "Rate your experience from 1 to 5.",
"language": "en"
},
"opt_for_agent_performance": true
},
{
"sequence": 2,
"title": "Issue resolved?",
"type": "binary",
"mode": "audio",
"audio": {
"id": "8a8c0f4e-1234-4abc-9de0-001122334455"
}
},
{
"sequence": 3,
"title": "Recommendation",
"type": "custom",
"mode": "tts",
"tts": {
"text": "Rate from 1 to 10.",
"language": "en"
},
"scale_min": 1,
"scale_max": 10,
"classification": [
{
"label": "Poor",
"from": 1,
"to": 4,
"sentiment": "negative"
},
{
"label": "Average",
"from": 5,
"to": 7,
"sentiment": "neutral"
},
{
"label": "Excellent",
"from": 8,
"to": 10,
"sentiment": "positive"
}
]
},
{
"sequence": 4,
"title": "Anything we could improve?",
"type": "voice",
"mode": "tts",
"tts": {
"text": "Tell us what we could improve. Record after the beep.",
"language": "en"
}
}
]
}
}'
const res = await fetch("https://api.{cluster}.{platform}.voiger.io/v1/admin/surveys", {
method: "POST",
credentials: "include",
headers: { "x-workspace-code": "your-workspace-code" },
headers: { "Content-Type": "application/json", "x-csrf-token": csrf },
body: JSON.stringify({
"survey": {
"name": "Post-Call Support Survey",
"status": "active",
"config": {
"repeat_key": "*",
"termination_key": "#",
"timeout": 8,
"max_attempts": 1
},
"messages": {
"invalid": {
"mode": "tts",
"tts": {
"text": "Sorry, that was not a valid choice.",
"language": "en"
}
},
"repeat": {
"mode": "tts",
"tts": {
"text": "Press star to repeat this question.",
"language": "en"
}
},
"thank_you": {
"mode": "tts",
"tts": {
"text": "Thank you for your feedback.",
"language": "en"
}
},
"timeout": {
"mode": "audio",
"audio": {
"id": "8a8c0f4e-1234-4abc-9de0-001122334455"
}
}
},
"outbound_enabled": true,
"questions": [
{
"sequence": 1,
"title": "Overall experience",
"type": "csat",
"mode": "tts",
"tts": {
"text": "Rate your experience from 1 to 5.",
"language": "en"
},
"opt_for_agent_performance": true
},
{
"sequence": 2,
"title": "Issue resolved?",
"type": "binary",
"mode": "audio",
"audio": {
"id": "8a8c0f4e-1234-4abc-9de0-001122334455"
}
},
{
"sequence": 3,
"title": "Recommendation",
"type": "custom",
"mode": "tts",
"tts": {
"text": "Rate from 1 to 10.",
"language": "en"
},
"scale_min": 1,
"scale_max": 10,
"classification": [
{
"label": "Poor",
"from": 1,
"to": 4,
"sentiment": "negative"
},
{
"label": "Average",
"from": 5,
"to": 7,
"sentiment": "neutral"
},
{
"label": "Excellent",
"from": 8,
"to": 10,
"sentiment": "positive"
}
]
},
{
"sequence": 4,
"title": "Anything we could improve?",
"type": "voice",
"mode": "tts",
"tts": {
"text": "Tell us what we could improve. Record after the beep.",
"language": "en"
}
}
]
}
}),
})
const data = await res.json()
json · 201
{
"survey": {
"id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"name": "Post-Call Support Survey",
"status": "active",
"config": {
"repeat_key": "*",
"termination_key": "#",
"timeout": 8,
"max_attempts": 1
},
"messages": {
"invalid": {
"mode": "tts",
"tts": {
"text": "Sorry, that was not a valid choice.",
"language": "en"
}
},
"repeat": {
"mode": "tts",
"tts": {
"text": "Press star to repeat this question.",
"language": "en"
}
},
"thank_you": {
"mode": "tts",
"tts": {
"text": "Thank you for your feedback.",
"language": "en"
}
},
"timeout": {
"mode": "audio",
"audio": {
"id": "8a8c0f4e-1234-4abc-9de0-001122334455"
}
}
},
"outbound_enabled": true,
"questions": [
{
"id": "11111111-1111-1111-1111-111111111111",
"sequence": 1,
"title": "Overall experience",
"type": "csat",
"mode": "tts",
"tts": {
"text": "Rate your experience from 1 to 5.",
"language": "en"
},
"scale_min": 1,
"scale_max": 5,
"classification": null,
"opt_for_agent_performance": true
},
{
"id": "22222222-2222-2222-2222-222222222222",
"sequence": 2,
"title": "Issue resolved?",
"type": "binary",
"mode": "audio",
"audio": {
"id": "8a8c0f4e-1234-4abc-9de0-001122334455"
},
"scale_min": 0,
"scale_max": 1,
"classification": null,
"opt_for_agent_performance": false
},
{
"id": "33333333-3333-3333-3333-333333333333",
"sequence": 3,
"title": "Recommendation",
"type": "custom",
"mode": "tts",
"tts": {
"text": "Rate from 1 to 10.",
"language": "en"
},
"scale_min": 1,
"scale_max": 10,
"classification": [
{
"label": "Poor",
"from": 1,
"to": 4,
"sentiment": "negative"
},
{
"label": "Average",
"from": 5,
"to": 7,
"sentiment": "neutral"
},
{
"label": "Excellent",
"from": 8,
"to": 10,
"sentiment": "positive"
}
],
"opt_for_agent_performance": false
},
{
"id": "44444444-4444-4444-4444-444444444444",
"sequence": 4,
"title": "Anything we could improve?",
"type": "voice",
"mode": "tts",
"tts": {
"text": "Tell us what we could improve. Record after the beep.",
"language": "en"
},
"scale_min": null,
"scale_max": null,
"classification": null,
"opt_for_agent_performance": false
}
],
"created_at": "2026-05-06T10:12:34.000000Z",
"updated_at": "2026-05-06T10:12:34.000000Z"
}
}