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

# Create a refresh schedule

> Access document-bound client sessions, queries, schedules, bindings and write claims.

Required scopes: `client:write`.


## OpenAPI

````yaml POST /api/v2/metrics/client/schedules
openapi: 3.1.1
info:
  title: chatobserver public API
  version: '2026-09-09'
  description: >-
    Track AI visibility, manage prompts, inspect collected answers and
    citations, and integrate workspace data with your own tools. Visibility
    endpoints use workspace API keys. Data endpoints use scoped service-account
    keys; spreadsheet client endpoints use authorised client sessions. See the
    authentication guide for each credential type.
  contact:
    name: chatobserver support
    url: https://chatobserver.com/contact
    email: support@chatobserver.com
servers:
  - url: https://app.chatobserver.com
    description: Production API
security:
  - WorkspaceKey: []
  - BearerKey: []
tags:
  - name: Workspace
    description: Validate access and list the workspace project and available platforms.
  - name: Prompts
    description: Create, schedule, organise, activate and retrieve tracked prompts.
  - name: Answers
    description: Retrieve collected AI answers, their analysis and visibility trends.
  - name: Brands
    description: Manage brands and compare their visibility in AI answers.
  - name: Sources and citations
    description: Analyse cited domains, pages and ownership across answers.
  - name: Visitor analytics
    description: Read website visitor and crawler analytics for the workspace.
  - name: Content opportunities
    description: Retrieve content-gap findings and recommendations for tracked prompts.
  - name: Usage
    description: Read workspace consumption and allowance summaries.
  - name: Data connections
    description: Discover authorised connections, source accounts and connector catalogues.
  - name: Data queries
    description: >-
      Create versioned queries, publish definitions and inspect integration
      contracts.
  - name: Data operations
    description: >-
      Execute, validate, cancel and inspect operations and page through result
      rows.
  - name: Data delivery
    description: Manage schedules, transfers, destinations and import workflows.
  - name: Data definitions
    description: Manage reusable definitions and their immutable versions.
  - name: Data webhooks
    description: >-
      Configure event delivery, inspect deliveries, replay events and rotate
      secrets.
  - name: Client authorisation
    description: Authorise spreadsheet clients using a user-approved challenge exchange.
  - name: Spreadsheet clients
    description: >-
      Access document-bound client sessions, queries, schedules, bindings and
      write claims.
  - name: AI visibility audits
    description: Create website visibility audits and retrieve their report links.
  - name: Version 1
    description: Integrate with the version 1 visibility and analytics endpoints.
paths:
  /api/v2/metrics/client/schedules:
    post:
      tags:
        - Spreadsheet clients
      summary: Create a refresh schedule
      description: >-
        Access document-bound client sessions, queries, schedules, bindings and
        write claims. Required scopes: `client:write`.
      operationId: postV2MetricsClientSchedules
      parameters:
        - name: x-metrics-client-audience
          in: header
          required: true
          schema:
            enum:
              - chatobserver-metrics-sheets
              - chatobserver-metrics-excel
            type: string
          description: The audience bound to the authorised client session.
        - name: x-metrics-document-reference
          in: header
          required: true
          schema:
            type: string
            pattern: ^[a-f0-9]{64}$
          description: The document reference hash bound to the client session.
        - name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 16
            maxLength: 160
            pattern: ^[A-Za-z0-9:_-]+$
          description: >-
            Unique key for one logical command. Reuse it only when retrying the
            same request and payload.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/postV2MetricsClientSchedulesRequest'
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/postV2MetricsClientSchedulesResponse200'
        '201':
          description: Created successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/postV2MetricsClientSchedulesResponse201'
        default:
          description: >-
            Request failed. Inspect the error code and request identifier; retry
            only when the failure is retryable.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataError'
      security:
        - ClientSession: []
