Метод: POST
Authorization: Bearer Token (Метод для получения токена по логину и паролю)
URL: https://notify.twin24.ai/api/v1/messages
Блок кода | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
{
"messages": [
{
"channels": {
"chat": {
"chatId": "bce7d22e-dde6-4427-b391-ebbdfda44de6",
"botId": "bce7d22e-dde6-4427-b391-ebbdfda44de6",
"messengerType": "WHATSAPP",
"chatSessionName": "Название сессии",
"text": "Текст сообщения",
"provider": "TWIN"
}
},
"callbackUrl": "http://example.com",
"callbackData": "123",
"sendAt": "2023-12-31T12:00:00+00:00",
"allowedTimeRanges": [
[
"00:00:00",
"05:00:00"
],
[
"08:00:00",
"12:00:00"
],
[
"19:30:00",
"23:55:00"
]
],
"destinations": [
{
"variables": {
"name": "Иван",
"age": "23"
},
"phone": "74992868344",
"messengerUserId": "74992868344",
"externalId": "qwerty12345"
}
]
}
]
} |