Create New Distribution Thread

Permissions

  ----
  Permissions:INTEGRATOR,BOT
  ----

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/distributions HTTP/1.1
Content-Type: application/json
Authorization: Bearer <integrator_token>
Content-Length: 445
Host: localhost: 8080
{
    "messages": [
        {
            "client": {
                "extId": "qwerty123",
                "phoneNumber": "890000000000"
            },
            "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"
        }
    ]
}

HTTP Response

HTTP/1.1 200 OK