components:
  schemas:
    postV2MetricsClientSchedulesRequest:
      type: object
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 150
        definition:
          type: object
          properties:
            schemaVersion:
              type: number
              const: 2
            timeZone:
              type: string
              minLength: 1
              maxLength: 128
            recurrence:
              anyOf:
                - type: object
                  properties:
                    kind:
                      type: string
                      const: cron
                    expression:
                      type: string
                  required:
                    - kind
                    - expression
                - type: object
                  properties:
                    every:
                      type: number
                    hour:
                      anyOf:
                        - type: 'null'
                        - type: number
                    minute:
                      type: number
                    kind:
                      type: string
                      const: interval
                    unit:
                      enum:
                        - hour
                        - day
                        - week
                        - month
                      type: string
                    dayOfWeek:
                      anyOf:
                        - type: 'null'
                        - type: number
                    dayOfMonth:
                      anyOf:
                        - type: 'null'
                        - type: number
                  required:
                    - every
                    - hour
                    - minute
                    - kind
                    - unit
                    - dayOfWeek
                    - dayOfMonth
            daylightSavingPolicy:
              enum:
                - wall_clock
                - fixed_utc
              type: string
            overlapPolicy:
              enum:
                - skip
                - queue_one
                - allow
              type: string
            startsAt:
              anyOf:
                - type: 'null'
                - type: string
                  format: date-time
            endsAt:
              anyOf:
                - type: 'null'
                - type: string
                  format: date-time
            freshnessDelayMinutes:
              type: integer
              minimum: 0
              maximum: 10080
            failurePolicy:
              type: object
              properties:
                maximumAttempts:
                  type: integer
                  minimum: 1
                  maximum: 10
                backoff:
                  enum:
                    - fixed
                    - exponential
                  type: string
                initialDelaySeconds:
                  type: integer
                  minimum: 1
                  maximum: 86400
                autoPauseAfterFailures:
                  anyOf:
                    - type: 'null'
                    - type: integer
                      minimum: 1
                      maximum: 100
              required:
                - maximumAttempts
                - backoff
                - initialDelaySeconds
                - autoPauseAfterFailures
              additionalProperties: false
            targets:
              type: array
              items:
                anyOf:
                  - type: object
                    properties:
                      id:
                        type: string
                      queryVersionId:
                        type: string
                      position:
                        type: number
                      action:
                        type: string
                        const: refresh_query
                      retainResult:
                        anyOf:
                          - type: boolean
                            const: false
                          - type: boolean
                            const: true
                    required:
                      - id
                      - queryVersionId
                      - position
                      - action
                      - retainResult
                  - type: object
                    properties:
                      id:
                        type: string
                      position:
                        type: number
                      action:
                        type: string
                        const: refresh_client_binding
                      clientBindingVersionId:
                        type: string
                    required:
                      - id
                      - position
                      - action
                      - clientBindingVersionId
                  - type: object
                    properties:
                      id:
                        type: string
                      modelVersionId:
                        type: string
                      position:
                        type: number
                      action:
                        type: string
                        const: materialize_model
                    required:
                      - id
                      - modelVersionId
                      - position
                      - action
                  - type: object
                    properties:
                      id:
                        type: string
                      tableGroupVersionId:
                        type: string
                      position:
                        type: number
                      action:
                        type: string
                        const: materialize_table_group
                    required:
                      - id
                      - tableGroupVersionId
                      - position
                      - action
                  - type: object
                    properties:
                      id:
                        type: string
                      position:
                        type: number
                      action:
                        type: string
                        const: refresh_transfer
                      transferVersionId:
                        type: string
                    required:
                      - id
                      - position
                      - action
                      - transferVersionId
                  - type: object
                    properties:
                      id:
                        type: string
                      position:
                        type: number
                      action:
                        type: string
                        const: refresh_report_dataset
                      reportDatasetBindingId:
                        type: string
                    required:
                      - id
                      - position
                      - action
                      - reportDatasetBindingId
              minItems: 1
              maxItems: 100
            notifications:
              type: object
              properties:
                onSuccess:
                  anyOf:
                    - type: boolean
                      const: false
                    - type: boolean
                      const: true
                onFailure:
                  anyOf:
                    - type: boolean
                      const: false
                    - type: boolean
                      const: true
                onAutoPause:
                  anyOf:
                    - type: boolean
                      const: false
                    - type: boolean
                      const: true
                targets:
                  type: array
                  items:
                    anyOf:
                      - type: object
                        properties:
                          kind:
                            type: string
                            const: email
                          address:
                            type: string
                        required:
                          - kind
                          - address
                      - type: object
                        properties:
                          kind:
                            type: string
                            const: slack
                          destinationId:
                            type: string
                        required:
                          - kind
                          - destinationId
                      - type: object
                        properties:
                          kind:
                            type: string
                            const: microsoft_teams
                          destinationId:
                            type: string
                        required:
                          - kind
                          - destinationId
                      - type: object
                        properties:
                          kind:
                            type: string
                            const: webhook
                          webhookEndpointId:
                            type: string
                        required:
                          - kind
                          - webhookEndpointId
                  maxItems: 50
              required:
                - onSuccess
                - onFailure
                - onAutoPause
                - targets
              additionalProperties: false
          required:
            - schemaVersion
            - timeZone
            - recurrence
            - daylightSavingPolicy
            - overlapPolicy
            - startsAt
            - endsAt
            - freshnessDelayMinutes
            - failurePolicy
            - targets
            - notifications
          additionalProperties: false
        description:
          anyOf:
            - type: 'null'
            - type: string
              maxLength: 4000
          default: null
        visibility:
          enum:
            - private
            - workspace
            - restricted
          default: private
          type: string
        publish:
          anyOf:
            - type: boolean
              const: false
            - type: boolean
              const: true
          default: false
      required:
        - name
        - definition
      additionalProperties: false
    postV2MetricsClientSchedulesResponse200:
      type: object
      properties:
        data:
          type: object
          properties:
            actorId:
              type: string
            canonicalHash:
              type: string
            scheduleId:
              type: string
            versionId:
              type: string
            versionNumber:
              type: number
            versionStatus:
              enum:
                - draft
                - published
                - superseded
              type: string
            nextEvaluationAt:
              type: string
          required:
            - actorId
            - canonicalHash
            - scheduleId
            - versionId
            - versionNumber
            - versionStatus
            - nextEvaluationAt
        replayed:
          anyOf:
            - type: boolean
              const: false
            - type: boolean
              const: true
      required:
        - data
        - replayed
    postV2MetricsClientSchedulesResponse201:
      type: object
      properties:
        data:
          type: object
          properties:
            actorId:
              type: string
            canonicalHash:
              type: string
            scheduleId:
              type: string
            versionId:
              type: string
            versionNumber:
              type: number
            versionStatus:
              enum:
                - draft
                - published
                - superseded
              type: string
            nextEvaluationAt:
              type: string
          required:
            - actorId
            - canonicalHash
            - scheduleId
            - versionId
            - versionNumber
            - versionStatus
            - nextEvaluationAt
        replayed:
          anyOf:
            - type: boolean
              const: false
            - type: boolean
              const: true
      required:
        - data
        - replayed
    DataError:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              enum:
                - internal
                - validation_failed
                - authentication_required
                - forbidden
                - not_found
                - conflict
                - precondition_failed
                - idempotency_conflict
                - capability_unavailable
                - connection_unavailable
                - reauthentication_required
                - provider_rate_limited
                - workspace_limit_exceeded
                - result_expired
                - operation_failed
                - temporarily_unavailable
              type: string
            fieldPath:
              type: array
              items:
                anyOf:
                  - type: string
                  - type: number
            parameters:
              type: object
              properties: {}
              additionalProperties:
                anyOf:
                  - type: 'null'
                  - type: string
                  - type: number
                  - type: boolean
                    const: false
                  - type: boolean
                    const: true
            repairActions:
              type: array
              items:
                type: string
                minLength: 1
                maxLength: 96
              maxItems: 10
            requestId:
              type: string
              minLength: 1
              maxLength: 160
            retryable:
              anyOf:
                - type: boolean
                  const: false
                - type: boolean
                  const: true
            retryAfterSeconds:
              anyOf:
                - type: 'null'
                - type: integer
                  exclusiveMinimum: 0
          required:
            - code
            - fieldPath
            - parameters
            - repairActions
            - requestId
            - retryable
            - retryAfterSeconds
          additionalProperties: false
      required:
        - error
      additionalProperties: false
  securitySchemes:
    WorkspaceKey:
      type: apiKey
      in: header
      name: x-chatobserver-key
      description: >-
        A workspace API key. Data endpoints require a service-account key with
        the specified scopes.
    BearerKey:
      type: http
      scheme: bearer
      description: The workspace or service-account API key as a bearer token.
    ClientSession:
      type: http
      scheme: bearer
      description: >-
        A client session token obtained through the client authorisation
        challenge flow.

````