Agents

List presence

GET
/beta/agents/presence

List the presence status for all agents/admins in an organization.

Authorization

ApiKeyAuth
headerAuthorization<token>

Response Body

The list of presence status for all agents/admins

application/json
  1. response
[index: integer]?
Example Request
curl -X GET 'https://dev.dixa.io/beta/agents/presence' \  -H 'Authorization: <API token>'
[
{
"userId": "d31a73fc-d67b-49ec-9534-1f36a0c4c906",
"requestTime": "2021-12-01T12:46:35.935",
"lastSeen": "2021-12-01T12:46:35.935",
"presenceStatus": "Working",
"connectionStatus": "Online",
"activeChannels": [
"Email",
"FacebookMessenger"
]
},
{
"userId": "8026cb51-184b-424f-8686-c6bc7bcf88eb",
"requestTime": "2021-12-01T12:46:35.935",
"lastSeen": "2021-12-01T12:46:35.935",
"presenceStatus": "Working",
"connectionStatus": "Online",
"activeChannels": [
"Email",
"FacebookMessenger",
"PstnPhone"
]
}
]

List agents

GET
/beta/agents

Lists all agents/admins in an organization. It is possible to filter by one of the mutually exclusive parameters: email or phone number. In case both are provided, an error is returned.

Authorization

ApiKeyAuth
headerAuthorization<token>

Query Parameters

pageLimit?integer

Maximum number of results per page. May be used in combination with pageKey to change the number of results in between page requests.

Formatint32
pageKey?string

Base64 encoded form of pagination query parameters. Do not try to construct or change programmatically as the internal structure may change without notice.

email?string

The agent/admin email filter

phone?string

The agent/admin phone number filter

Response Body

The list of agents/admins

application/json
  1. response
data?array<>
meta?
Example Request
curl -X GET 'https://dev.dixa.io/beta/agents' \  -H 'Authorization: <API token>'
{
"data": [
{
"id": "93b885ad-fe0d-3089-8df6-34904fd59f71",
"createdAt": "2020-12-16T09:41:43Z",
"displayName": "Agent 0",
"email": "agent.0@example.org",
"avatarUrl": "https://files.dixa.io/public/image_0_id",
"additionalEmails": [],
"additionalPhoneNumbers": [],
"middleNames": [],
"roles": [
"Agent"
]
},
{
"id": "55a54008-ad1b-3589-aa21-0d2629c1df41",
"createdAt": "2020-12-16T09:41:43Z",
"displayName": "Agent 1",
"email": "agent.1@example.org",
"avatarUrl": "https://files.dixa.io/public/image_1_id",
"additionalEmails": [],
"additionalPhoneNumbers": [],
"middleNames": [],
"roles": [
"Agent"
]
},
{
"id": "9e688c58-a548-3b8e-af69-c9e1005ad0bf",
"createdAt": "2020-12-16T09:41:43Z",
"displayName": "Agent 2",
"email": "agent.2@example.org",
"avatarUrl": "https://files.dixa.io/public/image_2_id",
"additionalEmails": [],
"additionalPhoneNumbers": [],
"middleNames": [],
"roles": [
"Agent"
]
},
{
"id": "86666835-06aa-3d90-8bbd-5a74ac4edf68",
"createdAt": "2020-12-16T09:41:43Z",
"displayName": "Agent 3",
"email": "agent.3@example.org",
"avatarUrl": "https://files.dixa.io/public/image_3_id",
"additionalEmails": [],
"additionalPhoneNumbers": [],
"middleNames": [],
"roles": [
"Agent"
]
}
]
}

Update agents

PUT
/beta/agents

Bulk update agents/admins.

Authorization

ApiKeyAuth organization.member
headerAuthorization<token>

Scope: organization.member

Request Body

The list of agent/admin update actions

application/json
  1. body
[index: integer]?

Response Body

The list of update action outcomes

application/json
  1. response
data?array<|>
Example Request
curl -X PUT 'https://dev.dixa.io/beta/agents' \  -H 'Authorization: <API token>' \  -H 'Content-Type: application/json' \  -d '[  {    "id": "434ce9f5-14c8-4be1-a0a8-f755010deb9b",    "displayName": "Alice Brown",    "phoneNumber": "+551155256325",    "additionalEmails": [],    "additionalPhoneNumbers": [],    "firstName": "Alice",    "lastName": "Brown",    "middleNames": [],    "avatarUrl": "http://avatar.url"  }]'
{
"data": [
{
"data": {
"id": "4d2ab456-8510-4a35-b266-e502160d5177",
"createdAt": "2020-12-16T09:41:43Z",
"displayName": "Alice Brown",
"email": "alice@brown.com",
"avatarUrl": "https://files.dixa.io/public/image_id",
"phoneNumber": "+551155256325",
"additionalEmails": [
"alice@secondary.email"
],
"additionalPhoneNumbers": [
"+5566778899"
],
"firstName": "Alice",
"lastName": "Brown",
"middleNames": [],
"roles": [
"Agent"
]
},
"_type": "BulkActionSuccess"
}
]
}

