curl --request POST \
--url https://campaign-orchestration.treble.ai/v2/send-campaign/{poll_id} \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"users": [
{
"cellphone": "3051234567",
"country_code": "+57",
"user_session_keys": [
{
"key": "name",
"value": "John"
},
{
"key": "TransID",
"value": "12345"
},
{
"key": "schoolname",
"value": "Redschool"
}
]
}
]
}
'{
"message": "The campaign was queued",
"id": "1251072",
"batch_id": "acaab9ea-8754-4d6a-98b1-ace451c7d930",
"launch_request_id": "59d7ef01-4518-444f-816e-1c45c1748974",
"status_url": "/v2/send-campaign/59d7ef01-4518-444f-816e-1c45c1748974"
}{
"detail": "poll_id is required, either in the URL or the body"
}{
"detail": "Invalid API key"
}{
"detail": "There is no poll for this company"
}Send a campaign (recommended)
This is the recommended way to deploy a conversation to a list of users, replacing the legacy /deployment/api/poll/{poll_id} endpoint (deprecated, turns off November 15, 2026). The request body is unchanged: only the URL is different.
The campaign is queued immediately and processed asynchronously — this endpoint returns 202 Accepted right away, before users have actually been messaged. Poll the status_url from the response (or call GET /v2/send-campaign/{launch_request_id}) to check progress.
curl --request POST \
--url https://campaign-orchestration.treble.ai/v2/send-campaign/{poll_id} \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"users": [
{
"cellphone": "3051234567",
"country_code": "+57",
"user_session_keys": [
{
"key": "name",
"value": "John"
},
{
"key": "TransID",
"value": "12345"
},
{
"key": "schoolname",
"value": "Redschool"
}
]
}
]
}
'{
"message": "The campaign was queued",
"id": "1251072",
"batch_id": "acaab9ea-8754-4d6a-98b1-ace451c7d930",
"launch_request_id": "59d7ef01-4518-444f-816e-1c45c1748974",
"status_url": "/v2/send-campaign/59d7ef01-4518-444f-816e-1c45c1748974"
}{
"detail": "poll_id is required, either in the URL or the body"
}{
"detail": "Invalid API key"
}{
"detail": "There is no poll for this company"
}Asynchronous processing
This endpoint responds202 Accepted as soon as the campaign is queued, before any user has actually been messaged. Use the status_url from the response, or call Get a campaign’s status, to check how it’s progressing.
Select which number deploys (multichannel companies)
For multichannel companies, you can select which cellphone will deploy the user withuser_session_keys. If you want the first number to make the deployment, you can just add the key deployment_squad and the corresponding value will be DS_[CELLPHONE]. You may add several deployment squads so several numbers can deploy.
"user_session_keys": [
{
"key": "deployment_squad",
"value": "DS_[CELLPHONE]"
}
]
Headers
Authorization API Key. Can be obtained at https://app.treble.ai/en/dashboard/settings/developers
Path Parameters
ID of the poll you want to deploy
Body
Information of the users to whom the poll will be deployed
List of users to whom the poll will be deployed
Show child attributes
Show child attributes
Was this page helpful?