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

# Update Prompt Schedule

> Turns scheduled prompt runs on or off, sets the organization's default frequency, and sets answer engines or coding-agent harnesses differently from it. Only what you send changes. Daily is recommended: running less often leaves less data to analyze and work out how to improve. Choose which engines and agents run each topic's prompts with `PUT /v2/prompts/targets`.



## OpenAPI

````yaml /openapi.json patch /v2/prompts/schedule
openapi: 3.1.0
info:
  title: Lightsage Public API
  description: Public API for Lightsage CLI and external integrations.
  version: 1.0.0
servers:
  - url: https://api.lightsage.com
    description: Production
security: []
tags:
  - name: Status
    description: Check API availability and validate the calling API key.
  - name: Visibility
    description: >-
      Measure visibility, citations, competitors, and prompt performance across
      answer platforms.
  - name: Prompts
    description: Manage tracked prompts and topics, and inspect their stored runs.
  - name: Opportunities
    description: Review ranked opportunities computed from prompt visibility results.
  - name: Tasks
    description: Manage the persisted action queue and task lifecycle.
  - name: Library
    description: >-
      Track the pages you publish and the redirects you set up: their AI answer
      citations and agent visits per day, and whether each is helping.
  - name: Site Audits
    description: Review website audit results and page-level findings.
  - name: Agent Analytics
    description: >-
      See which coding agents, AI bots, and people visit your tracked sites,
      which pages they read, which pages return errors, and where the visits
      come from.
  - name: Evals
    description: Define eval tasks, judges, subjects, and saved configurations.
  - name: Eval Templates
    description: >-
      Select reusable judges, targets, schedules, metadata, and runtime settings
      with `POST /v2/eval-templates`, then copy only those settings into
      prompt-specific evals with `POST /v2/evals/batch`. Templates never contain
      prompts and remain independent from evals created from them.
  - name: Eval Runs
    description: Start eval runs and inspect their lifecycle state.
  - name: Eval Results
    description: Review completed eval outcomes and diagnostic details.
  - name: Agent Preference
    description: >-
      Compare your company head-to-head with a tracked competitor. Create a
      comparison with `POST /v2/agent-preference/evals`, run it with `POST
      /v2/eval-runs`, then read which company agents recommended.
  - name: Plugin Evals
    description: >-
      Download a day's ChatGPT plugin eval results: every run with and without
      the plugin, plus its insights report.
  - name: Agents
    description: List runnable coding-agent harness and model combinations.
  - name: Repositories
    description: Manage reusable Git repository workspaces.
  - name: Environments
    description: List reusable runtime environments without exposing secret values.
  - name: MCP Servers
    description: List reusable MCP server integrations without exposing credentials.
  - name: CLIs
    description: List reusable command-line interfaces without exposing setup commands.
  - name: Skills
    description: List reusable skills available to workflows and evals.
