---
title: List users
slug: list-users
docTags: 
createdAt: 2026-04-17T07:48:39.600Z
---

{
  "id": "dQ6cJkzyI43sQyJhWhaUG",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "https://api.archbee.com/v2/users",
    "servers": [
      {
        "url": "https://api.archbee.com/v2/users",
        "description": "Production server"
      },
      {
        "url": "https://staging-api.archbee.com/v2/users",
        "description": "Staging server"
      },
      {
        "url": "https://{region}.api.archbee.com/{version}/users",
        "description": "Regional server with variables"
      }
    ],
    "name": "List users",
    "description": "<p>Returns a paginated list of users. Supports filtering by status and role,\nsorting, and field selection via query parameters.</p>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [
        {
          "kind": "optional",
          "name": "X-Request-Id",
          "type": "string<uuid>",
          "example": "123e4567-e89b-12d3-a456-426614174000",
          "description": "Optional correlation ID for request tracing",
          "format": "uuid"
        }
      ],
      "queryParameters": [
        {
          "kind": "optional",
          "name": "page",
          "type": "integer<int32>",
          "example": 1,
          "description": "<p>Page number for pagination (1-indexed)</p>",
          "default": 1,
          "format": "int32",
          "minimum": 1
        },
        {
          "kind": "optional",
          "name": "limit",
          "type": "integer<int32>",
          "example": 20,
          "description": "Number of items per page",
          "default": 20,
          "format": "int32",
          "minimum": 1,
          "maximum": 100
        },
        {
          "kind": "optional",
          "name": "status",
          "type": "string",
          "description": "Filter by account status",
          "default": "active",
          "enum": [
            "active",
            "inactive",
            "suspended",
            "pending"
          ]
        },
        {
          "kind": "optional",
          "name": "role",
          "type": "array",
          "description": "Filter by user role",
          "schema": [],
          "itemType": "string",
          "customType": "string[]"
        },
        {
          "kind": "optional",
          "name": "sort",
          "type": "string",
          "example": "created_at:desc",
          "description": "Sort field and direction"
        },
        {
          "kind": "optional",
          "name": "fields",
          "type": "string",
          "example": "id,name,email",
          "description": "<p>Comma-separated list of fields to include in the response</p>"
        }
      ],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "bearerAuth",
          "name": "bearerAuth",
          "kind": "optional",
          "type": "http",
          "description": "<p>HTTP Bearer token authentication (JWT)</p>",
          "scheme": "bearer"
        }
      ]
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "A paginated list of users",
        "jsonExample": "",
        "isExpanded": true,
        "subExamples": [
          {
            "label": "GENERATED",
            "code": "// A paginated list of users\n{\n  \"data\": {},\n  \"meta\": {\n    \"page\": 1,\n    \"limit\": 20,\n    \"total\": 142,\n    \"totalPages\": 8\n  }\n}"
          },
          {
            "label": "singleUser",
            "code": "// Single user in list\n{\n  \"data\": [\n    {\n      \"id\": \"550e8400-e29b-41d4-a716-446655440000\",\n      \"name\": \"Jane Smith\",\n      \"email\": \"jane@example.com\",\n      \"role\": \"admin\",\n      \"status\": \"active\",\n      \"createdAt\": \"2025-01-15T09:30:00Z\"\n    }\n  ],\n  \"meta\": {\n    \"page\": 1,\n    \"limit\": 20,\n    \"total\": 1\n  }\n}"
          },
          {
            "label": "multipleUsers",
            "code": "// Multiple users\n{\n  \"data\": [\n    {\n      \"id\": \"550e8400-e29b-41d4-a716-446655440000\",\n      \"name\": \"Jane Smith\",\n      \"email\": \"jane@example.com\",\n      \"role\": \"admin\",\n      \"status\": \"active\"\n    },\n    {\n      \"id\": \"660e8400-e29b-41d4-a716-446655440001\",\n      \"name\": \"Bob Jones\",\n      \"email\": \"bob@example.com\",\n      \"role\": \"viewer\",\n      \"status\": \"active\"\n    }\n  ],\n  \"meta\": {\n    \"page\": 1,\n    \"limit\": 20,\n    \"total\": 2\n  }\n}"
          }
        ],
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "schema": [
              {
                "name": "data",
                "kind": "optional",
                "type": "object",
                "description": "",
                "modelRef": "#/components/schemas/User",
                "customType": "User[]",
                "schema": [],
                "complexType": "allOf",
                "complexItems": [
                  {
                    "name": "UserBase",
                    "description": "",
                    "modelRef": "#/components/schemas/UserBase",
                    "schema": [
                      {
                        "name": "name",
                        "kind": "required",
                        "type": "string",
                        "description": "",
                        "example": "Jane Smith",
                        "minLength": 1,
                        "maxLength": 100
                      },
                      {
                        "name": "email",
                        "kind": "required",
                        "type": "string<email>",
                        "description": "",
                        "example": "jane@example.com",
                        "format": "email"
                      },
                      {
                        "name": "role",
                        "kind": "optional",
                        "type": "string<admin | editor | viewer | guest>",
                        "description": "",
                        "example": "",
                        "default": "viewer",
                        "enum": [
                          "admin",
                          "editor",
                          "viewer",
                          "guest"
                        ]
                      },
                      {
                        "name": "profile",
                        "kind": "optional",
                        "type": "object",
                        "description": "User profile details",
                        "modelRef": "#/components/schemas/UserProfile",
                        "customType": "UserProfile",
                        "schema": [
                          {
                            "name": "bio",
                            "kind": "optional",
                            "type": "string",
                            "description": "",
                            "example": "Software engineer and API enthusiast",
                            "maxLength": 500
                          },
                          {
                            "name": "avatarUrl",
                            "kind": "optional",
                            "type": "string<uri>",
                            "description": "",
                            "example": "https://example.com/avatars/jane.png",
                            "format": "uri"
                          },
                          {
                            "name": "timezone",
                            "kind": "optional",
                            "type": "string",
                            "description": "",
                            "example": "America/New_York"
                          },
                          {
                            "name": "socialLinks",
                            "kind": "optional",
                            "type": "map",
                            "description": "",
                            "example": "{\"github\":\"https://github.com/janesmith\",\"linkedin\":\"https://linkedin.com/in/janesmith\"}",
                            "customType": "map<string, string>",
                            "schema": []
                          }
                        ]
                      }
                    ]
                  },
                  {
                    "name": "object",
                    "description": "",
                    "schema": [
                      {
                        "name": "id",
                        "kind": "optional",
                        "type": "string<uuid>",
                        "readOnly": true,
                        "description": "",
                        "example": "550e8400-e29b-41d4-a716-446655440000",
                        "format": "uuid"
                      },
                      {
                        "name": "status",
                        "kind": "optional",
                        "type": "string<active | inactive | suspended | pending>",
                        "readOnly": true,
                        "description": "",
                        "example": "active",
                        "enum": [
                          "active",
                          "inactive",
                          "suspended",
                          "pending"
                        ]
                      },
                      {
                        "name": "createdAt",
                        "kind": "optional",
                        "type": "string<date-time>",
                        "readOnly": true,
                        "description": "",
                        "example": "2025-01-15T09:30:00Z",
                        "format": "date-time"
                      },
                      {
                        "name": "updatedAt",
                        "kind": "optional",
                        "type": "string<date-time>",
                        "readOnly": true,
                        "description": "",
                        "example": "2025-06-01T14:22:00Z",
                        "format": "date-time"
                      },
                      {
                        "name": "permissions",
                        "kind": "optional",
                        "type": "array",
                        "readOnly": true,
                        "description": "",
                        "example": "[\"read\",\"write\",\"admin\"]",
                        "itemType": "string",
                        "customType": "string[]",
                        "itemExample": "",
                        "itemDefault": ""
                      }
                    ]
                  }
                ]
              },
              {
                "name": "meta",
                "kind": "optional",
                "type": "object",
                "description": "Pagination metadata included in list responses",
                "modelRef": "#/components/schemas/PaginationMeta",
                "customType": "PaginationMeta",
                "schema": [
                  {
                    "name": "page",
                    "kind": "optional",
                    "type": "integer<int32>",
                    "description": "",
                    "example": 1,
                    "format": "int32",
                    "minimum": 1
                  },
                  {
                    "name": "limit",
                    "kind": "optional",
                    "type": "integer<int32>",
                    "description": "",
                    "example": 20,
                    "format": "int32",
                    "minimum": 1,
                    "maximum": 100
                  },
                  {
                    "name": "total",
                    "kind": "optional",
                    "type": "integer<int64>",
                    "description": "",
                    "example": 142,
                    "format": "int64",
                    "minimum": 0
                  },
                  {
                    "name": "totalPages",
                    "kind": "optional",
                    "type": "integer<int32>",
                    "description": "",
                    "example": 8,
                    "format": "int32",
                    "minimum": 0
                  }
                ]
              }
            ],
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "401",
        "description": "Unauthorized — missing or invalid authentication credentials",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "example": "{\"code\":\"UNAUTHORIZED\",\"message\":\"Authentication credentials are missing or invalid\"}",
            "description": "Standard error response",
            "customType": "Error",
            "schema": [
              {
                "name": "code",
                "kind": "required",
                "type": "string",
                "description": "Machine-readable error code",
                "example": "VALIDATION_ERROR"
              },
              {
                "name": "message",
                "kind": "required",
                "type": "string",
                "description": "Human-readable error message",
                "example": "The request body contains invalid fields"
              },
              {
                "name": "details",
                "kind": "optional",
                "type": "array",
                "description": "Detailed validation errors (when applicable)",
                "example": "",
                "itemType": "object",
                "customType": "object[]",
                "schema": [
                  {
                    "name": "field",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "example": "email"
                  },
                  {
                    "name": "message",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "example": "must be a valid email address"
                  },
                  {
                    "name": "code",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "example": "INVALID_FORMAT"
                  }
                ]
              },
              {
                "name": "requestId",
                "kind": "optional",
                "type": "string<uuid>",
                "description": "Correlation ID for support inquiries",
                "example": "",
                "format": "uuid"
              }
            ],
            "modelRef": "#/components/schemas/Error",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "403",
        "description": "Forbidden — insufficient permissions",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "example": "{\"code\":\"FORBIDDEN\",\"message\":\"You do not have permission to access this resource\"}",
            "description": "Standard error response",
            "customType": "Error",
            "schema": [
              {
                "name": "code",
                "kind": "required",
                "type": "string",
                "description": "Machine-readable error code",
                "example": "VALIDATION_ERROR"
              },
              {
                "name": "message",
                "kind": "required",
                "type": "string",
                "description": "Human-readable error message",
                "example": "The request body contains invalid fields"
              },
              {
                "name": "details",
                "kind": "optional",
                "type": "array",
                "description": "Detailed validation errors (when applicable)",
                "example": "",
                "itemType": "object",
                "customType": "object[]",
                "schema": [
                  {
                    "name": "field",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "example": "email"
                  },
                  {
                    "name": "message",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "example": "must be a valid email address"
                  },
                  {
                    "name": "code",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "example": "INVALID_FORMAT"
                  }
                ]
              },
              {
                "name": "requestId",
                "kind": "optional",
                "type": "string<uuid>",
                "description": "Correlation ID for support inquiries",
                "example": "",
                "format": "uuid"
              }
            ],
            "modelRef": "#/components/schemas/Error",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "500",
        "description": "Internal server error",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "example": "{\"code\":\"INTERNAL_ERROR\",\"message\":\"An unexpected error occurred. Please try again later.\",\"requestId\":\"123e4567-e89b-12d3-a456-426614174000\"}",
            "description": "Standard error response",
            "customType": "Error",
            "schema": [
              {
                "name": "code",
                "kind": "required",
                "type": "string",
                "description": "Machine-readable error code",
                "example": "VALIDATION_ERROR"
              },
              {
                "name": "message",
                "kind": "required",
                "type": "string",
                "description": "Human-readable error message",
                "example": "The request body contains invalid fields"
              },
              {
                "name": "details",
                "kind": "optional",
                "type": "array",
                "description": "Detailed validation errors (when applicable)",
                "example": "",
                "itemType": "object",
                "customType": "object[]",
                "schema": [
                  {
                    "name": "field",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "example": "email"
                  },
                  {
                    "name": "message",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "example": "must be a valid email address"
                  },
                  {
                    "name": "code",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "example": "INVALID_FORMAT"
                  }
                ]
              },
              {
                "name": "requestId",
                "kind": "optional",
                "type": "string<uuid>",
                "description": "Correlation ID for support inquiries",
                "example": "",
                "format": "uuid"
              }
            ],
            "modelRef": "#/components/schemas/Error",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "2nd7FvwlbK8ogFVrlA3Dl",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url 'https://api.archbee.com/v2/users?page=1&limit=20&status=active' \\\n     --header 'accept: application/json'"
        },
        {
          "id": "-mh259hoUZg-XRIavbIeK",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar requestOptions = {\n   method: 'GET',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.archbee.com/v2/users?page=1&limit=20&status=active\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "SDiwtsiD7jQFMSN95Ce-C",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.archbee.com/v2/users?page=1&limit=20&status=active\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "0QI6UsTvkxKLXwWcvf5Nn",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.archbee.com/v2/users?page=1&limit=20&status=active\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "2nd7FvwlbK8ogFVrlA3Dl"
    },
    "results": {
      "languages": [
        {
          "id": "IpLBJ42AjyzF17jze0YmP",
          "language": "200",
          "code": "// A paginated list of users\n{\n  \"data\": {},\n  \"meta\": {\n    \"page\": 1,\n    \"limit\": 20,\n    \"total\": 142,\n    \"totalPages\": 8\n  }\n}",
          "subExamples": [
            {
              "label": "GENERATED",
              "code": "// A paginated list of users\n{\n  \"data\": {},\n  \"meta\": {\n    \"page\": 1,\n    \"limit\": 20,\n    \"total\": 142,\n    \"totalPages\": 8\n  }\n}"
            },
            {
              "label": "singleUser",
              "code": "// Single user in list\n{\n  \"data\": [\n    {\n      \"id\": \"550e8400-e29b-41d4-a716-446655440000\",\n      \"name\": \"Jane Smith\",\n      \"email\": \"jane@example.com\",\n      \"role\": \"admin\",\n      \"status\": \"active\",\n      \"createdAt\": \"2025-01-15T09:30:00Z\"\n    }\n  ],\n  \"meta\": {\n    \"page\": 1,\n    \"limit\": 20,\n    \"total\": 1\n  }\n}"
            },
            {
              "label": "multipleUsers",
              "code": "// Multiple users\n{\n  \"data\": [\n    {\n      \"id\": \"550e8400-e29b-41d4-a716-446655440000\",\n      \"name\": \"Jane Smith\",\n      \"email\": \"jane@example.com\",\n      \"role\": \"admin\",\n      \"status\": \"active\"\n    },\n    {\n      \"id\": \"660e8400-e29b-41d4-a716-446655440001\",\n      \"name\": \"Bob Jones\",\n      \"email\": \"bob@example.com\",\n      \"role\": \"viewer\",\n      \"status\": \"active\"\n    }\n  ],\n  \"meta\": {\n    \"page\": 1,\n    \"limit\": 20,\n    \"total\": 2\n  }\n}"
            }
          ]
        },
        {
          "id": "Wv4gUXDRVwZ6LDmgCjQqY",
          "language": "401",
          "code": "// Unauthorized — missing or invalid authentication credentials\n{\n  \"code\": \"VALIDATION_ERROR\",\n  \"message\": \"The request body contains invalid fields\",\n  \"details\": [\n    {\n      \"field\": \"email\",\n      \"message\": \"must be a valid email address\",\n      \"code\": \"INVALID_FORMAT\"\n    }\n  ],\n  \"requestId\": \"\"\n}"
        },
        {
          "id": "EcE69LtJiywfoMBKO3THA",
          "language": "403",
          "code": "// Forbidden — insufficient permissions\n{\n  \"code\": \"VALIDATION_ERROR\",\n  \"message\": \"The request body contains invalid fields\",\n  \"details\": [\n    {\n      \"field\": \"email\",\n      \"message\": \"must be a valid email address\",\n      \"code\": \"INVALID_FORMAT\"\n    }\n  ],\n  \"requestId\": \"\"\n}"
        },
        {
          "id": "iaEUq0cDFg3QDhsmDhjrH",
          "language": "500",
          "code": "// Internal server error\n{\n  \"code\": \"VALIDATION_ERROR\",\n  \"message\": \"The request body contains invalid fields\",\n  \"details\": [\n    {\n      \"field\": \"email\",\n      \"message\": \"must be a valid email address\",\n      \"code\": \"INVALID_FORMAT\"\n    }\n  ],\n  \"requestId\": \"\"\n}"
        }
      ],
      "selectedLanguageId": "IpLBJ42AjyzF17jze0YmP"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}