SubizDeveloper Docs
Agents

API 4.1

List agents

Get the agents in your account, for example to find an agent ID.

GEThttps://api.subiz.com.vn/4.1/agents

Use this endpoint to get the agents in your account, for example to find the agent ID to use when you invite an agent or assign an agent.

The account comes from your access token. There are no request parameters and no request body.

Response

A successful request returns HTTP 200 with a JSON array of agents, not an object:

[
  {
    "id": "agent_example",
    "account_id": "account_example",
    "type": "agent",
    "state": "active",
    "fullname": "Sam Example",
    "email": "sam@example.com",
    "scopes": [
      "supervisor"
    ]
  },
  {
    "id": "agent_second_example",
    "account_id": "account_example",
    "type": "agent",
    "state": "pending",
    "fullname": "Jamie Example",
    "email": "jamie@example.com"
  }
]

This example shows selected fields. See Agent format for every field and state value. The list is not paginated.

Filter the array in your code. For example, keep agents whose state is active before you show them as choices for assignment.

Other paths

GET https://api.subiz.com.vn/4.0/agents and GET https://api.subiz.com.vn/4.0/accounts/YOUR_ACCID/agents return the same list.

HTTP request

Replace YOUR_ACCESS_TOKEN with your token.

GET https://api.subiz.com.vn/4.1/agents
Authorization: Bearer YOUR_ACCESS_TOKEN