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

# Get the project's schedule at a glance

> The project's primary (oldest) schedule — the one PATCH changes — plus `anyEnabled`, `soonestNextRunAt`, `scheduleCount` and `projectPauseReason` over all of its schedules. A project with no saved schedule returns `configured: false` with the scope a new schedule would get: every prompt and the project's platforms and countries. Use `/projects/{id}/schedules` for every schedule.



## OpenAPI

````yaml /api-reference/openapi.json get /projects/{id}/schedule
openapi: 3.1.0
info:
  title: OpenLens API
  version: 1.4.0
  description: >-
    Public REST API for OpenLens. Onboard clients, run scans across the major AI
    platforms, read visibility metrics, and download client-ready reports. Beta
    — endpoints may evolve before GA.
  contact:
    name: OpenLens support
    email: contact@aibread.com
servers:
  - url: https://openlens.com/api
security:
  - bearerAuth: []
tags:
  - name: Onboarding
  - name: Runs
  - name: Metrics
  - name: Citations
  - name: Deliverables
  - name: Resources
  - name: Account
paths:
  /projects/{id}/schedule:
    get:
      tags:
        - Resources
      summary: Get the project's schedule at a glance
      description: >-
        The project's primary (oldest) schedule — the one PATCH changes — plus
        `anyEnabled`, `soonestNextRunAt`, `scheduleCount` and
        `projectPauseReason` over all of its schedules. A project with no saved
        schedule returns `configured: false` with the scope a new schedule would
        get: every prompt and the project's platforms and countries. Use
        `/projects/{id}/schedules` for every schedule.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectScheduleSummary'
        '400':
          description: Missing or invalid request parameter.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Missing, malformed, or revoked API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: >-
            Monthly included API calls for your tier are used up (code
            `USAGE_LIMIT`). Body includes a `limit` object — `{ limitHit,
            currentTier, targetTier, feature, cap, used, resetAt }` — describing
            the cap and the upgrade that lifts it.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Resource not found or not owned by your account.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: >-
            Rate limit, project cap, or daily quota hit. Body includes a `code`
            field.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server error. Retry; if persistent, contact support.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    ProjectScheduleSummary:
      allOf:
        - $ref: '#/components/schemas/ProjectSchedule'
        - type: object
          properties:
            anyEnabled:
              type: boolean
              description: Whether any of the project's schedules is on.
            soonestNextRunAt:
              type:
                - string
                - 'null'
              format: date-time
              description: >-
                The soonest next run of the project's schedules that are on;
                null when none is.
            scheduleCount:
              type: integer
              description: How many schedules the project has.
            projectPauseReason:
              type:
                - string
                - 'null'
              description: >-
                Why the project's scheduled runs stopped: while none of its
                schedules is on, the `pauseReason` of the one paused most
                recently (latest update, then highest ID), which need not be the
                primary. Null while a schedule is on, or when every schedule was
                switched off by hand.
          required:
            - anyEnabled
            - soonestNextRunAt
            - scheduleCount
            - projectPauseReason
    Error:
      type: object
      properties:
        error:
          type: string
        code:
          type: string
          description: Stable machine code for programmatic handling, when applicable.
      required:
        - error
    ProjectSchedule:
      type: object
      properties:
        id:
          type:
            - string
            - 'null'
          description: The schedule's ID; null until it is saved.
        name:
          type:
            - string
            - 'null'
          description: Optional label for telling a project's schedules apart.
        configured:
          type: boolean
          description: False until a schedule is saved for the project.
        enabled:
          type: boolean
        frequency:
          type: string
          enum:
            - daily
            - weekly
            - monthly
        hour:
          type: integer
          minimum: 0
          maximum: 23
          deprecated: true
          description: >-
            UTC hour of `startsAt` (9 until configured). Prefer `startsAt` +
            `timezone`.
        startsAt:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            The first run; later runs repeat from it in `timezone`. Null until
            configured.
        timezone:
          type:
            - string
            - 'null'
          description: IANA time zone the schedule repeats in. Null until configured.
        nextScheduledRunAt:
          type:
            - string
            - 'null'
          format: date-time
          description: The next run while the schedule is on; null while it is off.
        upcomingRunAt:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            When the schedule would run next, on or off: its next run, or the
            next occurrence of its start. Null until configured.
        pauseReason:
          type:
            - string
            - 'null'
        allowedCadences:
          type: array
          items:
            type: string
            enum:
              - daily
              - weekly
              - monthly
        plan:
          type: string
        multiCountryEnabled:
          type: boolean
          description: Whether the plan can schedule more than one country.
        scope:
          type: object
          properties:
            promptIds:
              type:
                - array
                - 'null'
              items:
                type: string
                format: uuid
              minItems: 1
              description: >-
                Prompts the schedule runs, or null for every active prompt,
                including ones added later.
            platforms:
              type: array
              items:
                type: string
                enum:
                  - chatgpt
                  - chatgpt_app
                  - claude
                  - gemini
                  - gemini_app
                  - grok_app
                  - grok_api
                  - perplexity
                  - perplexity_app
                  - google_app
                  - deepseek
                description: >-
                  LLM platform identifier. Newer scraper-backed ids end in
                  `_app`; `chatgpt`, `perplexity`, and `gemini` are legacy and
                  not returned by current runs.
              minItems: 1
            countryCodes:
              type: array
              items:
                type: string
              minItems: 1
              description: >-
                ISO 3166-1 alpha-2 country codes. More than one needs a plan
                with multi-country reporting.
          required:
            - promptIds
            - platforms
            - countryCodes
        estimate:
          type: object
          description: Inputs for the schedule's monthly credit estimate.
          properties:
            activePrompts:
              type: integer
              description: Active prompts the scope covers today.
            platforms:
              type: array
              items:
                type: string
                enum:
                  - chatgpt
                  - chatgpt_app
                  - claude
                  - gemini
                  - gemini_app
                  - grok_app
                  - grok_api
                  - perplexity
                  - perplexity_app
                  - google_app
                  - deepseek
                description: >-
                  LLM platform identifier. Newer scraper-backed ids end in
                  `_app`; `chatgpt`, `perplexity`, and `gemini` are legacy and
                  not returned by current runs.
            countries:
              type: integer
            pool:
              type: number
              description: The organization's monthly credit pool.
          required:
            - activePrompts
            - platforms
            - countries
            - pool
      required:
        - id
        - name
        - configured
        - enabled
        - frequency
        - hour
        - startsAt
        - timezone
        - nextScheduledRunAt
        - upcomingRunAt
        - pauseReason
        - allowedCadences
        - plan
        - multiCountryEnabled
        - scope
        - estimate
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Clerk API key. Create one from your account settings under API Keys.

````

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