Skip to main content
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"
  ]
}
Remember that to use this endpoint, you must have obtained your API key in the Developers section of the Treble platform.

Headers

Authorization
string
required

Authorization API Key. Can be obtained at https://app.treble.ai/en/dashboard/settings/developers

Content-Type
enum<string>
required
Available options:
application/json

Path Parameters

poll_id
string
required

ID of the poll you want to deploy

Body

application/json

Information of the users to whom the poll will be deployed

users
object[]
required

List of users to whom the poll will be deployed

Response

The poll was deployed correctly

message
string

Confirmation message

id
string

Deployment ID

batch_id
string

Batch deployment ID

new_last_scheduleded_deployment
string<date-time>

Date and time of the last scheduled deployment

conversations_id
string[]

List of IDs of the created conversations

I