Agents

An agent is a person who can handle phone calls. At any given time, an agent belongs to a single team.

Fields

class Agent
email: string

The agent’s email address, which must be unique.

external_id: string

The agent’s ID in the tenant’s internal directory, for SSO & co.

first_name: string

The agent’s first name.

id: integer

The agent’s unique ID.

last_name: string

The agent’s last name.

number: string

The agent’s phone number, in international format.

team: integer

The team which the agent belongs to.

API

GET /j/agents

Retrieves the list of agents.

Example request:

GET /j/agents HTTP/1.1
Authorization: Bearer 0a1b2c3d4e5f

Example response:

HTTP/1.1 200 OK
Content-Type: application/json

[
   {
      "activity": null,
      "email": "test_user_1@example.com",
      "first_name": "Test",
      "id": 1,
      "last_name": "User 1",
      "number": "+33100000001",
      "team": 1
   },
   {
      "activity": null,
      "email": "test_user_2@example.com",
      "first_name": "Test",
      "id": 2,
      "last_name": "User 2",
      "number": "+33100000002",
      "team": 1
   }
]
Request Headers:
Query Parameters:
  • team (integer) – An optional team ID.

Response JSON Array of Objects:
  • email (string) – The agent’s email address, which must be unique.

  • external_id (string) – The agent’s ID in the tenant’s internal directory, for SSO & co.

  • first_name (string) – The agent’s first name.

  • id (integer) – The agent’s unique ID.

  • last_name (string) – The agent’s last name.

  • number (string) – The agent’s phone number, in international format.

  • team (integer) – The team which the agent belongs to.

Status Codes:
  • 200 OK – no error

  • 400 Bad Request – for instance a required field is missing

  • 403 Forbidden – you tried to access a forbidden resource, check you provided a valid OAuth token