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/admin/settings

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

The body is of type object.

Response

200
application/json

The poll was successfully deployed

The response is of type object.