Create agent

POST
/beta/agents

Create an agent.

Authorization

ApiKeyAuth organization.member
headerAuthorization<token>

Scope: organization.member

Request Body

The agent's details

application/json
  1. body
displayName*string

The agent's display name

email*string

The agent's primary email address

phoneNumber?string

The agent's primary phone number

additionalEmails?array<string>

Additional email addresses for the agent

additionalPhoneNumbers?array<string>

Additional phone numbers for the agent

firstName?string

The agent's first name

lastName?string

The agent's last name

middleNames?array<string>

The agent's middle names

avatarUrl?string

The url from which to load the agent's avatar

Response Body

The created agent

application/json
  1. response
data*
Example Request
curl -X POST 'https://dev.dixa.io/beta/agents' \  -H 'Authorization: <API token>' \  -H 'Content-Type: application/json' \  -d '{  "displayName": "Alice Brown",  "email": "alice@brown.com",  "phoneNumber": "+551155256325",  "additionalEmails": [    "alice@secondary.email"  ],  "additionalPhoneNumbers": [    "+5566778899"  ],  "firstName": "Alice",  "lastName": "Brown",  "middleNames": [],  "avatarUrl": "http://avatar.url"}'
{
"data": {
"id": "4d2ab456-8510-4a35-b266-e502160d5177",
"createdAt": "2020-12-16T09:41:43Z",
"displayName": "Alice Brown",
"email": "alice@brown.com",
"avatarUrl": "https://files.dixa.io/public/image_id",
"phoneNumber": "+551155256325",
"additionalEmails": [
"alice@secondary.email"
],
"additionalPhoneNumbers": [
"+5566778899"
],
"firstName": "Alice",
"lastName": "Brown",
"middleNames": [],
"roles": [
"Agent"
]
}
}

Patch agents

PATCH
/beta/agents

Bulk patch agents/admins.

Authorization

ApiKeyAuth organization.member
headerAuthorization<token>

Scope: organization.member

Request Body

List of agent/admin patch actions

application/json
  1. body
[index: integer]?

Response Body

The list of patch action outcomes

application/json
  1. response
data?array<|>
Example Request
curl -X PATCH 'https://dev.dixa.io/beta/agents' \  -H 'Authorization: <API token>' \  -H 'Content-Type: application/json' \  -d '[  {    "id": "434ce9f5-14c8-4be1-a0a8-f755010deb9b",    "displayName": "AB",    "additionalEmails": [],    "additionalPhoneNumbers": [],    "middleNames": []  },  {    "id": "434ce9f5-14c8-4be1-a0a8-f755010deb9c",    "displayName": "JB",    "additionalEmails": [],    "additionalPhoneNumbers": [],    "middleNames": []  }]'
{
"data": [
{
"data": {
"id": "4d2ab456-8510-4a35-b266-e502160d5177",
"createdAt": "2020-12-16T09:41:43Z",
"displayName": "AB",
"email": "jb@example.org",
"avatarUrl": "https://files.dixa.io/public/image_id",
"additionalEmails": [],
"additionalPhoneNumbers": [],
"middleNames": [],
"roles": [
"Agent"
]
},
"_type": "BulkActionSuccess"
},
{
"error": {
"id": "434ce9f5-14c8-4be1-a0a8-f755010deb9c",
"message": "Agent not found",
"_type": "NotFound"
},
"_type": "BulkActionFailure"
}
]
}

List teams

GET
/beta/agents/{agentId}/teams

List the teams in which the agent/admin is a member.

Authorization

ApiKeyAuth
headerAuthorization<token>

Path Parameters

agentId*string

The agent/admin id

Formatuuid

Response Body

The list of teams in which the agent/admin is a member

application/json
  1. response
data?array<>
Example Request
curl -X GET 'https://dev.dixa.io/beta/agents/{agentId}/teams' \  -H 'Authorization: <API token>'
{
"data": [
{
"id": "e8ecd53b-2f6c-4471-a3a0-34d94caff8c8"
},
{
"id": "4d2ab456-8510-4a35-b266-e502160d5177"
}
]
}

Get presence

GET
/beta/agents/{agentId}/presence

Get the presence status for an agent/admin.

Authorization

ApiKeyAuth
headerAuthorization<token>

Path Parameters

agentId*string

The agent/admin id

