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

# List requests

> List the requests of the company (paginated), of any employee and status, newest first by default. Personal data change requests carry the requested changes in `answers`, in clear.

Version:
v4


## OpenAPI

````yaml openapi-v2.json GET /request/v4/requests
openapi: 3.0.0
info:
  title: Sesame Public API v2
  description: >-
    Public API v2 — additive surface `/public/{context}/v{N}`,
    endpoint-versioned from v4
  version: 1.0.0
servers:
  - url: https://api.sesamehr.com
    description: Production
security:
  - Bearer: []
paths:
  /request/v4/requests:
    get:
      tags:
        - Requests
      summary: List requests
      description: >-
        List the requests of the company (paginated), of any employee and
        status, newest first by default. Personal data change requests carry the
        requested changes in `answers`, in clear.
      operationId: ListRequests
      parameters:
        - name: page
          in: query
          required: false
          schema:
            type: integer
            default: 1
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            default: 20
            maximum: 300
        - name: statuses
          in: query
          description: Comma-separated statuses.
          required: false
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
              enum:
                - accepted
                - pending
                - rejected
        - name: requestTypeIds
          in: query
          description: >-
            Comma-separated request type ids. An id that does not exist in the
            company is ignored.
          required: false
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
              format: uuid
        - name: employeeId
          in: query
          description: >-
            Only the requests of this employee. An employee that does not exist
            in the company gives an empty page.
          required: false
          schema:
            type: string
            format: uuid
        - name: createdFrom
          in: query
          description: >-
            Created at or after this ISO 8601 date-time with zone. Encode `+` as
            `%2B`.
          required: false
          schema:
            type: string
            format: date-time
        - name: createdTo
          in: query
          description: >-
            Created at or before this ISO 8601 date-time with zone. Encode `+`
            as `%2B`.
          required: false
          schema:
            type: string
            format: date-time
        - name: sort
          in: query
          description: >-
            Field: `createdAt`. A leading `-` sorts descending. Ties are broken
            by `id` ascending.
          required: false
          schema:
            type: string
            default: '-createdAt'
      responses:
        '200':
          description: The paginated requests.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListRequestsResponse'
        '401':
          description: Missing or invalid API key
        '403':
          description: API consumer lacks permission over the requested resource
        '422':
          description: Validation error
components:
  schemas:
    ListRequestsResponse:
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/RequestEntry'
        meta:
          $ref: '#/components/schemas/PaginationMetaEntry'
      type: object
    RequestEntry:
      properties:
        id:
          type: string
          format: uuid
        title:
          type: string
        status:
          type: string
          enum:
            - accepted
            - pending
            - rejected
        employeeId:
          type: string
          format: uuid
        requestType:
          $ref: '#/components/schemas/RequestTypeEntry'
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        resolvedAt:
          type: string
          format: date-time
          nullable: true
        resolvedById:
          type: string
          format: uuid
          nullable: true
        flowTotalLevels:
          description: >-
            Number of levels of the approval flow. Null when the request has no
            flow.
          type: integer
          nullable: true
        flowCurrentLevel:
          description: Level in progress. Null when the request has no flow.
          type: integer
          nullable: true
        answers:
          description: >-
            Form answers, or the requested changes of a personal data request
            (`questionType` = `personal_data`), one per field.
          type: array
          items:
            oneOf:
              - $ref: '#/components/schemas/RequestAnswerEntry'
              - $ref: '#/components/schemas/RequestPersonalDataChangeEntry'
      type: object
    PaginationMetaEntry:
      properties:
        currentPage:
          description: Current page number (1-based).
          type: integer
        lastPage:
          description: Last available page number.
          type: integer
        total:
          description: Total number of items across all pages.
          type: integer
        perPage:
          description: Number of items per page.
          type: integer
      type: object
    RequestTypeEntry:
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        icon:
          type: string
        archivedAt:
          type: string
          format: date-time
          nullable: true
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        responseDeadlineEnabled:
          type: boolean
        responseDeadlineDays:
          type: integer
          nullable: true
      type: object
    RequestAnswerEntry:
      properties:
        questionName:
          description: Title of the form question. Null when the question no longer exists.
          type: string
          nullable: true
        questionType:
          description: >-
            Type of the form question, for example `text`, `radio` or `check`.
            Null when the question no longer exists.
          type: string
          nullable: true
        value:
          description: >-
            Answer. For questions with options, the text of the chosen option;
            when several are chosen, a JSON list serialized in the string.
          type: string
          nullable: true
        previousValue:
          description: Always null for a form answer.
          type: string
          nullable: true
      type: object
    RequestPersonalDataChangeEntry:
      properties:
        questionName:
          description: >-
            Key of the requested employee field. It does not always match the
            field name of the employee API (`dni` here, `nid` there; `birthday`
            here, `dateOfBirth` there).
          type: string
          enum:
            - accountNumber
            - address
            - bankingEntity
            - beneficiaryName
            - bic
            - birthday
            - childrenCount
            - city
            - country
            - disability
            - dni
            - email
            - emergencyPhone
            - firstName
            - gender
            - identityNumberType
            - lastName
            - maritalStatus
            - nationality
            - personalEmail
            - phone
            - postalCode
            - province
            - secondaryDni
            - secondaryIdentityNumberType
            - workPhone
        questionType:
          type: string
          enum:
            - personal_data
        value:
          description: >-
            Requested value, as stored in the request and untranslated. A list
            value (`nationality`) is a JSON list serialized in the string. Null
            when the field is requested to be emptied.
          type: string
          nullable: true
        previousValue:
          description: >-
            Value the employee had when the request was created. Null when the
            field was empty.
          type: string
          nullable: true
      type: object
  securitySchemes:
    Bearer:
      type: http
      description: 'Sesame Public API consumer token (Authorization: Bearer <token>)'
      scheme: bearer

````

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