paths:
  /v2/prompts/schedule:
    patch:
      tags:
        - Prompts
      summary: Update Prompt Schedule
      description: >-
        Turns scheduled prompt runs on or off, sets the organization's default
        frequency, and sets answer engines or coding-agent harnesses differently
        from it. Only what you send changes. Daily is recommended: running less
        often leaves less data to analyze and work out how to improve. Choose
        which engines and agents run each topic's prompts with `PUT
        /v2/prompts/targets`.
      operationId: v2_prompt_schedule_update
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateV2PromptScheduleRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2PromptSchedule'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - LightsageApiKeyAuth: []
components:
  schemas:
    UpdateV2PromptScheduleRequest:
      properties:
        enabled:
          type: boolean
          title: Enabled
          description: Turn scheduled prompt runs on or off for the organization.
        frequency:
          type: string
          enum:
            - daily
            - every_other_day
            - weekly
          title: Frequency
          description: >-
            The organization's default frequency, for every answer engine and
            harness not set differently. `daily` is recommended.
            `every_other_day` and `weekly` are not recommended: they leave less
            data to analyze and work out how to improve.
        frequencies:
          anyOf:
            - items:
                $ref: '#/components/schemas/V2PromptRunFrequencyInput'
              type: array
              maxItems: 100
              minItems: 1
            - type: 'null'
          title: Frequencies
          description: >-
            Answer engines and harnesses to set differently from the default, or
            back to it with `default`. Those you leave out keep theirs.
      additionalProperties: false
      type: object
      title: UpdateV2PromptScheduleRequest
      examples:
        - frequencies:
            - frequency: weekly
              harness: cursor
            - answer_engine: chatgpt
              frequency: default
          frequency: daily
    V2PromptSchedule:
      properties:
        enabled:
          type: boolean
          title: Enabled
          description: Whether scheduled prompt runs are on.
        time:
          type: string
          title: Time
          description: Time of day the daily run starts, as `HH:MM`.
        timezone:
          type: string
          title: Timezone
          description: Time zone of `time`.
        last_run_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Last Run At
        next_run_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Next Run At
        frequency:
          type: string
          enum:
            - daily
            - every_other_day
            - weekly
          title: Frequency
          description: >-
            The organization's default frequency, for every answer engine and
            harness not set differently. `daily` is recommended.
            `every_other_day` and `weekly` are not recommended: they leave less
            data to analyze and work out how to improve.
        frequencies:
          items:
            $ref: '#/components/schemas/V2PromptRunFrequency'
          type: array
          title: Frequencies
          description: >-
            Every answer engine and harness the organization can run prompts on,
            with how often each runs. `overridden` marks the ones set
            differently from the default, and `in_use` the ones its prompts use
            now.
      type: object
      required:
        - enabled
        - time
        - timezone
        - frequency
      title: V2PromptSchedule
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    V2PromptRunFrequencyInput:
      properties:
        answer_engine:
          anyOf:
            - type: string
              enum:
                - chatgpt
                - google-ai-overviews
                - google-ai-mode
                - gemini-search
                - perplexity
                - claude
                - microsoft-copilot
            - type: 'null'
          title: Answer Engine
          description: Answer engine to set. Set this or `harness`, not both.
        harness:
          anyOf:
            - type: string
              minLength: 1
            - type: 'null'
          title: Harness
          description: >-
            Coding-agent harness to set, such as `claude-code`, from the
            `harness` field of `GET /v2/agents`. It covers every model on the
            harness. Set this or `answer_engine`, not both.
        frequency:
          type: string
          enum:
            - daily
            - every_other_day
            - weekly
            - default
          title: Frequency
          description: >-
            How often this answer engine or harness runs your prompts on
            schedule. `daily` is recommended. `every_other_day` and `weekly` are
            not recommended: they leave less data to analyze and work out how to
            improve. `default` puts it back on the organization's default
            frequency.
      additionalProperties: false
      type: object
      required:
        - frequency
      title: V2PromptRunFrequencyInput
    V2PromptRunFrequency:
      properties:
        kind:
          type: string
          enum:
            - answer_engine
            - coding_agent
          title: Kind
        answer_engine:
          anyOf:
            - type: string
            - type: 'null'
          title: Answer Engine
          description: Answer engine identifier, for answer engines.
        harness:
          anyOf:
            - type: string
            - type: 'null'
          title: Harness
          description: Coding-agent harness, such as `claude-code`, for agents.
        name:
          type: string
          title: Name
          description: Human-readable answer engine or harness name.
        models:
          items:
            type: string
          type: array
          title: Models
          description: Models scheduled on this harness. Empty for answer engines.
        frequency:
          type: string
          enum:
            - daily
            - every_other_day
            - weekly
          title: Frequency
          description: >-
            How often this answer engine or harness runs: its own frequency if
            `overridden`, otherwise the organization's default.
        overridden:
          type: boolean
          title: Overridden
          description: Whether it is set differently from the organization's default.
        in_use:
          type: boolean
          title: In Use
          description: >-
            Whether the organization's prompts run on this answer engine or
            harness now. The others are ones its plan allows, so their frequency
            can be set before prompts use them.
      type: object
      required:
        - kind
        - name
        - frequency
        - overridden
        - in_use
      title: V2PromptRunFrequency
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    LightsageApiKeyAuth:
      type: apiKey
      in: header
      name: X-Lightsage-Api-Key

````

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