This page explains how to use call and chat API endpoints for mid-session authentication in your SDK channels.
Users can start a support session, such as a support chat, without authenticating.
When end-user authentication becomes necessary, you can initiate an authentication
flow. Upon successful authentication, you can update the end_user
identifier to link
the session to the verified end-user.
URI and authentication
The base URI for this new endpoint differs depending on the comm_type
.
For the call
comm_type:
POST https://<subdomain>.<domain>//apps/api/v1/calls/:call_id/end_user
For the chat
comm_type:
POST https://<subdomain>.<domain>//apps/api/v1/chats/:chat_id/end_user
API operations
Parameters
The body of the API request should have the following fields:
ID | Field name | Type | Required? | Description | Example values |
---|---|---|---|---|---|
0
|
identifier
|
String | Yes | Unique external identifier provided. | |
1
|
name
|
String | No | The generic name or identifier associated with the interaction. Aids with customer lookup. | John Doe
|
2
|
email
|
String | No | The generic email address associated with the interaction. Aids with customer lookup. | john@doe.com
|
3
|
phone
|
String | No | The generic phone number associated with the interaction. Aids with customer lookup. | 123-456-7890
|
API samples
Sample API response
Success response sample:
202 Accepted
{
"message"
:
"accepted"
}
Failure response samples
Missing Parameters
400
{
"message"
:
"param is missing or the value is empty: comm_type"
}
400
{
"message"
:
"param is missing or the value is empty: identifier"
}
Referencing a comm type other than call or chat
404
{
"message"
:
"Not Found"
}
Session not active
400
{
"message"
:
"Call is already ended"
}
400
{
"message"
:
"Chat is already ended"
}
Unsupported CRM request
400
{
"message"
:
"Unsupported CRM request"
}
Duplicate request
400
{
"message"
:
"Duplicate request: Please wait for the interval to expire"
}
API request sample
Call Comm Type
POST
https://<subdomain>.<domain>/apps/api/v1/calls/:call_id/end_user
Content-Type:
application/json
Authorization:
Bearer
<your_access_token> {
"identifier"
:
"unique_external_id"
,
"name"
:
"John Doe"
,
"email"
:
"johndoe@example.com"
,
"phone"
:
"123-456-7890"
}
Chat Comm Type
POST
https://<subdomain>.<domain>/apps/api/v1/chats/:chat_id/end_user
Content-Type:
application/json
Authorization:
Bearer
<your_access_token> {
"identifier"
:
"unique_external_id"
,
"name"
:
"Jane Smith"
,
"email"
:
"janesmith@example.com"
,
"phone"
:
"098-765-4321"
}
Apps API Documentation
For additional apps API endpoints, see Apps API Publication .