---
updatedAt: 2026-06-02T12:53:51.000Z
agentTools:
  projectIndex: https://docs.trustpair.com/llms.txt
---

# Retrieve users within the workspaces

Retrieves a paginated list of all users who have access to the authenticated customer's workspace.

This endpoint allows you to:
- List all users with access to the workspace
- Filter users by roles (e.g., override reviewers)
- Sort results by creation date
- Paginate through large result sets

Results are sorted by creation date (newest first) by default.

**Required permissions:**
- `users_read`


# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "TRUSTPAIR API",
    "version": "v1",
    "description": "The Trustpair API is organized around REST. Our API has predictable resource-oriented URLs, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.\n\n# Definitions\nThe following API documentation is divided into different definitions. Switch between definitions using the select located at the top right of the page.\n\n# Authentication\n\nThe Trustpair API uses token to authenticate requests.\n\nThe Bearer authentication token must be provided with the request as a header: `Authorization: Bearer <token>`\n\nAll API requests must be made over `HTTPS`. Calls made over plain `HTTP` will fail.\n\nAPI requests without authentication will also fail.\n\n\n### Error response\n\nReturns a `401 UNAUTHORIZED` code if the provided bearer token is not found.\n\n# Rate limits\nLimits are placed on the number of requests that can be made on the Trustpair API (the currently enforced limit being 100 requests over a 10 seconds periods). These limits help us provide the reliable and scalable API that our customers rely on.\n\nIf the defined limit is exceeded, the API will return an HTTP code `429 Too Many Requests`.\n\n\n# Pagination\n\nThe API returns paginated results for list endpoints. By default, the number of items returned is 10.\n\nTrustpair utilizes cursor-based pagination via the `starting_after` and `ending_before` parameters.\nBoth parameters take an existing object ID value and return objects in reverse chronological order.\nThe `ending_before` parameter returns objects listed before the named object. The `starting_after` parameter returns objects listed after the named object.\nIf both parameters are provided, only `ending_before` is used.\n\n\n| Arguments      | Description                                                         | Required                | Example                                                |\n| -------------  |:-------------:                                                      | -----:                  | ---:                                                   |\n| limit          | A limit on the number of objects to be returned, between 1 and 100. | optional, default is 10 | */?limit=2                                             |\n| starting_after | A cursor for use in pagination                                      | optional                | */?starting_after=c58ac778-67b5-4f98-ba33-a1e9aaf394eb |\n| ending_before  | A cursor for use in pagination                                      | optional                | */?ending_before=c58ac778-67b5-4f98-ba33-a1e9aaf394eb  |\n\n\n# Filters\n\nThe API results can be filtered according to different criteria on every endpoint.\n\nThere is no theoric limit on how many different elements can be submitted in a filter, only that the request header should be kept under 8kb.\n\n| Arguments            | Description                                                                                    | Example                                                                                                       |\n| -------------        |:-------------:                                                                                 | ---------------------------------------:                                                                      |\n| ids                  | Returns selected objects                                                                       | /api/v1/paid_payments?ids=a414df38-f13b-48b6-95f7-f941ca121f28,a414df38-f13b-48b6-95f7-f941ca121f29           |\n| recents              | Returns objects evaluated in the last 24 hours                                                 | /api/v1/company_account_audits/recents                                                                        |\n| recents/?last_update | Returns the objects evaluated from the given date (included) (format: `%d/%m/%Y`)              | /api/v1/payment_checks/recents?last_update='01/01/2021'                                                       |\n| state                | Filters by global state (in `pending`, `favorable`, `unfavorable`, `anomaly` or `unevaluated`) | api/v1/company_account_checks/?state=unfavorable                                                              |\n\n# HTTP Codes\n\nTrustpair uses conventional HTTP response codes to indicate the success or failure of an API request.\n\n| Code                       | Description                                                             |\n| -------------              |:-------------:                                                          |\n| 200 - OK                   | Everything worked as expected                                           |\n| 202 - Accepted             | The request has been accepted and processing has not been completed yet |\n| 401 - Unauthorized         | No valid token was provided                                             |\n| 403 - Forbidden            | The token doesn't have permissions for the request                      |\n| 404 - Not found            | The requested resource doesn't exist                                    |\n| 422 - Unprocessable Entity | The request format was invalid                                          |\n| 429 - Too many requests    | The requests limit is exceeded                                          |\n\n# Webhooks\n\nThe webhook events documentation can be found by selecting `Webhooks - V1` in the [definitions](#definitions) select.\n\n"
  },
  "servers": [
    {
      "url": "https://app-sandbox.trustpair.com/"
    }
  ],
  "paths": {
    "/api/v1/users/": {
      "get": {
        "summary": "Retrieve users within the workspaces",
        "tags": [
          "Users"
        ],
        "description": "Retrieves a paginated list of all users who have access to the authenticated customer's workspace.\n\nThis endpoint allows you to:\n- List all users with access to the workspace\n- Filter users by roles (e.g., override reviewers)\n- Sort results by creation date\n- Paginate through large result sets\n\nResults are sorted by creation date (newest first) by default.\n\n**Required permissions:**\n- `users_read`\n",
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "Accept-Language",
            "in": "header",
            "schema": {
              "type": "string",
              "enum": [
                "en",
                "fr"
              ]
            },
            "required": false,
            "description": "Specifies the preferred language for the response. Supported languages:\n* `en` - English\n* `fr` - French\n\nIf not provided, the default language will be used.\n",
            "example": "en"
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "required": false,
            "description": "Maximum number of users to return in the response.\n\n**Constraints:**\n* Minimum: 1\n* Maximum: 100\n\nIf not specified, the default pagination limit will be applied.\n",
            "example": 10
          },
          {
            "name": "starting_after",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": false,
            "description": "**Pagination cursor** - returns users created *after* the user\nwith this ID.\n\n* Results are ordered by creation date\n* Cannot be used together with `ending_before`\n* Must be a valid UUID\n",
            "example": "123e4567-e89b-12d3-a456-426614174000"
          },
          {
            "name": "ending_before",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": false,
            "description": "**Pagination cursor** - returns users created *before* the user\nwith this ID.\n\n* Results are ordered by creation date\n* Cannot be used together with `starting_after`\n* Must be a valid UUID\n",
            "example": "123e4567-e89b-12d3-a456-426614174000"
          },
          {
            "name": "sort",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "created_at",
                "-created_at"
              ]
            },
            "required": false,
            "description": "Field and direction to sort results by.\n\n**Format:**\n* `created_at` - ascending order (oldest first)\n* `-created_at` - descending order (newest first)\n\n**Supported fields:** `created_at`\n",
            "example": "-created_at"
          },
          {
            "name": "filters[roles]",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "override_reviewer"
                ]
              }
            },
            "required": false,
            "description": "Filter users by their assigned roles in the workspace.\n\n**Supported role values:**\n* `override_reviewer` - Users who can review (approve/reject) overrides\n\nMultiple values can be provided to filter by multiple roles.\n",
            "example": "override_reviewer"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/user_details"
                      }
                    },
                    "links": {
                      "$ref": "#/components/schemas/links"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/meta"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized response code",
            "content": {
              "application/json": {
                "examples": {
                  "With invalid token": {
                    "value": {
                      "message": "Bearer token invalid or missing"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden response code",
            "content": {
              "application/json": {
                "examples": {
                  "Without required permissions": {
                    "value": {
                      "message": "Access requires permission: 'users_read'"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity response code",
            "content": {
              "application/json": {
                "examples": {
                  "With limit that exceeds allowed number": {
                    "value": {
                      "message": "Limit must be less than or equal to 100",
                      "errors": [
                        {
                          "code": "less_than_or_equal_to",
                          "title": "must be less than or equal to 100",
                          "detail": "Limit must be less than or equal to 100",
                          "source": {
                            "parameter": "limit"
                          }
                        }
                      ]
                    }
                  },
                  "With limit that is below allowed number": {
                    "value": {
                      "message": "Limit must be greater than 0",
                      "errors": [
                        {
                          "code": "greater_than",
                          "title": "must be greater than 0",
                          "detail": "Limit must be greater than 0",
                          "source": {
                            "parameter": "limit"
                          }
                        }
                      ]
                    }
                  },
                  "With invalid sort": {
                    "value": {
                      "message": "Sort invalid value: foo and Sort invalid value: bar",
                      "errors": [
                        {
                          "code": "invalid_sort_field",
                          "title": "invalid value: foo",
                          "detail": "Sort invalid value: foo",
                          "source": {
                            "parameter": "sort"
                          }
                        },
                        {
                          "code": "invalid_sort_field",
                          "title": "invalid value: bar",
                          "detail": "Sort invalid value: bar",
                          "source": {
                            "parameter": "sort"
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "tags": [
    {
      "name": "Users",
      "description": "API endpoint for accessing user information within your workspace.\nThis endpoint provides the ability to list users who have access to your workspace,\nfilter users by roles (such as override reviewers), and retrieve user profile details.\nThis information is essential for integrating user management with your internal systems.\n"
    }
  ],
  "components": {
    "securitySchemes": {
      "bearer": {
        "type": "http",
        "scheme": "bearer"
      }
    },
    "schemas": {
      "user_details": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "trustpair/user"
            ]
          },
          "id": {
            "type": "string",
            "example": "4b9a21a1-c3e7-4635-8df2-5775a1603152"
          },
          "attributes": {
            "type": "object",
            "properties": {
              "created_at": {
                "type": "string",
                "format": "date-time",
                "example": "2025-10-10T12:34:56Z"
              },
              "last_name": {
                "type": "string",
                "example": "Doe"
              },
              "first_name": {
                "type": "string",
                "example": "John"
              },
              "full_name": {
                "type": "string",
                "example": "John Doe"
              },
              "email": {
                "type": "string",
                "format": "email",
                "example": "example@example.com"
              },
              "roles": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "override_reviewer"
                  ],
                  "example": "override_reviewer"
                }
              }
            }
          }
        }
      },
      "meta": {
        "type": "object",
        "properties": {
          "count": {
            "type": "integer",
            "example": 10
          },
          "total": {
            "type": "integer",
            "example": 122
          }
        }
      },
      "links": {
        "type": "object",
        "properties": {
          "self": {
            "type": "string",
            "example": "https://trustpair.com/api/v1/resources?starting_after=4b9a21a1-c3e7-4635-8df2-5775a1603152"
          },
          "first": {
            "type": "string",
            "example": "https://trustpair.com/api/v1/resources"
          },
          "next": {
            "type": "string",
            "nullable": true,
            "example": "https://trustpair.com/api/v1/resources?starting_after=4b9a21a1-c3e7-4635-8df2-5775a1603152"
          },
          "prev": {
            "type": "string",
            "nullable": true,
            "example": "https://trustpair.com/api/v1/resources?ending_before=4b9a21a1-c3e7-4635-8df2-5775a1603152"
          }
        }
      }
    }
  }
}
```