> For the complete documentation index, see [llms.txt](https://docs.cekat.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cekat.ai/api-documentation/settings/list-agents-v2.md).

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

```json
{"openapi":"3.0.3","info":{"title":"Cekat Open API","version":"1.0.0"},"tags":[{"name":"Settings","description":"Read your business's agents (team members)."}],"servers":[{"url":"https://api.cekat.ai","description":"Production"}],"security":[{"CekatApiKey":[]},{"BearerAuth":[]}],"components":{"securitySchemes":{"CekatApiKey":{"type":"apiKey","in":"header","name":"api_key","description":"Your business's Cekat API key, from **Settings → Developers & API** in the Cekat dashboard (https://chat.cekat.ai/developers?section=apikeys). Available on the Business and Enterprise plans."},"BearerAuth":{"type":"http","scheme":"bearer","description":"The same Cekat API key, sent as `Authorization: Bearer YOUR_API_KEY`. Accepted only by endpoints under `/api/...`."}},"schemas":{"AgentV2":{"type":"object","description":"An agent. Includes `chat` when `module=chat`, and `crm` otherwise.","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"email":{"type":"string"},"is_verified":{"type":"boolean","description":"False when the agent hasn't verified their email yet."},"chat":{"type":"object","properties":{"role":{"type":"string","nullable":true},"is_active":{"type":"boolean"},"divisions":{"type":"array","items":{"type":"object","additionalProperties":true}},"inboxes":{"type":"array","items":{"type":"object","additionalProperties":true}}}},"crm":{"type":"object","properties":{"is_active":{"type":"boolean"},"authority":{"type":"string","nullable":true},"role":{"type":"object","nullable":true,"additionalProperties":true}}}}},"ApiError":{"type":"object","description":"Error body returned by the `/api/...` endpoints.","properties":{"success":{"type":"boolean"},"message":{"type":"string"},"statusCode":{"type":"integer"},"error":{"type":"object","properties":{"message":{"type":"string"}}},"correlationId":{"type":"string","description":"Request ID. Include it when contacting Cekat support."}}},"RateLimitError":{"type":"object","properties":{"message":{"type":"string"}}}},"responses":{"ApiUnauthorized":{"description":"The API key is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"TooManyRequests":{"description":"Rate limit exceeded. Wait and retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}}}}},"paths":{"/api/agents/v2":{"get":{"tags":["Settings"],"operationId":"ListAgentsV2","summary":"List agents (v2)","description":"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.","parameters":[{"name":"search","in":"query","required":false,"description":"Matches name or email.","schema":{"type":"string"}},{"name":"module","in":"query","required":false,"description":"Only agents with access to this module.","schema":{"type":"string","enum":["chat","crm"]}},{"name":"is_active_other","in":"query","required":false,"description":"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.","schema":{"type":"string"}},{"name":"sort_by","in":"query","required":false,"schema":{"type":"string","enum":["created_at","name","email","is_online"],"default":"created_at"}},{"name":"sort_order","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"],"default":"desc"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":20}}],"responses":{"200":{"description":"A page of agents.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/AgentV2"}},"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"total":{"type":"integer"},"total_pages":{"type":"integer"}}},"authority_counts":{"type":"object","description":"With `module=crm`, the number of agents per CRM authority level.","additionalProperties":{"type":"integer"}}}}}}},"400":{"description":"`module`, `sort_by`, `sort_order`, `page` or `limit` is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"$ref":"#/components/responses/ApiUnauthorized"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}}}}
```