Formatuuid

Response Body

The agent/admin presence status

application/json
  1. response
data*
Example Request
curl -X GET 'https://dev.dixa.io/beta/agents/{agentId}/presence' \  -H 'Authorization: <API token>'
{
"data": {
"userId": "ec7f7e7b-b437-32ce-8681-45f71d37b53c",
"requestTime": "2021-12-01T12:46:35.935",
"lastSeen": "2021-12-01T12:46:35.935",
"presenceStatus": "Working",
"connectionStatus": "Online",
"activeChannels": [
"Email",
"FacebookMessenger"
]
}
}

Create agents

POST
/beta/agents/bulk

Create agents in bulk.

Authorization

ApiKeyAuth organization.member
headerAuthorization<token>

Scope: organization.member

Request Body

The list of agent's details

application/json
  1. body
data?array<>

Response Body

The created agents

application/json
  1. response
data?array<|>
Example Request
curl -X POST 'https://dev.dixa.io/beta/agents/bulk' \  -H 'Authorization: <API token>' \  -H 'Content-Type: application/json' \  -d '{  "data": [    {      "displayName": "Alice Brown",      "email": "alice@brown.com",      "phoneNumber": "+551155256325",      "additionalEmails": [],      "additionalPhoneNumbers": [],      "firstName": "Alice",      "lastName": "Brown",      "middleNames": [],      "avatarUrl": "http://avatar.url"    }  ]}'
{
"data": [
{
"data": {
"id": "93b885ad-fe0d-3089-8df6-34904fd59f71",
"createdAt": "2020-12-16T09:41:43Z",
"displayName": "Agent 0",
"email": "agent.0@example.org",
"avatarUrl": "https://files.dixa.io/public/image_0_id",
"additionalEmails": [],
"additionalPhoneNumbers": [],
"middleNames": [],
"roles": [
"Agent"
]
},
"_type": "BulkActionSuccess"
},
{
"data": {
"id": "55a54008-ad1b-3589-aa21-0d2629c1df41",
"createdAt": "2020-12-16T09:41:43Z",
"displayName": "Agent 1",
"email": "agent.1@example.org",
"avatarUrl": "https://files.dixa.io/public/image_1_id",
"additionalEmails": [],
"additionalPhoneNumbers": [],
"middleNames": [],
"roles": [
"Agent"
]
},
"_type": "BulkActionSuccess"
},
{
"data": {
"id": "9e688c58-a548-3b8e-af69-c9e1005ad0bf",
"createdAt": "2020-12-16T09:41:43Z",
"displayName": "Agent 2",
"email": "agent.2@example.org",
"avatarUrl": "https://files.dixa.io/public/image_2_id",
"additionalEmails": [],
"additionalPhoneNumbers": [],
"middleNames": [],
"roles": [
"Agent"
]
},
"_type": "BulkActionSuccess"
},
{
"data": {
"id": "86666835-06aa-3d90-8bbd-5a74ac4edf68",
"createdAt": "2020-12-16T09:41:43Z",
"displayName": "Agent 3",
"email": "agent.3@example.org",
"avatarUrl": "https://files.dixa.io/public/image_3_id",
"additionalEmails": [],
"additionalPhoneNumbers": [],
"middleNames": [],
"roles": [
"Agent"
]
},
"_type": "BulkActionSuccess"
},
{
"error": {
"id": "e8ecd53b-2f6c-4471-a3a0-34d94caff8c8",
"message": "Create Agent [userId=...] in [orgId=...] failed with [errors=...]",
"_type": "Validation"
},
"_type": "BulkActionFailure"
}
]
}

Get agent

GET
/beta/agents/{agentId}

Get an agent/admin by id.

Authorization

ApiKeyAuth
headerAuthorization<token>

Path Parameters

agentId*string

The agent/admin id

Formatuuid

Response Body

The agent/admin

application/json
  1. response
data*
Example Request
curl -X GET 'https://dev.dixa.io/beta/agents/{agentId}' \  -H 'Authorization: <API token>'
{
"data": {
"id": "4d2ab456-8510-4a35-b266-e502160d5177",
"createdAt": "2020-12-16T09:41:43Z",
"displayName": "Alice Brown",
"email": "alice@brown.com",
"avatarUrl": "https://files.dixa.io/public/image_id",
"phoneNumber": "+551155256325",
"additionalEmails": [
"alice@secondary.email"
],
"additionalPhoneNumbers": [
"+5566778899"
],
"firstName": "Alice",
"lastName": "Brown",
"middleNames": [],
"roles": [
"Agent"
]
}
}

Update agent

PUT
/beta/agents/{agentId}

Update an agent/admin.

Authorization

ApiKeyAuth organization.member
headerAuthorization<token>

