List Agents
List the agents available to your API key. Use an agent's data[].id when another operation asks for agent_id. Results are paginated: the default is 20 agents per page, with a maximum of 100.
GET https://developers.chatway.app/api/v1/agentsExample request
curl -G "https://developers.chatway.app/api/v1/agents" \
-H "X-API-KEY: your_api_key" \
--data-urlencode "limit=20" \
--data-urlencode "page=1"Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
email | query | No | string|null (email) | Optional email filter. Omit it to request the list without an email filter. |
limit | query | No | integer|null | Maximum agents per page. Default: 20. Allowed range: 1–100. |
page | query | No | integer|null | Page number, starting at 1. Default: 1. |
Responses
200
Paginated list responses include data, meta.pagination, and links. Use the page and limit query parameters to walk results. Follow links.next until it is null, or increment page until current_page >= total_pages.
| Field | Description |
|---|---|
meta.pagination.total |
Total records across all pages |
meta.pagination.count |
Records returned on this page |
meta.pagination.per_page |
Page size used for this response (matches limit) |
meta.pagination.current_page |
Current page number (1-based) |
meta.pagination.total_pages |
Total number of pages |
links.next |
URL for the next page, or null on the last page |
links.first / links.last |
First and last page URLs |
application/json
data (array<object>, required)type (string, required)id (string, required)attributes (object, required)email (string|null, required)name (string|null, required)status (string|null, required)online_status (string|null, required)profile_photo_url (string|null, required)resized_profile_photo_url (string|null, required)role (string|null, required)
meta (object, required)pagination (object, required)total (integer, required)count (integer, required)per_page (integer, required)current_page (integer, required)total_pages (integer, required)
links (object, required)self (string, required)first (string, required)next (string|null, required)last (string, required)
422
Examples
Response 200 example
{
"data": [
{
"type": "agent-user",
"id": "26fa75f2-7ac1-47b4-84e1-b943491ba4da",
"attributes": {
"email": "[email protected]",
"name": "Mock Agent Alpha",
"status": "active",
"online_status": "online",
"profile_photo_url": null,
"resized_profile_photo_url": null,
"role": "CHAT_AGENT_MEMBER"
}
}
],
"meta": {
"pagination": {
"total": 1,
"count": 1,
"per_page": 20,
"current_page": 1,
"total_pages": 1
}
},
"links": {
"self": "https://developers.chatway.app/api/v1/agents?page=1",
"first": "https://developers.chatway.app/api/v1/agents?page=1",
"next": null,
"last": "https://developers.chatway.app/api/v1/agents?page=1"
}
}