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

# Update HTTP Schedule

> Change one or more fields of an HTTP schedule.

Send only the fields you want to change. Any change re-registers the schedule, so `next_run_time` is recalculated.

Set `is_active` to `false` to pause the schedule or `true` to resume it.


## OpenAPI

````yaml openapi/scheduler.yaml PATCH /http-schedules/{schedule_id}
openapi: 3.0.3
info:
  title: Lyzr Scheduler and Webhooks API
  version: 1.1.0
  description: >-
    Scheduler service for running Lyzr agents on cron schedules, triggering
    agents from external systems through signed webhooks, and calling arbitrary
    HTTP endpoints on a cron schedule.
servers:
  - url: https://scheduler.studio.lyzr.ai
security:
  - ApiKeyAuth: []
tags:
  - name: Schedules
    description: Run an agent on a cron schedule.
  - name: Agent Webhooks
    description: Create and manage webhook URLs that trigger an agent.
  - name: Webhook Trigger
    description: Public endpoint external services call to trigger an agent.
  - name: HTTP Schedules
    description: Call any HTTP endpoint on a cron schedule.
paths:
  /http-schedules/{schedule_id}:
    patch:
      tags:
        - HTTP Schedules
      summary: Update HTTP schedule
      description: Change one or more fields of an HTTP schedule.
      parameters:
        - $ref: '#/components/parameters/ScheduleId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/HttpScheduleUpdate'
            example:
              cron_expression: 30 6 * * *
              timezone: America/New_York
      responses:
        '200':
          description: The updated HTTP schedule.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpScheduleResponse'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/ValidationError'
components:
  parameters:
    ScheduleId:
      name: schedule_id
      in: path
      required: true
      description: ID of the schedule.
      schema:
        type: string
        example: 66f1c2a9e4b0a1b2c3d4e5f6
  schemas:
    HttpScheduleUpdate:
      type: object
      description: All fields are optional. Only the fields you send are changed.
      properties:
        url:
          type: string
          description: Absolute URL to call.
        method:
          type: string
          enum:
            - GET
            - POST
            - PUT
            - PATCH
            - DELETE
        headers:
          type: object
          additionalProperties:
            type: string
          description: Replaces the stored headers.
        body:
          description: >-
            Request body. Objects and arrays are sent as JSON; any other value
            is sent as a raw string.
        timeout_seconds:
          type: number
          minimum: 1
          maximum: 600
        cron_expression:
          $ref: '#/components/schemas/CronExpression'
        timezone:
          type: string
        max_retries:
          type: integer
          minimum: 0
          maximum: 5
        retry_delay:
          type: integer
          minimum: 10
          maximum: 3600
        label:
          type: string
        is_active:
          type: boolean
          description: Set to `false` to pause or `true` to resume.
    HttpScheduleResponse:
      type: object
      required:
        - id
        - url
        - method
        - timeout_seconds
        - cron_expression
        - timezone
        - created_at
      properties:
        id:
          type: string
          example: 66f1c4d2e4b0a1b2c3d4e5f8
        url:
          type: string
          example: https://api.example.com/reports/refresh
        method:
          type: string
          example: POST
        headers:
          type: object
          additionalProperties:
            type: string
        body:
          description: Stored request body.
        timeout_seconds:
          type: number
          example: 120
        cron_expression:
          type: string
          example: 0 2 * * *
        timezone:
          type: string
          example: UTC
        max_retries:
          type: integer
          default: 3
        retry_delay:
          type: integer
          default: 60
        label:
          type: string
          nullable: true
          example: Nightly report refresh
        is_active:
          type: boolean
          default: true
          description: '`false` when the schedule is paused.'
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
          nullable: true
        next_run_time:
          type: string
          format: date-time
          nullable: true
          description: When the schedule will next fire. `null` while paused.
        last_run_at:
          type: string
          format: date-time
          nullable: true
        last_run_success:
          type: boolean
          nullable: true
        last_run_status:
          type: integer
          nullable: true
          description: HTTP status code returned by the target on the most recent run.
        last_attempt_count:
          type: integer
          nullable: true
          description: Number of attempts the most recent run took.
    CronExpression:
      type: string
      description: >-
        Five-field cron expression: `minute hour day month day_of_week`.
        Day-of-week follows standard cron numbering (0 or 7 = Sunday, 1 =
        Monday, ..., 6 = Saturday).
      example: 0 9 * * 1-5
    Error:
      type: object
      properties:
        detail:
          type: string
          example: Schedule not found
    HTTPValidationError:
      type: object
      properties:
        detail:
          type: array
          items:
            type: object
            properties:
              loc:
                type: array
                description: Path to the invalid field.
                items:
                  oneOf:
                    - type: string
                    - type: integer
              msg:
                type: string
                description: Human-readable error message.
              type:
                type: string
                description: Error type identifier.
  responses:
    Forbidden:
      description: The `x-api-key` header is missing or the key is invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            missing:
              summary: Missing API key
              value:
                detail: API key missing
            invalid:
              summary: Invalid API key
              value:
                detail: Invalid Permission
    NotFound:
      description: No resource with this ID exists for your API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    ValidationError:
      description: The request failed validation. The body lists each invalid field.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/HTTPValidationError'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: Lyzr API key. Required on every endpoint except Trigger Webhook.

````