Create conversation

All API requests should contain authorization headers.

Request

POST chat/conversations

Request body

{
    "author":{
        "name": "John",
        "email": "john@dow.com"
    },
    "title": "Chat API Client Problems",
    "url": "https://thejohndow.com",
    "sentiment": "question",
    "categoryId": 1505,
}

The body of the request should contain the following model serialized to JSON.

Field
Type
Comment

author

Conversation author

categoryId

nullable integer

Conversation category id. Optional

fields

array of Custom Fields value models

Conversation fields. Optional

isBotEnabled

boolean

If true, a bot will be assigned to the conversation at the start. Default value is false

sentiment

nullable Sentiment enumeration

Conversation sentiment. Optional, if left unset, it will to the value question

title

string

Conversation title. Optional

url

string

The URL where the conversation took place. Optional

Response

{
    "data": {
        "author": {
            "id": "fc2481f6-28a4-4ca7-849a-344fd6ab1b20",
            "name": "John",
            "image": null,
            "email": "john@dow.com",
            "status": "client",
            "isBot": false
        },
        "creationTime": "2023-09-01T12:56:39.0847826+03:00",
        "id": 254626,
        "isClosed": false,
        "isTakeoverEnabled": true,
        "lastModifiedTime": "2023-09-01T12:56:39.0847826+03:00",
        "messages": [
            {
                "author": {
                    "id": "fc2481f6-28a4-4ca7-849a-344fd6ab1b20",
                    "name": "John",
                    "image": null,
                    "email": "john@dow.com",
                    "status": "client",
                    "isBot": false
                },
                "creationTime": "2023-09-01T12:56:39.0847826+03:00",
                "id": 0,
                "lastModifiedTime": "2023-09-01T12:56:39.0847826+03:00",
                "message": "Hi, I have some questions about the Chat API"
            }
        ],
        "queuePositionInfo": 
        {
            "position": 1403,
            "waitTime": 15
        },
        "feedback": null,
        "totalMessagesCount": 1
    },
    "errorCode": -1,
    "errorText": null
}

Data field has type of Conversation object.

Last updated