List agents (v2)

このページは 日本語 ではまだ利用できません。デフォルトの言語 (English) で表示しています。

List agents (v2)

GEThttps://api.cekat.ai/api/agents/v2

Lists agents with search, sorting, and Chat or CRM access filters. With module=chat, each agent includes their Chat role, divisions and inboxes; otherwise their CRM access.

Authorization

api_keystringheaderrequired

Your Cekat API key, from Settings → Developers & API in the Cekat dashboard.

Authorizationstringheader

Alternative to api_key: send the same key as Bearer YOUR_API_KEY.

Query parameters

modulestring

Only agents with access to this module.

Available options: chat, crm
is_active_otherstring

With module=chat, send crm to exclude agents who also have CRM access; with module=crm, send chat to exclude agents who also have Chat access.

sort_bystring
Available options: created_at, name, email, is_online
default: "created_at"
sort_orderstring
Available options: asc, desc
default: "desc"
pageinteger
default: 1min: 1
limitinteger
default: 20min: 1max: 100

Response

200
400
401
429

A page of agents.

successboolean
dataAgentV2[]
Show child attributes
idstring<uuid>
namestring
emailstring
is_verifiedboolean

False when the agent hasn't verified their email yet.

chatobject
Show child attributes
rolestring | null
is_activeboolean
divisionsobject[]
inboxesobject[]
crmobject
Show child attributes
is_activeboolean
authoritystring | null
roleobject | null
paginationobject
Show child attributes
pageinteger
limitinteger
totalinteger
total_pagesinteger
authority_countsobject

With module=crm, the number of agents per CRM authority level.

module, sort_by, sort_order, page or limit is invalid.

successboolean
messagestring
statusCodeinteger
errorobject
Show child attributes
messagestring
correlationIdstring

Request ID. Include it when contacting Cekat support.

The API key is missing or invalid.

successboolean
messagestring
statusCodeinteger
errorobject
Show child attributes
messagestring
correlationIdstring

Request ID. Include it when contacting Cekat support.

Rate limit exceeded. Wait and retry.

messagestring
GET/api/agents/v2
cURL
JavaScript
Python
PHP
curl --request GET \
  --url 'https://api.cekat.ai/api/agents/v2' \
  --header 'api_key: YOUR_API_KEY'
const response = await fetch('https://api.cekat.ai/api/agents/v2', {
  method: 'GET',
  headers: { 'api_key': 'YOUR_API_KEY' },
});

const data = await response.json();
console.log(data);
import requests

url = "https://api.cekat.ai/api/agents/v2"
headers = {"api_key": "YOUR_API_KEY"}

response = requests.get(url, headers=headers)
print(response.json())
<?php
$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => 'https://api.cekat.ai/api/agents/v2',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => ['api_key: YOUR_API_KEY'],
]);

$response = curl_exec($curl);
curl_close($curl);
echo $response;
Response
200
400
401
429
{
  "success": true,
  "data": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "name": "Jane Doe",
      "email": "[email protected]",
      "is_verified": true,
      "chat": {
        "role": "<string>",
        "is_active": true,
        "divisions": [
          {}
        ],
        "inboxes": [
          {}
        ]
      },
      "crm": {
        "is_active": true,
        "authority": "<string>",
        "role": {}
      }
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 1,
    "total": 1,
    "total_pages": 1
  },
  "authority_counts": {}
}
{
  "success": true,
  "message": "<string>",
  "statusCode": 1,
  "error": {
    "message": "<string>"
  },
  "correlationId": "<string>"
}
{
  "success": true,
  "message": "<string>",
  "statusCode": 1,
  "error": {
    "message": "<string>"
  },
  "correlationId": "<string>"
}
{
  "message": "<string>"
}