• KB Home
  • API
  • edna Chat Center API for Bot Connect
  • Create New Distribution Threads

Create New Distribution Threads

Allows the bot to create new distribution threads.

Request Body Parameters

ParameterTypeDescription
messageslist<object>List of distribution messages
messages.client.extIdstringTarget client external ID
messages.client.phoneNumberstringTarget client phone number
routingobjectRouting parameters for the
client. It will apply to the next
thread only
routing.skillIdlongAgent’s skill ID for routing
routing.prioritylongPriority in the distribution queue relative to other threads.
Default: 100
routing.expiredAtdateRouting parameters expiration date
channelobject (optional)Channel parameters for the client
channel.channelTypestring (optional)Target client channel type (MOBILE by default)
channel.appMarkerstring (optional)AppMarker of the client application
textstringDistribution message text
campaignNamestringDistribution message broadcast name. Will bind to the next thread for the client

HTTP Request

POST /api/v1/chatbot/distributions HTTP/1.1
Content-Type: application/json
Authorization: Bearer <chatbot_token>
Content-Length: 426
Host: localhost: 8080
{
    "messages": [
        {
            "client": {
                "extId": "qwerty123",
                "phoneNumber": "89031234567"
            },
            "channel": {
                "channelType": "WHATSAPP",
                "appMarker": "test"
            },
            "routing": {
                "skillId": 1,
                "priority": 1,
                "expiredAt": "2022-07-23T18:00:00+03:00"
            },
            "text": "message text",
            "campaignName": "campaign name",
            "chatMessageId": "uuid12344_12232"
        }
    ]
}

Example of a Successful HTTP Response

HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers