Agents

Create agent

Create an agent.

SecurityApiKeyAuth
Request
Request Body schema: application/json
required

The agent's details

additionalEmails
Array of strings unique

Additional email addresses for the agent

additionalPhoneNumbers
Array of strings unique

Additional phone numbers for the agent

avatarUrl
string

The url from which to load the agent's avatar

displayName
required
string

The agent's display name

email
required
string

The agent's primary email address

firstName
string

The agent's first name

lastName
string

The agent's last name

middleNames
Array of strings

The agent's middle names

phoneNumber
string

The agent's primary phone number

Responses
201

The created agent

400

Invalid value extracted from request context, Invalid value for: body, Validation failure during agent creation

500

Internal failure during request processing

post/beta/agents
Request samples
application/json
{
  • "displayName": "Alice Brown",
  • "email": "alice@brown.com",
  • "phoneNumber": "+551155256325",
  • "additionalEmails": [
    • "alice@secondary.email"
    ],
  • "additionalPhoneNumbers": [
    • "+5566778899"
    ],
  • "firstName": "Alice",
  • "lastName": "Brown",
  • "middleNames": [ ],
  • "avatarUrl": "http://avatar.url"
}
Response samples
application/json
{
  • "data": {
    • "id": "4d2ab456-8510-4a35-b266-e502160d5177",
    • "createdAt": "2020-12-16T09:41:43Z",
    • "displayName": "Alice Brown",
    • "email": "alice@brown.com",
    • "phoneNumber": "+551155256325",
    • "additionalEmails": [
      • "alice@secondary.email"
      ],
    • "additionalPhoneNumbers": [
      • "+5566778899"
      ],
    • "firstName": "Alice",
    • "lastName": "Brown",
    • "middleNames": [ ],
    • "roles": [
      • "Agent"
      ]
    }
}

Create agents

Create agents in bulk.

SecurityApiKeyAuth
Request
Request Body schema: application/json
required

The list of agent's details

Array of objects (CreateAgentInput)
Responses
201

The created agents

400

Invalid value extracted from request context, Invalid value for: body

500

Internal failure during request processing

post/beta/agents/bulk
Request samples
application/json
{
  • "data": [
    • {
      • "displayName": "Alice Brown",
      • "email": "alice@brown.com",
      • "phoneNumber": "+551155256325",
      • "additionalEmails": [ ],
      • "additionalPhoneNumbers": [ ],
      • "firstName": "Alice",
      • "lastName": "Brown",
      • "middleNames": [ ],
      • "avatarUrl": "http://avatar.url"
      }
    ]
}
Response samples
application/json
{
  • "data": [
    • {
      • "data": {
        • "id": "93b885ad-fe0d-3089-8df6-34904fd59f71",
        • "createdAt": "2020-12-16T09:41:43Z",
        • "displayName": "Agent 0",
        • "email": "agent.0@example.org",
        • "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",
        • "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",
        • "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",
        • "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"
      }
    ]
}

Delete agent

Downgrade an agent/admin to become an end user.

SecurityApiKeyAuth
Request
path Parameters
agentId
required
string <uuid>

The agent/admin id

Responses
204

The agent/admin was successfully downgraded to end user

400

Invalid value for: path parameter agentId, Invalid value extracted from request context, Validation failure during delete processing

404

An entity in this request could not be found

delete/beta/agents/{agentId}
Request samples
Response samples
application/json
{
  • "message": "Decoding failure in request"
}

Get agent

Get an agent/admin by id.

SecurityApiKeyAuth
Request
path Parameters
agentId
required
string <uuid>

The agent/admin id

Responses
200

The agent/admin

400

Invalid value for: path parameter agentId, Invalid value extracted from request context

404

An entity in this request could not be found

500

Internal failure during request processing

get/beta/agents/{agentId}
Request samples
Response samples
application/json
{
  • "data": {
    • "id": "4d2ab456-8510-4a35-b266-e502160d5177",
    • "createdAt": "2020-12-16T09:41:43Z",
    • "displayName": "Alice Brown",
    • "email": "alice@brown.com",
    • "phoneNumber": "+551155256325",
    • "additionalEmails": [
      • "alice@secondary.email"
      ],
    • "additionalPhoneNumbers": [
      • "+5566778899"
      ],
    • "firstName": "Alice",
    • "lastName": "Brown",
    • "middleNames": [ ],
    • "roles": [
      • "Agent"
      ]
    }
}

Get presence

Get the presence status for an agent/admin.

SecurityApiKeyAuth
Request
path Parameters
agentId
required
string <uuid>

The agent/admin id

Responses
200

The agent/admin presence status

400

Invalid value for: path parameter agentId, Invalid value extracted from request context

404

An entity in this request could not be found

500

Internal failure during request processing

get/beta/agents/{agentId}/presence
Request samples
Response samples
application/json
{
  • "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"
      ]
    }
}

List 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.

SecurityApiKeyAuth
Request
query Parameters
email
string

The agent/admin email filter

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.

pageLimit
integer <int32>

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

phone
string

The agent/admin phone number filter

Responses
200

The list of agents/admins

400

Invalid value extracted from request context, Invalid value for: query parameter pageLimit, Invalid value for: query parameter pageKey, Invalid value for: query parameter email, Invalid value for: query parameter phone, Duplicate phone number, Duplicate email address, Invalid filters: Cannot provide both phone number and email address

404

An entity in this request could not be found

500

Internal failure during request processing

get/beta/agents
Request samples
Response samples
application/json
{
  • "data": [
    • {
      • "id": "93b885ad-fe0d-3089-8df6-34904fd59f71",
      • "createdAt": "2020-12-16T09:41:43Z",
      • "displayName": "Agent 0",
      • "email": "agent.0@example.org",
      • "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",
      • "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",
      • "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",
      • "additionalEmails": [ ],
      • "additionalPhoneNumbers": [ ],
      • "middleNames": [ ],
      • "roles": [
        • "Agent"
        ]
      }
    ]
}

List presence

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

SecurityApiKeyAuth
Responses
200

The list of presence status for all agents/admins

400

Invalid value extracted from request context

500

Internal failure during request processing

