Users
Creates a new conversation user using either an email or phoneNumber.
Authorizations
Body
one ofOptional
or
or
Responses
201
Successfully created a new conversation user.
application/json
400
User already exists.
application/json
403
Invalid API key or secret key. Ensure that you are using a valid authentication key.
application/json
500
Unexpected error occurred while processing the request. Please try again later.
application/json
post
POST /external/users HTTP/1.1
Host: api.raia2.com
Agent-Secret-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 211
{
"firstName": "John",
"lastName": "Doe",
"context": "Support",
"source": "webchat",
"fkUserId": "123456",
"customData": {
"key1": "value1",
"key2": "value2"
},
"phoneNumber": "+1234567890",
"email": "test@test.com",
"fkId": "123456"
}
{
"id": "5f7b1b3b-3b3b-4b3b-3b3b-3b3b3b3b3b3b",
"firstName": "John",
"lastName": "Doe",
"context": "Support",
"source": "webchat",
"fkId": "123456",
"fkUserId": "123456",
"email": "test@test.com",
"phoneNumber": "+1234567890",
"metadata": {
"customData": {
"key1": "value1",
"key2": "value2"
}
}
}
Retrieves a user by their email, phone number or fkId, along with their conversation IDs for the current agent.
Authorizations
Query parameters
emailstringOptionalExample:
User email
test@test.com
phoneNumberstringOptionalExample:
User phone number
+1234567890
fkIdstringOptionalExample:
User fkId
123456
Responses
200
Successfully retrieved the user and conversation ids
application/json
400
Invalid parameters provided.
application/json
403
Invalid API key or secret key. Ensure that you are using a valid authentication key.
application/json
404
User not found.
application/json
500
Unexpected error occurred while processing the request. Please try again later.
application/json
get
GET /external/users/search HTTP/1.1
Host: api.raia2.com
Agent-Secret-Key: YOUR_API_KEY
Accept: */*
{
"user": {
"id": "5f7b1b3b-3b3b-4b3b-3b3b-3b3b3b3b3b3b",
"firstName": "John",
"lastName": "Doe",
"context": "Support",
"source": "webchat",
"fkId": "123456",
"fkUserId": "123456",
"email": "test@test.com",
"phoneNumber": "+1234567890",
"metadata": {
"customData": {
"key1": "value1",
"key2": "value2"
}
}
},
"conversationIds": [
"5f7b1b3b-3b3b-4b3b-3b3b-3b3b3b3b3b3b",
"5f7b1b3b-3b3b-4b3b-3b3b-3b3b3b3b3b3b"
]
}
Retrieves a conversation user by their unique identifier.
Authorizations
Path parameters
idstringRequiredExample:
Unique identifier of the conversation user.
5f7b1b3b-3b3b-4b3b-3b3b-3b3b3b3b3b3b
Responses
200
Successfully retrieved the conversation user.
application/json
403
Invalid API key or secret key. Ensure that you are using a valid authentication key.
application/json
404
User not found.
application/json
500
Unexpected error occurred while processing the request. Please try again later.
application/json
get
GET /external/users/{id} HTTP/1.1
Host: api.raia2.com
Agent-Secret-Key: YOUR_API_KEY
Accept: */*
{
"id": "5f7b1b3b-3b3b-4b3b-3b3b-3b3b3b3b3b3b",
"firstName": "John",
"lastName": "Doe",
"context": "Support",
"source": "webchat",
"fkId": "123456",
"fkUserId": "123456",
"email": "test@test.com",
"phoneNumber": "+1234567890",
"metadata": {
"customData": {
"key1": "value1",
"key2": "value2"
}
}
}
Delete a conversation user by their unique identifier.
Authorizations
Path parameters
idstringRequiredExample:
Unique identifier of the conversation user.
5f7b1b3b-3b3b-4b3b-3b3b-3b3b3b3b3b3b
Responses
204
Successfully delete the conversation user.
403
Invalid API key or secret key. Ensure that you are using a valid authentication key.
application/json
404
Conversation user not found.
application/json
500
Unexpected error occurred while processing the request. Please try again later.
application/json
delete
DELETE /external/users/{id} HTTP/1.1
Host: api.raia2.com
Agent-Secret-Key: YOUR_API_KEY
Accept: */*
No content