Send a survey to a customer(s). The selection type must be one of: tags, saved-searches, or phone_numbers .
Body
-
must be one of: tags, saved-searches, or phone_numbers
-
one of the below values is required, more than one selection will return an error.
-
Only for CAST surveys, this is the UUID for the department (group) you want to associate the survey with.
-
Only for CAST surveys, this is the UUID for the agent (user) you want to associate the survey with.
POST
/api/survey/{uuid}/send.json
curl \
--request POST 'https://application.textline.com/api/survey/{uuid}/send.json' \
--header "Content-Type: application/json" \
--data '{
"selection_type": "tags",
"recipients": {
"saved_search_uuid": "44db893e-cf20-4279-96c7-60abb8a43b61",
"tag": "VIP",
"phone_numbers": [
"3058675309",
"4158675309"
]
},
"target_group_uuid": "6e4e0798-926d-4e10-92d4-252eb5e63ada",
"target_user_uuid": "722a0019-3ff6-4028-b0c1-24d6e2f57d16"
}'
Request example
{
"selection_type": "tags",
"recipients": {
"saved_search_uuid": "44db893e-cf20-4279-96c7-60abb8a43b61",
"tag": "VIP",
"phone_numbers": [
"3058675309",
"4158675309"
]
},
"target_group_uuid": "6e4e0798-926d-4e10-92d4-252eb5e63ada",
"target_user_uuid": "722a0019-3ff6-4028-b0c1-24d6e2f57d16"
}
Response examples (200)
{
"msg": "X survey queued for delivery"
}