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

# List Events

> Get a paginated list of events with optional filters



## OpenAPI

````yaml GET /api/v1/events
openapi: 3.1.0
info:
  title: Cuey API
  description: >-
    REST API for scheduling webhooks with precision timing. Schedule one-time
    events or create recurring cron jobs.
  version: 1.0.0
  contact:
    email: support@cuey.dev
servers:
  - url: https://cuey.dev
    description: Production server
security:
  - bearerAuth: []
tags:
  - name: Events
    description: Endpoints for managing scheduled events
  - name: Crons
    description: Endpoints for managing recurring cron jobs
paths:
  /api/v1/events:
    get:
      tags:
        - Events
      summary: List events
      description: Get a paginated list of events with optional filters
      operationId: listEvents
      parameters:
        - name: page
          in: query
          description: Page number (0-indexed)
          schema:
            type: integer
            default: 0
            minimum: 0
        - name: limit
          in: query
          description: Items per page
          schema:
            type: integer
            default: 100
            minimum: 1
            maximum: 1000
        - name: status
          in: query
          description: Filter by status
          schema:
            type: string
            enum:
              - pending
              - processing
              - success
              - failed
        - name: cron_id
          in: query
          description: Filter by cron ID
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EventsPaginatedResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalServerError'
      x-codeSamples:
        - lang: TypeScript
          label: TypeScript SDK
          source: |-
            import { cuey } from 'cuey';

            const { data: events, pagination } = await cuey.events.list({
              page: 0,
              limit: 10,
              status: 'pending'
            });
components:
  schemas:
    EventsPaginatedResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Event'
        pagination:
          $ref: '#/components/schemas/Pagination'
      required:
        - data
        - pagination
    Event:
      type: object
      properties:
        id:
          type: string
          format: uuid
        cron_id:
          type: string
          format: uuid
          nullable: true
        retry_of:
          type: string
          format: uuid
          nullable: true
        scheduled_at:
          type: string
          format: date-time
        executed_at:
          type: string
          format: date-time
          nullable: true
        status:
          type: string
          enum:
            - pending
            - processing
            - success
            - failed
        webhook_url:
          type: string
          format: uri
        method:
          type: string
          enum:
            - GET
            - POST
            - PUT
            - PATCH
            - DELETE
            - HEAD
            - OPTIONS
        headers:
          type: object
          additionalProperties:
            type: string
          nullable: true
        payload:
          type: object
          nullable: true
        retry_config:
          $ref: '#/components/schemas/RetryConfig'
          nullable: true
        response_status:
          type: integer
          nullable: true
        response_headers:
          type: object
          nullable: true
        response_body:
          type: string
          nullable: true
        response_duration:
          type: integer
          nullable: true
        response_error:
          type: string
          nullable: true
        created_at:
          type: string
          format: date-time
          nullable: true
        updated_at:
          type: string
          format: date-time
          nullable: true
        team_id:
          type: string
          format: uuid
          nullable: true
      required:
        - id
        - scheduled_at
        - status
        - webhook_url
        - method
    Pagination:
      type: object
      properties:
        page:
          type: integer
        limit:
          type: integer
        total:
          type: integer
      required:
        - page
        - limit
        - total
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
            code:
              type: string
              enum:
                - UNAUTHORIZED
                - NOT_FOUND
                - BAD_REQUEST
                - VALIDATION_ERROR
                - INTERNAL_SERVER_ERROR
            details:
              type: object
          required:
            - message
            - code
      required:
        - error
    RetryConfig:
      type: object
      required:
        - maxRetries
        - backoffMs
        - backoffType
      properties:
        maxRetries:
          type: integer
          minimum: 1
          maximum: 10
          description: Maximum number of retry attempts
        backoffMs:
          type: integer
          minimum: 100
          maximum: 5000
          description: Backoff delay in milliseconds
        backoffType:
          type: string
          enum:
            - exponential
            - linear
          description: Backoff strategy type
  responses:
    BadRequest:
      description: Bad request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Unauthorized - Invalid or missing API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    InternalServerError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        API key authentication. Include your API key in the Authorization header
        as: Bearer <your-api-key>

````