> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rio.trade/llms.txt
> Use this file to discover all available pages before exploring further.

# Get all users

<Warning>
  **v1 (legacy).** This page documents the API before the v2 update. The v1
  format is not enabled for new accounts and must be enabled on your account by
  your account manager. New integrations should use the
  [current documentation](/introduction). To update an existing integration,
  follow the [migration guide](/migration).
</Warning>

### Additional information.

<Note>
  If no value is entered for any filter, the current user information is returned.

  <Accordion title="Click here to see the schema">
    ```json theme={null}
    {
      "platformFeeRanges": {
        "MX": {
          "buy": [],
          "sell": []
        },
        "PE": {
          "buy": [],
          "sell": []
        },
        "CO": {
          "buy": [],
          "sell": []
        }
      },
      "invoicing": {
        "MX": {
          "fiscalRegimenCode": 605
        }
      },
      "individualData": {
        "firstName": "Name",
        "middleName": "Middle",
        "lastName": "Last",
        "birthday": "1988-06-06T00:00:00.000Z"
      },
      "createdAt": "2024-05-28T19:08:48.590Z",
      "type": "individual",
      "phoneNumber": "+526589562354",
      "email": "testing@rio.trade",
      "address": {
        "street1": "Street",
        "street2": "Street",
        "city": "City",
        "state": "State",
        "country": "MX",
        "postalCode": "12345"
      },
      "onboarding": {
        "country": "MX",
        "status": "approved",
        "hasAcceptedTerms": true
      },
      "id": "66562bc04fe8bf83c577c178"
    }
    ```
  </Accordion>
</Note>


## OpenAPI

````yaml v1/api-reference/users-docs.json GET /api/users
openapi: 3.0.0
info:
  version: v1.0.0
  title: Users API (legacy v1)
  description: API for managing users in the Rio platform
servers:
  - url: https://app.sandbox.rio.trade
security:
  - apiKeyAuth: []
paths:
  /api/users:
    get:
      summary: Get all users
      parameters:
        - $ref: '#/components/parameters/typeQueryParameter'
        - $ref: '#/components/parameters/brokerIdQueryParameter'
        - $ref: '#/components/parameters/searchQueryParameter'
        - $ref: '#/components/parameters/authIdQueryParameter'
        - $ref: '#/components/parameters/firstNameQueryParameter'
        - $ref: '#/components/parameters/lastNameQueryParameter'
        - $ref: '#/components/parameters/businessNameQueryParameter'
        - $ref: '#/components/parameters/onboardingStatusQueryParameter'
        - $ref: '#/components/parameters/pageQueryParameter'
        - $ref: '#/components/parameters/limitQueryParameter'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/responseUsersSchema'
          description: OK
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/unauthorizedSchema'
          description: Unauthorized
components:
  parameters:
    typeQueryParameter:
      name: type
      in: query
      description: Type of user by which you want to filter.
      schema:
        type: string
        enum:
          - business
          - individual
    brokerIdQueryParameter:
      name: brokerId
      in: query
      description: Id of the broker for which you want to get the list of users.
      schema:
        type: string
        example: 655f4084b96e4fb76f5a0e6e
    searchQueryParameter:
      name: search
      in: query
      description: Allows you to search for any text.
      schema:
        type: string
        example: Name
    authIdQueryParameter:
      name: authId
      in: query
      description: Id of the user for which you want to get the list of users.
      schema:
        type: string
        example: 665f4084b96e4fb76f5a0e0c
    firstNameQueryParameter:
      name: firstName
      in: query
      description: First name of the individual to be searched.
      schema:
        type: string
    lastNameQueryParameter:
      name: lastName
      in: query
      description: Last name of the individual to be searched.
      schema:
        type: string
    businessNameQueryParameter:
      name: businessName
      in: query
      description: Name of the business to be searched.
      schema:
        type: string
    onboardingStatusQueryParameter:
      name: onboardingStatus
      in: query
      description: Onboarding status by which you want to filter.
      schema:
        type: string
        enum:
          - none
          - onboarding
          - review
          - approved
          - declined
    pageQueryParameter:
      name: page
      in: query
      description: Used to specify the current page you want to get in the paging results.
      schema:
        type: integer
    limitQueryParameter:
      name: limit
      in: query
      description: >-
        Used to specify the maximum number of records to be returned on a single
        page.
      schema:
        type: integer
  schemas:
    responseUsersSchema:
      type: array
      items:
        type: object
        properties:
          individualData:
            type: object
            properties:
              firstName:
                type: string
                description: First name of the user.
              middleName:
                type: string
                description: Middle name of the user.
              lastName:
                type: string
                description: Last name of the user.
          businessData:
            type: object
            properties:
              businessName:
                type: string
                description: Business Name
          createdAt:
            type: string
            description: Creation date of the user.
            example: '2024-05-29T15:36:03.225Z'
          type:
            type: string
            description: Type of the user.
            enum:
              - business
              - individual
          email:
            type: string
            description: Email of the user.
            example: testing@rio.trade
          brokerId:
            type: string
            description: Broker ID of the user.
            example: 66562bc04fe8bf83c577c178
          onboarding:
            type: object
            properties:
              status:
                type: string
                description: The onboarding status of the user.
                enum:
                  - none
                  - onboarding
                  - review
                  - approved
                  - declined
              country:
                type: string
                description: Country of the user's address.
                enum:
                  - MX
                  - PE
                  - CO
              hasAcceptedTerms:
                type: boolean
                description: Indicates if the user has accepted the terms and conditions.
                example: true
          id:
            type: string
            description: ID of the user.
            example: 66574b634fe8bf83c57813ac
          platformFeeRanges:
            type: object
            properties:
              MX:
                type: object
                properties:
                  buy:
                    type: array
                    items:
                      type: object
                      properties:
                        min:
                          type: number
                        max:
                          type: number
                        fee:
                          type: number
                        nextDaySettlementFee:
                          type: number
                        _id:
                          type: string
                  sell:
                    type: array
                    items:
                      type: object
                      properties:
                        min:
                          type: number
                        max:
                          type: number
                        fee:
                          type: number
                        nextDaySettlementFee:
                          type: number
                        _id:
                          type: string
              PE:
                type: object
                properties:
                  buy:
                    type: array
                    items:
                      type: object
                  sell:
                    type: array
                    items:
                      type: object
              CO:
                type: object
                properties:
                  buy:
                    type: array
                    items:
                      type: object
                  sell:
                    type: array
                    items:
                      type: object
          accumulatedVolumeInUSD:
            type: object
            properties:
              MX:
                type: object
                properties:
                  buy:
                    type: number
                  sell:
                    type: number
              PE:
                type: object
                properties:
                  buy:
                    type: number
                  sell:
                    type: number
          attributes:
            type: array
            items:
              type: string
            description: User attributes
          serviceFee:
            type: object
            properties:
              MX:
                type: object
                properties:
                  buy:
                    type: number
                  sell:
                    type: number
              PE:
                type: object
                properties:
                  buy:
                    type: number
                  sell:
                    type: number
    unauthorizedSchema:
      type: object
      properties:
        errors:
          type: array
          items:
            type: object
            properties:
              code:
                type: number
                example: 19
              message:
                type: string
                example: Not authorized
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.