get/beta/agents/presence
Request samples
Response samples
application/json
[
  • {
    • "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 teams

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

SecurityApiKeyAuth
Request
path Parameters
agentId
required
string <uuid>

The agent/admin id

Responses
200

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

400

Invalid value for: path parameter agentId, Invalid value extracted from request context

404

An entity in this request could not be found

500

Internal failure during request processing

get/beta/agents/{agentId}/teams
Request samples
Response samples
application/json
{
  • "data": [
    • {
      • "id": "e8ecd53b-2f6c-4471-a3a0-34d94caff8c8"
      },
    • {
      • "id": "4d2ab456-8510-4a35-b266-e502160d5177"
      }
    ]
}

Patch agent

Patch an agent/admin.

SecurityApiKeyAuth
Request
path Parameters
agentId
required
string <uuid>

The agent/admin id

Request Body schema: application/json
required

The agent/admin patch

additionalEmails
Array of strings unique

Additional email addresses for the agent

additionalPhoneNumbers
Array of strings unique

Additional phone numbers for the agent

avatarUrl
string

The url from which to load the agent's avatar

displayName
string

The agent's display name

firstName
string

The agent's first name

lastName
string

The agent's last name

middleNames
Array of strings

The agent's middle names

phoneNumber
string

The agent's primary phone number

Responses
200

The patched agent/admin

400

Invalid value for: path parameter agentId, Invalid value extracted from request context, Invalid value for: body, Validation failure during update

404

An entity in this request could not be found

500

Internal failure during request processing

patch/beta/agents/{agentId}
Request samples
application/json
{
  • "displayName": "Alice Brown",
  • "additionalEmails": [ ],
  • "additionalPhoneNumbers": [ ],
  • "firstName": "Alice",
  • "lastName": "Brown",
  • "middleNames": [ ],
  • "avatarUrl": "http://avatar.url"
}
Response samples
application/json
{
  • "data": {
    • "id": "4d2ab456-8510-4a35-b266-e502160d5177",
    • "createdAt": "2020-12-16T09:41:43Z",
    • "displayName": "Alice Brown",
    • "email": "alice@brown.com",
    • "phoneNumber": "+551155256325",
    • "additionalEmails": [
      • "alice@secondary.email"
      ],
    • "additionalPhoneNumbers": [
      • "+5566778899"
      ],
    • "firstName": "Alice",
    • "lastName": "Brown",
    • "middleNames": [ ],
    • "roles": [
      • "Agent"
      ]
    }
}

Patch agents

Bulk patch agents/admins.

SecurityApiKeyAuth
Request
Request Body schema: application/json
optional

List of agent/admin patch actions

Array
additionalEmails
Array of strings unique

Additional email addresses for the agent

additionalPhoneNumbers
Array of strings unique

Additional phone numbers for the agent

avatarUrl
string

The url from which to load the agent's avatar

displayName
string

The agent's display name

firstName
string

The agent's first name

id
required
string

Unique identifier for the agent

lastName
string

The agent's last name

middleNames
Array of strings

The agent's middle names

phoneNumber
string

The agent's primary phone number

Responses
200

The list of patch action outcomes

400

Invalid value extracted from request context, Invalid value for: body

500

Internal failure during request processing

patch/beta/agents
Request samples
application/json
[
  • {
    • "id": "434ce9f5-14c8-4be1-a0a8-f755010deb9b",
    • "displayName": "AB",
    • "additionalEmails": [ ],
    • "additionalPhoneNumbers": [ ],
    • "middleNames": [ ]
    },
  • {
    • "id": "434ce9f5-14c8-4be1-a0a8-f755010deb9c",
    • "displayName": "JB",
    • "additionalEmails": [ ],
    • "additionalPhoneNumbers": [ ],
    • "middleNames": [ ]
    }
]
Response samples
application/json
{
  • "data": [
    • {
      • "data": {
        • "id": "4d2ab456-8510-4a35-b266-e502160d5177",
        • "createdAt": "2020-12-16T09:41:43Z",
        • "displayName": "AB",
        • "email": "jb@example.org",
        • "additionalEmails": [ ],
        • "additionalPhoneNumbers": [ ],
        • "middleNames": [ ],
        • "roles": [
          • "Agent"
          ]
        },
      • "_type": "BulkActionSuccess"
      },
    • {
      • "error": {
        • "id": "434ce9f5-14c8-4be1-a0a8-f755010deb9c",
        • "message": "Agent not found",
        • "_type": "NotFound"
        },
      • "_type": "BulkActionFailure"
      }
    ]
}

Update agent

Update an agent/admin.

SecurityApiKeyAuth
Request
path Parameters
agentId
required
string <uuid>

The agent id

Request Body schema: application/json
required

The updated details for an agent/admin

additionalEmails
Array of strings unique

Additional email addresses for the agent

additionalPhoneNumbers
Array of strings unique

Additional phone numbers for the agent

avatarUrl
string

The url from which to load the agent's avatar

displayName
required
string

The agent's display name

firstName
string

The agent's first name

lastName
string

The agent's last name

middleNames
Array of strings

The agent's middle names

phoneNumber
string

The agent's primary phone number

Responses
200

The updated agent/admin

400

Invalid value for: path parameter agentId, Invalid value extracted from request context, Invalid value for: body, Validation failure during update

404

An entity in this request could not be found

500

Internal failure during request processing

put/beta/agents/{agentId}
Request samples
application/json
{
  • "displayName": "Alice Brown",
  • "phoneNumber": "+551155256325",
  • "additionalEmails": [ ],
  • "additionalPhoneNumbers": [ ],
  • "firstName": "Alice",
  • "lastName": "Brown",
  • "middleNames": [
    • "Julia"
    ],
  • "avatarUrl": "http://avatar.url"
}
Response samples
application/json
{
  • "data": {
    • "id": "4d2ab456-8510-4a35-b266-e502160d5177",
    • "createdAt": "2020-12-16T09:41:43Z",
    • "displayName": "Alice Brown",
    • "email": "alice@brown.com",
    • "phoneNumber": "+551155256325",
    • "additionalEmails": [
      • "alice@secondary.email"
      ],
    • "additionalPhoneNumbers": [
      • "+5566778899"
      ],
    • "firstName": "Alice",
    • "lastName": "Brown",
    • "middleNames": [
      • "Julia"
      ],
    • "roles": [
      • "Agent"
      ]
    }
}

Update agents

Bulk update agents/admins.

SecurityApiKeyAuth
Request
Request Body schema: application/json
optional

The list of agent/admin update actions

Array
additionalEmails
Array of strings unique

Additional email addresses for the agent

additionalPhoneNumbers
Array of strings unique

Additional phone numbers for the agent

avatarUrl
string

The url from which to load the agent's avatar

displayName
required
string

The agent's display name

firstName
string

The agent's first name

id
required
string

Unique identifier for the agent

lastName
string

The agent's last name

middleNames
Array of strings

The agent's middle names

phoneNumber
string

The agent's primary phone number

Responses
200

The list of update action outcomes

400

Invalid value extracted from request context, Invalid value for: body

500

Internal failure during request processing

put/beta/agents
Request samples
application/json
[
  • {
    • "id": "434ce9f5-14c8-4be1-a0a8-f755010deb9b",
    • "displayName": "Alice Brown",
    • "phoneNumber": "+551155256325",
    • "additionalEmails": [ ],
    • "additionalPhoneNumbers": [ ],
    • "firstName": "Alice",
    • "lastName": "Brown",
    • "middleNames": [ ],
    • "avatarUrl": "http://avatar.url"
    }
]
Response samples
application/json
{
  • "data": [
    • {
      • "data": {
        • "id": "4d2ab456-8510-4a35-b266-e502160d5177",
        • "createdAt": "2020-12-16T09:41:43Z",
        • "displayName": "Alice Brown",
        • "email": "alice@brown.com",
        • "phoneNumber": "+551155256325",
        • "additionalEmails": [
          • "alice@secondary.email"
          ],
        • "additionalPhoneNumbers": [
          • "+5566778899"
          ],
        • "firstName": "Alice",
        • "lastName": "Brown",
        • "middleNames": [ ],
        • "roles": [
          • "Agent"
          ]
        },
      • "_type": "BulkActionSuccess"
      }
    ]
}