{
"ok": false,
"error": "KNOWLEDGE_BASE_NOT_FOUND",
"message": "KnowledgeBase Not Found in DB!",
"code": "KNOWLEDGE_BASE_NOT_FOUND",
"status": 404
}
{
"ok": false,
"error": "JWT_SIGNATURE_EXCEPTION",
"message": "Invalid JWT token",
"status": 401
}
{
"ok": false,
"error": "UNAUTHORIZED_FEATURE",
"code": "UNAUTHORIZED_FEATURE",
"status": 401,
"message": "Please reach out to support to use this feature"
}
{
"ok": false,
"error": "ACCOUNT_DETAILS_NOT_FOUND",
"code": "ACCOUNT_DETAILS_NOT_FOUND",
"status": 404,
"message": "Account Details are Not Found!"
}
{
"ok": false,
"error": "BAD_REQUEST",
"code": "BAD_REQUEST",
"status": 400,
"message": "Knowledge base does not belong to the account(876)"
}
Get training status of a data source:
GET /api/v1/ai/status/sources
Using this API, you can fetch the status of one or more data sources in a knowledge base to know it its training is - in progress / completed / failed.
Headers:
Name
Value
Content-Type
application/json
Authorization
Bearer <token>
Body:
Name
Type
Descriptions
source_ids
query params
Comma-separated list of data source IDs to be passed as query params.
{
"ok": false,
"error": "CHANNEL_TOKEN_EXPIRED",
"code": "CHANNEL_TOKEN_EXPIRED",
"message": "Token used to configure the channel is expired. Please reconfigure the channel.",
"status": 400
}
{
"ok": false,
"error": "CONVERSATION_CREATION_EXCEPTION",
"code": "CONVERSATION_CREATION_EXCEPTION",
"message": "Conversation is not created. Please try again after some time.",
"status": 400
}
{
"ok": false,
"error": "CHANNEL_NOT_ENABLED",
"code": "CHANNEL_NOT_ENABLED",
"message": "This channel is not enabled in the account.",
"status": 400
}
{
"ok": false,
"error": "CONTACT_IS_BLOCKED",
"code": "CONTACT_IS_BLOCKED",
"message": "Conversation cannot be created for blocked contact.",
"status": 400
}
{
"ok": false,
"error": "CONTACT_IS_BLOCKED",
"code": "CONTACT_IS_BLOCKED",
"message": "Conversation cannot be created for blocked contact.",
"status": 400
}
{
"ok": false,
"error": "CONTACT_IS_BLOCKED",
"code": "CONTACT_IS_BLOCKED",
"message": "Conversation cannot be created for blocked contact.",
"status": 400
}
{
"ok": false,
"error": "CONVERSATION_NOT_CREATED",
"code": "CONVERSATION_NOT_CREATED",
"message": "Conversation is not created due to user limit validation",
"status": 400
}
{
"ok": false,
"error": "PHONE_NUMBER_IS_NOT_CONFIGURED",
"code": "PHONE_NUMBER_IS_NOT_CONFIGURED",
"message": "’From’ phone number is not configured in the account.",
"status": 404
}
{
"ok": false,
"error": "WHATSAPP_TEMPLATE_NOT_FOUND",
"code": "WHATSAPP_TEMPLATE_NOT_FOUND",
"message": "WhatsApp template is not available in the account.",
"status": 404
}
{
"ok": false,
"error": "TEMPLATE_NOT_APPROVED",
"code": "TEMPLATE_NOT_APPROVED",
"message": "Oops, template is not approved",
"status": 404
}
Send agent response to a conversation
POST /api/v1/conversation/<conversation_id>/messages
For every response sent by the agent on the third-party system, this API is to be invoked so it can relay this response to the user.
{
"ok": false,
"error": "CONVERSATION_NOT_CLOSED",
"code": "CONVERSATION_NOT_CLOSED",
"message": "Conversation is not closed due to user limit validation.",
"status": 400
}
{
"ok": false,
"error": "CONVERSATION_NOT_FOUND",
"code": "CONVERSATION_NOT_FOUND",
"message": "Conversation is not available.",
"status": 404
}
Changing assignee in a conversation:
POST /api/v1/conversation/{conversation_id}/events
Use this endpoint to change the assignee in an open conversation.
Headers:
Name
Value
Content-Type
application/json
Authorization
Bearer <token>
Body:
// Change from assignee to assignee
{
"event": "assignee",
"user": {
"by": "assignee_old@replycx.com",
"to": "assignee_new@replycx.com"
}
}
// Change from assignee to team
{
"event": "assignee",
"team": {
"by": "assignee@replycx.com",
"to": "Sales"
}
}
Response:
{
"ok": true
}
{
"ok": false,
"error": "TEAM_NOT_FOUND",
"code": "TEAM_NOT_FOUND",
"message": "Team does not exist.",
"status": 400
}
{
"ok": false,
"error": "CONVERSATION_CLOSED",
"code": "CONVERSATION_CLOSED",
"message": "Assignee cannot be changed on closed conversation.",
"status": 400
}
{
"ok": false,
"error": "ASSIGNEE_CHANGE_EXCEPTION",
"code": "ASSIGNEE_CHANGE_EXCEPTION",
"message": "By and To user are same. Can not assign conversation to same user.",
"status": 400
}
{
"ok": false,
"error": "ASSIGNEE_NOT_CHANGED",
"code": "ASSIGNEE_NOT_CHANGED",
"message": "Assignee is not changed due to user limit validationt.",
"status": 400
}java