Xaleon API (v1.9)

Download OpenAPI specification:Download

Authentication

The API uses a token based authentication mechanism. A client sends a token as an URL parameter or as a Bearer Token with every request in order to authenticate itself. Tokens can be created by any admin user in the Backend Settings at Settings > API > Keys.

Example: URL Parameter

https://app.chatvisor.com/rest/v1/example?access_token=myaccesstoken

Example: Bearer Token

Authorization: Bearer myaccesstoken

token

Security Scheme Type API Key
Query parameter name: access_token

Bearer_Token

Security Scheme Type API Key
Header parameter name: Authorization

WebHooks

In order to deliver real-time information about customer interactions, a web hook mechanism is used. REST endpoints configured by the admin user are notified by a HTTP POST request of certain events.

New conversation

This WebHook is triggered if a new customer is created or a existing customer changes from the state "DONE" to "UNREAD". It sends a Conversation object as defined below:

{
  "customerId": "string",
  "status": "UNREAD | DONE | UNRESOLVED",
  "lastMessage": {
    "test": "string"
  },
  "url": "string"
}

Status change

This hook is triggered at any change of the customer status. It receives a Conversation object like the WebHook for new conversations.

New message

Triggered when a new message arrived from a customer.

For the message format see Message

Customer

Customers are accounts that interacted with your tenant through a channel and can send and received message

List all customers

Authorizations:
Bearer_Token (global) token (global)
query Parameters
offset
integer <int32>
pageNumber
integer <int32>
pageSize
integer <int32>

Responses

Response samples

Content type
application/json
{
  • "page": 0,
  • "results": [
    ]
}

Create customer

Create a new customer.

Authorizations:
Bearer_Token (global) token (global)
Request Body schema: application/json

The new customer

assignedUser
string

Assigned user

email
string

E-Mail address

externalId
string

Your ID within your organization

firstName
string

First name

gender
string
Enum: "NONE" "MALE" "FEMALE"

The gender

id
string

The unique identifier

lastName
string

Last name

Responses

Request samples

Content type
application/json
{
  • "assignedUser": "testuser@chatvisor.com",
  • "email": "john.doe@example.com",
  • "externalId": 12345,
  • "firstName": "John",
  • "gender": "male",
  • "id": "5c593c728b02502bc3f8ffe1",
  • "lastName": "Doe"
}

Response samples

Content type
application/json
{
  • "assignedUser": "testuser@chatvisor.com",
  • "email": "john.doe@example.com",
  • "externalId": 12345,
  • "firstName": "John",
  • "gender": "male",
  • "id": "5c593c728b02502bc3f8ffe1",
  • "lastName": "Doe"