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

# Get Leaves

> Retrieve leave records using epoch timestamp pagination

Leaves are paginated using Unix epoch timestamps for chronological ordering.

### Cursor Format

* Type: Unix Epoch (int64)
* Example: `1702544876`
* Ordering: Descending (newest first)


## OpenAPI

````yaml GET /api/v1/leaves
openapi: 3.0.3
info:
  title: ERM Public API
  version: 1.0.0
  description: API for Employee Resource Management
servers:
  - url: https://core.ermbot.xyz
    description: ERM API Server
security:
  - ApiKeyAuth: []
    GuildAuth: []
paths:
  /api/v1/leaves:
    get:
      summary: Get all leaves
      parameters:
        - name: after
          in: query
          schema:
            type: integer
            format: int64
        - name: limit
          in: query
          schema:
            type: integer
      responses:
        '200':
          description: List of leaves
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LoaResponse'
components:
  schemas:
    LoaResponse:
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              id:
                type: object
                properties:
                  $oid:
                    type: string
              user_id:
                type: integer
                format: int64
              reason:
                type: string
              message_id:
                type: integer
                format: int64
              type_:
                type: string
              guild:
                type: integer
                format: int64
              expiry:
                type: integer
                format: int64
              expired:
                type: boolean
              accepted:
                type: boolean
              denied:
                type: boolean
              voided:
                type: boolean
        pagination:
          type: object
          properties:
            next_cursor:
              type: integer
              format: int64
            limit:
              type: integer
            has_more:
              type: boolean
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
    GuildAuth:
      type: apiKey
      in: header
      name: Guild

````