Create agent

POST
/v1/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/v1/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"
]
}
}