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

# List all users



## OpenAPI

````yaml GET /users
openapi: 3.0.1
info:
  title: Payroll API
  description: A full flagged payroll api provided by Teal
  version: 1.0.0
servers:
  - url: https://api.sandbox.goteal.co
    description: Sandbox server for experiments
  - url: https://api.goteal.co
    description: Production server
security:
  - ApiKeyAuth: []
  - MemberBearerAuth: []
paths:
  /users:
    description: >-
      A User represents the borrowers and end-users that give authorised access
      and/or upload their payslips to our API.
    get:
      summary: List all users.
      parameters:
        - name: offset
          in: query
          description: The offset to start at
          required: false
          schema:
            type: integer
            format: int32
            minimum: 1
            default: 0
        - name: limit
          in: query
          description: The number of items to return
          required: false
          schema:
            type: integer
            format: int32
            minimum: 1
            maximum: 100
            default: 20
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  pagination:
                    $ref: '#/components/schemas/Pagination'
                  users:
                    type: array
                    items:
                      $ref: '#/components/schemas/CreatedUser'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/UnauthorizedApiKey'
components:
  schemas:
    Pagination:
      type: object
      required:
        - offset
        - limit
        - count
      properties:
        offset:
          description: The offset to start at - zero based
          type: integer
          format: int32
          minimum: 1
          default: 0
          example: 75
        limit:
          type: integer
          format: int32
          minimum: 1
          maximum: 100
          default: 20
          example: 25
        count:
          type: integer
          format: int32
          example: 14
          minimum: 0
        total_count:
          type: integer
          format: int32
          example: 89
    CreatedUser:
      allOf:
        - required:
            - user_id
            - created_at
          properties:
            user_id:
              type: string
              format: uuid
              description: Unique identifier for user
            created_at:
              $ref: '#/components/schemas/Date'
              description: Creation time in UTC of the user
        - $ref: '#/components/schemas/User'
    Date:
      type: string
      format: date-time
      example: '2019-05-17T00:00:00.000Z'
    User:
      required:
        - forename
        - surname
        - date_of_birth
        - post_codes
        - payroll_period_months
      type: object
      properties:
        forename:
          description: Forename of the user.
          type: string
          example: John
        surname:
          description: Surname of the user.
          type: string
          example: Smith
        ni_number:
          description: National Insurance number of the user. Used for direct connections.
          type: string
          example: QQ123456C
        date_of_birth:
          $ref: '#/components/schemas/Date'
          description: Date of birth of the user. Used for direct connections.
        post_codes:
          description: >-
            One or more post codes of the user over the period of the check.
            Used for direct connections where we need to verify payroll data
            matches the user given current and past post codes.
          type: array
          items:
            type: string
          example:
            - SW1A 1AA
            - SW1A 1AB
        ext_id:
          description: >-
            External ID or any string there might be a need for saving alongside
            the User information. This is an optional identifier that can be
            used to reference the user in external systems.
          type: string
          nullable: true
          example: ext-12345
        recurring_checks_enabled:
          description: >-
            Determines if recurring checks are enabled for this user. Overrides
            the same setting if present in client level configuration.
          type: boolean
        recurring_check_frequency:
          description: >-
            Frequency of the recurring check for this user. Overrides the same
            setting if present in client level configuration. Available
            frequencies in production are [WEEKLY, DAILY]. Sandbox allows HOURLY
            frequency in addition.
          type: string
          example: WEEKLY
        recurring_check_end_date:
          $ref: '#/components/schemas/Date'
          description: >-
            End date of the recurring check schedule. Overrides the same setting
            if present in client level configuration.
        payroll_period_months:
          description: >-
            Lookback period of the payroll to search on account creation.
            Overrides the same setting if present in client level configuration.
          type: integer
          format: int32
        payslip_upload_enabled:
          type: boolean
          description: >-
            Determines if payslip upload is enabled for this user. Overrides the
            same setting if present in client level configuration.
        payroll_connections_enabled:
          type: boolean
          description: >-
            Determines if payroll connections feature is enabled for this user.
            Overrides the same setting if present in client level configuration.
    Error:
      required:
        - errors
      type: object
      properties:
        errors:
          type: array
          items:
            type: string
          description: An array of messages describing the errors
          example:
            - The request is missing the required field `name`
    Unauthorized:
      type: object
      properties:
        errors:
          type: string
          description: An array of messages describing the errors
          example:
            - No X-API-KEY header provided or wrong value
  responses:
    BadRequest:
      description: Bad request if one of the required parameters is missing
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    UnauthorizedApiKey:
      description: Unauthorized if the X-API-KEY is not provided or is wrong
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Unauthorized'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY
    MemberBearerAuth:
      type: http
      scheme: bearer
      description: >-
        Bearer token for authentication. The token should be the one returned by
        the "/members/signin"

````