> ## Documentation Index > Fetch the complete documentation index at: https://developer.rocket.chat/llms.txt > Use this file to discover all available pages before exploring further. # Get List of Agents or Managers > * If the `type` is `manager`, permission required: `view-livechat-manager`. * If the `type` is `agent`, permission required: at least one of `transfer-livechat-guest` or `edit-omnichannel-contact`. ### Changelog | Version | Description | | ---------------- | ------------| |2.2.0 | Added support to pagination | |0.42.0 | Added | ## OpenAPI ````json GET /api/v1/livechat/users/{type} { "openapi": "3.0.0", "info": { "version": "1.0.0", "title": "Omnichannel" }, "servers": [ { "url": "https://apiexplorer.support.rocket.chat" } ], "tags": [ { "name": "Omnichannel Users" }, { "name": "Omnichannel Agents" }, { "name": "Omnichannel Monitors" }, { "name": "Omnichannel Visitors" }, { "name": "Omnichannel Contacts" }, { "name": "Omnichannel Rooms" }, { "name": "Omnichannel Departments" }, { "name": "Omnichannel Custom Fields" }, { "name": "Omnichannel Business Hours" }, { "name": "Omnichannel Priorities" }, { "name": "Omnichannel Tags" }, { "name": "Omnichannel Units" }, { "name": "SLA Policies" }, { "name": "Canned Responses" }, { "name": "Omnichannel Transcript" }, { "name": "Omnichannel Statistics" }, { "name": "Omnichannel Agent Stats" }, { "name": "Omnichannel Dashboards" }, { "name": "Reports" }, { "name": "Omnichannel Inquiries" }, { "name": "Omnichannel Webhooks" }, { "name": "Livechat" }, { "name": "Livechat Appearance" }, { "name": "Livechat Triggers" }, { "name": "Livechat Messages" }, { "name": "Livechat Page Visited" } ], "paths": { "/api/v1/livechat/users/{type}": { "get": { "summary": "Get List of Agents or Managers", "description": "* If the `type` is `manager`, permission required: `view-livechat-manager`.\n* If the `type` is `agent`, permission required: at least one of `transfer-livechat-guest` or `edit-omnichannel-contact`.\n\n### Changelog\n| Version | Description |\n| ---------------- | ------------|\n|2.2.0 | Added support to pagination |\n|0.42.0 | Added |", "operationId": "get-api-v1-livechat-users-type", "parameters": [ { "$ref": "#/components/parameters/AuthToken" }, { "$ref": "#/components/parameters/UserId" }, { "$ref": "#/components/parameters/offset" }, { "$ref": "#/components/parameters/count" }, { "$ref": "#/components/parameters/sort" }, { "name": "type", "in": "path", "description": "The type of user that you want to register. The value can either be `agent` or `manager`.", "required": "true", "schema": { "type": "string" }, "example": "agent" }, { "name": "onlyAvailable", "in": "query", "schema": { "type": "boolean" }, "description": "When set to `true`, it only list agents whose [livechat status](https://docs.rocket.chat/docs/omnichannel-users#edit-agent) (`statusLivechat`) is `available`.", "example": "true" }, { "name": "showIdleAgents", "in": "query", "schema": { "type": "boolean" }, "description": "When set to `false`, offline agents will be excluded from the response. This filter does not apply to bots. All bot agents will be returned in the response.", "example": "false" }, { "name": "excludeId", "in": "query", "schema": { "type": "string" }, "example": "Ahgfwk9sasYEsMjwX", "description": "The ID of a specific agent to exclude from the list." }, { "name": "text", "in": "query", "schema": { "type": "string" }, "description": "Enter the text you want to filter the search result with.", "example": "true" } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "users": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string" }, "username": { "type": "string" }, "status": { "type": "string" }, "statusLivechat": { "type": "string" }, "name": { "type": "string" }, "emails": { "type": "array", "items": { "type": "object", "properties": { "address": { "type": "string" }, "verified": { "type": "boolean" } } } }, "livechat": { "type": "string" }, "departments": { "type": "array", "items": { "type": "string" } } } } } } }, "examples": { "Success Example": { "value": { "users": [ { "_id": "XLzGrYF9L2miSpPHP", "username": "dialog.bot", "status": "offline", "statusLivechat": "not-available", "name": "Dialog Bot", "emails": [ { "address": "dialog.bot@test.com", "verified": "true" } ], "livechat": null, "departments": [] }, { "_id": "rbAXPnMktTFbNpwtJ", "username": "john.doe", "status": "offline", "statusLivechat": "available", "name": "John Doe", "emails": [ { "address": "john.doe@gmail.com", "verified": "true" } ], "livechat": { "maxNumberSimultaneousChat": "" }, "departments": [ "64181a0728384134ed600dcc" ] }, { "_id": "hFDuCPam7sWziWFYa", "username": "hookdeck.write", "status": "offline", "statusLivechat": "not-available", "name": "Hookdeck Write", "emails": [ { "address": "hookdeckwrite@gmail.com", "verified": "true" } ], "livechat": null, "departments": [] }, { "_id": "stjxrXYBWy3EcDugH", "username": "rocket.agent", "status": "offline", "statusLivechat": "not-available", "name": "Rocket Agent", "emails": [ { "address": "rocket.agent@rocket.chat", "verified": "false" } ], "livechat": { "maxNumberSimultaneousChat": "" }, "departments": [ "64181a0728384134ed600dcc" ] } ] } } } } } }, "401": { "$ref": "#/components/responses/authorizationError" }, "403": { "$ref": "#/components/responses/permissionError" } }, "tags": [ "Omnichannel Users" ] } } }, "components": { "parameters": { "AuthToken": { "name": "X-Auth-Token", "in": "header", "description": "The `authToken` of the authenticated user.", "required": "true", "schema": { "type": "string" }, "example": "RScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f" }, "UserId": { "name": "X-User-Id", "in": "header", "description": "The `userId` of the authenticated user.", "required": "true", "schema": { "type": "string" }, "example": "rbAXPnMktTFbNpwtJ" }, "offset": { "name": "offset", "in": "query", "required": "false", "schema": { "type": "integer" }, "example": "50", "description": "Number of items to \"skip\" in the query, i.e. requests return count items, skipping the first offset items. Refer to the [official documentation](https://developer.rocket.chat/apidocs/query-parameters#pagination) to learn more." }, "count": { "name": "count", "in": "query", "required": "false", "schema": { "type": "integer" }, "example": "25", "description": "The number of items to return. Refer to the [official documentation](https://developer.rocket.chat/apidocs/query-parameters#pagination) to learn more." }, "sort": { "name": "sort", "in": "query", "required": "false", "schema": { "format": "object" }, "description": "List of fields to order by, and in which direction. JSON object, with properties listed in desired order, with values of 1 for ascending, or -1 for descending. For example, sort = `{\"value\": -1, \"_id\": 1}`. Refer to the [official documentation](https://developer.rocket.chat/apidocs/query-parameters#pagination) to learn more." } }, "responses": { "authorizationError": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "message": { "type": "string" } } }, "examples": { "Authorization Error": { "value": { "status": "error", "message": "You must be logged in to do this." } } } } } }, "permissionError": { "description": "Forbidden", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "error": { "type": "string" } } }, "examples": { "Permission Error": { "value": { "success": "false", "error": "User does not have the permissions required for this action [error-unauthorized]" } }, "Unauthorized": { "value": { "success": "false", "error": "unauthorized" } } } } } } } } } ````