---
updatedAt: 2026-05-28T13:22:33.000Z
agentTools:
  projectIndex: https://api.help.mabl.com/llms.txt
---

# Query users

Query for users

# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "title": "mabl API",
    "description": "APIs for interacting with mabl services",
    "version": "0.563.3-2026-10-09.1791576280-jbaldassari-1791576682-SNAPSHOT"
  },
  "servers": [
    {
      "url": "https://api.mabl.com/"
    }
  ],
  "components": {
    "securitySchemes": {
      "basicAuth": {
        "type": "http",
        "scheme": "basic"
      },
      "bearerAuth": {
        "type": "apiKey",
        "name": "Authorization",
        "in": "header"
      }
    },
    "schemas": {
      "UserQueryResult": {
        "type": "object",
        "properties": {
          "cursor": {
            "type": "string",
            "description": "Cursor used for pagination",
            "readOnly": true
          },
          "historic_users": {
            "type": "array",
            "description": "All users who had historic activity in the workspace, but are no longer users in that workspace. Only populated if include_historic_users is set to true.",
            "readOnly": true,
            "items": {
              "$ref": "#/components/schemas/User"
            }
          },
          "users": {
            "type": "array",
            "description": "All users that matched the query",
            "readOnly": true,
            "items": {
              "$ref": "#/components/schemas/User"
            }
          }
        }
      },
      "ErrorResponseGeneric": {
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32",
            "minimum": 100,
            "maximum": 599
          },
          "id": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "UserRoleEnum": {
        "description": "The possible values for user role",
        "type": "string",
        "enum": [
          "owner",
          "editor",
          "viewer"
        ]
      },
      "User": {
        "type": "object",
        "properties": {
          "created_time": {
            "type": "integer",
            "format": "int64",
            "description": "Time at which the user was created"
          },
          "last_updated_time": {
            "type": "integer",
            "format": "int64",
            "description": "Time at which the user was last updated"
          },
          "roles": {
            "type": "array",
            "description": "This user's roles, scoped to the requested workspace or account",
            "items": {
              "$ref": "#/components/schemas/UserRole"
            }
          },
          "name": {
            "type": "string",
            "description": "The user's full name"
          },
          "nickname": {
            "type": "string",
            "description": "The user's nickname"
          },
          "company": {
            "type": "string",
            "description": "The user's company"
          },
          "id": {
            "type": "string",
            "description": "Unique identifier representing a specific user"
          },
          "given_name": {
            "type": "string",
            "description": "The user's first/given name"
          },
          "family_name": {
            "type": "string",
            "description": "The user's surname"
          },
          "email": {
            "type": "string",
            "description": "The user's E-Mail address"
          }
        }
      },
      "UserRole": {
        "type": "object",
        "required": [
          "role"
        ],
        "properties": {
          "workspace_id": {
            "type": "string",
            "description": "The workspace this role applies to. Preferred over `organization_id`. At least one of `workspace_id` or `organization_id` must be present."
          },
          "role": {
            "$ref": "#/components/schemas/UserRoleEnum"
          }
        }
      }
    },
    "responses": {
      "ErrorResponse": {
        "description": "Unknown error",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponseGeneric"
            }
          }
        }
      },
      "ErrorResponse401": {
        "description": "User not authenticated",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponseGeneric"
            }
          }
        }
      },
      "ErrorResponse403": {
        "description": "User not authorized",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponseGeneric"
            }
          }
        }
      },
      "ErrorResponse400": {
        "description": "Invalid or missing parameter",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponseGeneric"
            }
          }
        }
      }
    }
  },
  "security": [
    {
      "basicAuth": []
    },
    {
      "bearerAuth": []
    }
  ],
  "paths": {
    "/users": {
      "get": {
        "summary": "Query users",
        "operationId": "queryUsers",
        "description": "Query for users",
        "responses": {
          "200": {
            "description": "Results of the query",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserQueryResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ErrorResponse400"
          },
          "401": {
            "$ref": "#/components/responses/ErrorResponse401"
          },
          "403": {
            "$ref": "#/components/responses/ErrorResponse403"
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "email",
            "description": "E-Mail address to query",
            "required": false
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "workspace_id",
            "description": "Workspace ID to query. Must be provided and match the workspace of the api key provided.",
            "required": false
          },
          {
            "schema": {
              "format": "int32",
              "maximum": 200,
              "type": "integer",
              "minimum": 1
            },
            "in": "query",
            "name": "limit",
            "description": "Maximum number of users to return in a single response. Additional pages of results can be retrieved by passing the cursor (returned in the results) on a subsequent call.",
            "required": false
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "cursor",
            "description": "Cursor to use for pagination",
            "required": false
          },
          {
            "schema": {
              "default": false,
              "type": "boolean"
            },
            "in": "query",
            "name": "include_historic",
            "description": "Include all users with audit history in the workspace, such as former workspace users.",
            "required": false
          }
        ],
        "tags": [
          "User"
        ]
      }
    }
  },
  "tags": [
    {
      "name": "User"
    }
  ]
}
```