<integratorBaseURL>https://do-chat.dial-once.com/api/live-chat/<integrator-name>Each request will be authentified via a header Authorization that will include a secret bearer.
Two types of bearers come into play for DialOnce livechat.
Depending of the request, either of two will be used
| integratorSecret | conversationSecret | |
|---|---|---|
| Source | Communicated by DialOnce during technical setup phase | Passed in conversation creation call body (see below) |
| Requests | - create conversation | - add message |
sequenceDiagram
participant API as LiveChat API
participant Integrator
participant Webhook
API->>Integrator: POST /channel/{channelId}/conversations (Create Conversation)
Integrator-->>API: 200 OK
loop Loop conversation
alt Either of
API->>Integrator: POST /channel/{channelId}/conversations/{conversationId}/messages (Add Message)
Integrator-->>API: 200 OK
else
Integrator->>Webhook: POST webhook Update (Message to end user, Conversation status update)
Webhook-->>Integrator: 200 OK
end
end
opt If conversation is not closed via webhook
API->>Integrator: PATCH /channel/{channelId}/conversations/{conversationId} (Close Conversation)
Integrator-->>API: 200 OK
end
Creates a new chat conversation.
Request
POST<integratorBaseURL>/channel/<channelId>/conversationsBearer <integratorSecret>application/json