curl --request POST \
--url https://main.treble.ai/deployment/api/poll/{poll_id} \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"users": [
{
"cellphone": "3051234567",
"country_code": "+57",
"user_session_keys": [
{
"key": "name",
"value": "John"
},
{
"key": "TransID",
"value": "12345"
},
{
"key": "schoolname",
"value": "Redschool"
}
]
}
]
}
'{
"message": "The poll was deployed",
"id": "5f8d7e6a5f8d7e6a5f8d7e6a",
"batch_id": "5f8d7e6a5f8d7e6a5f8d7e6b",
"new_last_scheduleded_deployment": "2021-03-15T15:46:41Z",
"conversations_id": [
"5f8d7e6a5f8d7e6a5f8d7e6c"
]
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}API
Deploy a conversation flow
This endpoint allows you to deploy a conversation to a list of users defined by their phone number and country code. It also allows you to schedule deployments for a future date.
POST
/
deployment
/
api
/
poll
/
{poll_id}
curl --request POST \
--url https://main.treble.ai/deployment/api/poll/{poll_id} \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"users": [
{
"cellphone": "3051234567",
"country_code": "+57",
"user_session_keys": [
{
"key": "name",
"value": "John"
},
{
"key": "TransID",
"value": "12345"
},
{
"key": "schoolname",
"value": "Redschool"
}
]
}
]
}
'{
"message": "The poll was deployed",
"id": "5f8d7e6a5f8d7e6a5f8d7e6a",
"batch_id": "5f8d7e6a5f8d7e6a5f8d7e6b",
"new_last_scheduleded_deployment": "2021-03-15T15:46:41Z",
"conversations_id": [
"5f8d7e6a5f8d7e6a5f8d7e6c"
]
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Remember that to use this endpoint, you must have obtained your API key in the Developers section of the Treble platform.
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
Available options:
application/json Path Parameters
ID of the poll you want to deploy
Body
application/json
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?