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

# List Schedules

> Retrieve all schedules for the authenticated user. Returns an array of schedule objects with their current configuration and status.



## OpenAPI

````yaml GET /schedules
openapi: 3.1.0
info:
  title: Cronhost API
  description: >-
    Schedule HTTP requests with cron expressions. Cronhost allows you to
    automate HTTP requests on a schedule using familiar cron syntax.
  license:
    name: MIT
  version: 1.0.0
  contact:
    name: Cronhost Support
    email: help@cronho.st
    url: https://cronho.st
servers:
  - url: https://cronho.st/api/v1
    description: Production API
security:
  - apiKeyAuth: []
tags:
  - name: Schedules
    description: Create, manage, and control scheduled HTTP requests
  - name: Jobs
    description: Monitor and retrieve job execution details
paths:
  /schedules:
    get:
      tags:
        - Schedules
      summary: List Schedules
      description: >-
        Retrieve all schedules for the authenticated user. Returns an array of
        schedule objects with their current configuration and status.
      operationId: getSchedules
      responses:
        '200':
          description: Successfully retrieved schedules
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Schedule'
                  success:
                    type: boolean
                    example: true
                required:
                  - data
                  - success
              examples:
                successResponse:
                  summary: Successful response with schedules
                  value:
                    data:
                      - id: schedule_123
                        name: Daily Health Check
                        description: Check API health every day at 9 AM
                        cronExpression: 0 9 * * *
                        timezone: America/New_York
                        endpoint: https://api.example.com/health
                        httpMethod: GET
                        body: null
                        headers: '{"User-Agent": "Cronhost-Monitor"}'
                        isEnabled: true
                        nextRunAtUtc: '2024-01-15T14:00:00.000Z'
                        lastRunAtUtc: '2024-01-14T14:00:00.000Z'
                        createdAt: '2024-01-01T12:00:00.000Z'
                        updatedAt: '2024-01-14T14:00:00.000Z'
                        maxRetries: 3
                        timeoutSeconds: 30
                    success: true
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  schemas:
    Schedule:
      type: object
      required:
        - id
        - name
        - cronExpression
        - timezone
        - endpoint
        - httpMethod
        - isEnabled
        - nextRunAtUtc
        - createdAt
        - updatedAt
        - maxRetries
        - timeoutSeconds
      properties:
        id:
          type: string
          description: Unique schedule identifier
          example: schedule_123
        name:
          type: string
          description: Human-readable schedule name
          example: Daily Health Check
        description:
          type: string
          nullable: true
          description: Optional description of what the schedule does
          example: Check API health every day at 9 AM
        cronExpression:
          type: string
          description: Valid cron expression defining when to run
          example: 0 9 * * *
          pattern: >-
            ^\s*($|#|\w+\s*=|(\?|\*|(?:[0-5]?\d)(?:(?:-|\/|\,)(?:[0-5]?\d))?(?:,(?:[0-5]?\d)(?:(?:-|\/|\,)(?:[0-5]?\d))?)*)\s+(\?|\*|(?:[0-5]?\d)(?:(?:-|\/|\,)(?:[0-5]?\d))?(?:,(?:[0-5]?\d)(?:(?:-|\/|\,)(?:[0-5]?\d))?)*)\s+(\?|\*|(?:[01]?\d|2[0-3])(?:(?:-|\/|\,)(?:[01]?\d|2[0-3]))?(?:,(?:[01]?\d|2[0-3])(?:(?:-|\/|\,)(?:[01]?\d|2[0-3]))?)*)\s+(\?|\*|(?:0?[1-9]|[12]\d|3[01])(?:(?:-|\/|\,)(?:0?[1-9]|[12]\d|3[01]))?(?:,(?:0?[1-9]|[12]\d|3[01])(?:(?:-|\/|\,)(?:0?[1-9]|[12]\d|3[01]))?)*)\s+(\?|\*|(?:[1-9]|1[012])(?:(?:-|\/|\,)(?:[1-9]|1[012]))?(?:L|W)?(?:,(?:[1-9]|1[012])(?:(?:-|\/|\,)(?:[1-9]|1[012]))?(?:L|W)?)*|\?|\*|(?:JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC)(?:(?:-)(?:JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC))?(?:,(?:JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC)(?:(?:-)(?:JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC))?)*)\s+(\?|\*|(?:[0-6])(?:(?:-|\/|\,|#)(?:[0-6]))?(?:L)?(?:,(?:[0-6])(?:(?:-|\/|\,|#)(?:[0-6]))?(?:L)?)*|\?|\*|(?:MON|TUE|WED|THU|FRI|SAT|SUN)(?:(?:-)(?:MON|TUE|WED|THU|FRI|SAT|SUN))?(?:,(?:MON|TUE|WED|THU|FRI|SAT|SUN)(?:(?:-)(?:MON|TUE|WED|THU|FRI|SAT|SUN))?)*)(|\s)+(\?|\*|(?:|\d{4})(?:(?:-|\/|\,)(?:|\d{4}))?(?:,(?:|\d{4})(?:(?:-|\/|\,)(?:|\d{4}))?)*))$
        timezone:
          type: string
          description: IANA timezone identifier
          example: America/New_York
        endpoint:
          type: string
          format: uri
          description: Target HTTP endpoint URL
          example: https://api.example.com/health
        httpMethod:
          type: string
          enum:
            - GET
            - POST
            - PUT
            - DELETE
            - PATCH
          description: HTTP method to use for the request
          example: GET
        body:
          type: string
          nullable: true
          description: Request body for POST/PUT/PATCH requests
          example: '{"key": "value"}'
        headers:
          type: string
          nullable: true
          description: HTTP headers as JSON string
          example: >-
            {"User-Agent": "Cronhost-Monitor", "Content-Type":
            "application/json"}
        isEnabled:
          type: boolean
          description: Whether the schedule is currently active
          example: true
        nextRunAtUtc:
          type: string
          format: date-time
          nullable: true
          description: Next scheduled execution time in UTC
          example: '2024-01-15T14:00:00.000Z'
        lastRunAtUtc:
          type: string
          format: date-time
          nullable: true
          description: Last execution time in UTC
          example: '2024-01-14T14:00:00.000Z'
        createdAt:
          type: string
          format: date-time
          description: Schedule creation timestamp
          example: '2024-01-01T12:00:00.000Z'
        updatedAt:
          type: string
          format: date-time
          description: Last modification timestamp
          example: '2024-01-14T14:00:00.000Z'
        maxRetries:
          type: integer
          minimum: 0
          maximum: 10
          description: Maximum number of retry attempts
          example: 3
        timeoutSeconds:
          type: integer
          minimum: 1
          maximum: 300
          description: Request timeout in seconds
          example: 30
    ApiError:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - message
            - code
          properties:
            message:
              type: string
              description: Human-readable error message
            code:
              type: string
              description: Error code for programmatic handling
            details:
              description: Additional error details
  responses:
    UnauthorizedError:
      description: Authentication failed
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
          examples:
            missingApiKey:
              summary: Missing API key
              value:
                error:
                  message: API key is required
                  code: MISSING_API_KEY
            invalidApiKey:
              summary: Invalid API key
              value:
                error:
                  message: Invalid API key
                  code: INVALID_API_KEY
    InternalServerError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
          example:
            error:
              message: Internal server error
              code: INTERNAL_ERROR
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        API key for authentication. Get your API key from the [Cronhost
        dashboard](https://cronho.st/settings).

````