<aside> 🖥 method: POST **url: https://main.treble.ai/deployment/api/poll/{poll_id}** headers: Content-Type: application/json Authorization: {API_KEY}
</aside>
Body
{
"users":[
{
"cellphone":"string",
"country_code":"string",
"user_session_keys":[
{
"key":"name",
"value":"Juan"
},
{
"key":"TransID",
"value":"12345"
},
{
"key":"schoolname",
"value":"Redschool"
}
],
"deployment_eta": "int"
}
]
}
{
"message": "The poll was deployed",
"id":(str),
"batch_id": (str),
"new_last_scheduleded_deployment": (datetime string),
"conversations_id": [(str)]
}
The field conversation_id
in the URL's path has to be the id of the conversation you want to deploy. In the headers, there is an API_KEY
that you can access through https://app.treble.ai/en/admin/settings
The field deployment_eta
is not required. When sent, it can be a UNIX UTC timestamp such as 1615823201
that refers to Monday, March 15, 2021, 3:46:41 PM UTC. This is meant to be used to schedule deployments for a later date.
In the body, the whole cellphone number should be provided in the fields country_code
and cellphone
. So, for example, if your cellphone is +57 305 1234567 the file should be filled as follows:
"cellphone":"3051234567",
"country_code":"+57",
The user_session_keys
variables hold a list of variables to be either replaced in the question texts or be delivered whenever a webhook is called
For multichannel companies, you can select which cellphone will deploy the user with the users_session_keys
. If you want the first number to make the deployment, you can just add the key tdeployment_squad
and the corresponding value will be DS_[CELLPHONE]
. You may add several deployment squads so several numbers can deploy.