Scope: organization.member

Path Parameters

agentId*string

The agent id

Formatuuid

Request Body

The updated details for an agent/admin

application/json
  1. body
displayName*string

The agent's display name

phoneNumber?string

The agent's primary phone number

additionalEmails?array<string>

Additional email addresses for the agent

additionalPhoneNumbers?array<string>

Additional phone numbers for the agent

firstName?string

The agent's first name

lastName?string

The agent's last name

middleNames?array<string>

The agent's middle names

avatarUrl?string

The url from which to load the agent's avatar

Response Body

The updated agent/admin

application/json
  1. response
data*
Example Request
curl -X PUT 'https://dev.dixa.io/beta/agents/{agentId}' \  -H 'Authorization: <API token>' \  -H 'Content-Type: application/json' \  -d '{  "displayName": "Alice Brown",  "phoneNumber": "+551155256325",  "additionalEmails": [],  "additionalPhoneNumbers": [],  "firstName": "Alice",  "lastName": "Brown",  "middleNames": [    "Julia"  ],  "avatarUrl": "http://avatar.url"}'
{
"data": {
"id": "4d2ab456-8510-4a35-b266-e502160d5177",
"createdAt": "2020-12-16T09:41:43Z",
"displayName": "Alice Brown",
"email": "alice@brown.com",
"avatarUrl": "https://files.dixa.io/public/image_id",
"phoneNumber": "+551155256325",
"additionalEmails": [
"alice@secondary.email"
],
"additionalPhoneNumbers": [
"+5566778899"
],
"firstName": "Alice",
"lastName": "Brown",
"middleNames": [
"Julia"
],
"roles": [
"Agent"
]
}
}

Delete agent

DELETE
/beta/agents/{agentId}

Downgrade an agent/admin to become an end user.

Authorization

ApiKeyAuth organization.member
headerAuthorization<token>

Scope: organization.member

Path Parameters

agentId*string

The agent/admin id

Formatuuid

Response Body

The agent/admin was successfully downgraded to end user

Example Request
curl -X DELETE 'https://dev.dixa.io/beta/agents/{agentId}' \  -H 'Authorization: <API token>'

Empty

Patch agent

PATCH
/beta/agents/{agentId}

Patch an agent/admin.

Authorization

ApiKeyAuth organization.member
headerAuthorization<token>

Scope: organization.member

Path Parameters

agentId*string

The agent/admin id

Formatuuid

Request Body

The agent/admin patch

application/json
  1. body
displayName?string

The agent's display name

phoneNumber?string

The agent's primary phone number

additionalEmails?array<string>

Additional email addresses for the agent

additionalPhoneNumbers?array<string>

Additional phone numbers for the agent

firstName?string

The agent's first name

lastName?string

The agent's last name

middleNames?array<string>

The agent's middle names

avatarUrl?string

The url from which to load the agent's avatar

Response Body

The patched agent/admin

application/json
  1. response
data*
Example Request
curl -X PATCH 'https://dev.dixa.io/beta/agents/{agentId}' \  -H 'Authorization: <API token>' \  -H 'Content-Type: application/json' \  -d '{  "displayName": "Alice Brown",  "additionalEmails": [],  "additionalPhoneNumbers": [],  "firstName": "Alice",  "lastName": "Brown",  "middleNames": [],  "avatarUrl": "http://avatar.url"}'
{
"data": {
"id": "4d2ab456-8510-4a35-b266-e502160d5177",
"createdAt": "2020-12-16T09:41:43Z",
"displayName": "Alice Brown",
"email": "alice@brown.com",
"avatarUrl": "https://files.dixa.io/public/image_id",
"phoneNumber": "+551155256325",
"additionalEmails": [
"alice@secondary.email"
],
"additionalPhoneNumbers": [
"+5566778899"
],
"firstName": "Alice",
"lastName": "Brown",
"middleNames": [],
"roles": [
"Agent"
]
}
}
PUT
/beta/agents/{agentId}/presence/working-channel

Updates the working channel of an agent

Authorization

ApiKeyAuth organization.member.presence.working_media
headerAuthorization<token>

Scope: organization.member.presence.working_media

Path Parameters

agentId*string

The agent id

Formatuuid

Request Body

The state of the agent presence channel

application/json
  1. body
channel*string

values: [Email, InteractiveChat, Messaging, Speak]

working*boolean

Response Body

The working channel of the agent was successfully updated

Example Request
curl -X PUT 'https://dev.dixa.io/beta/agents/{agentId}/presence/working-channel' \  -H 'Authorization: <API token>' \  -H 'Content-Type: application/json' \  -d '{  "channel": "Speak",  "working": false}'

Empty