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

# Create forecast check

> Check your own forecast rows against our baseline for the same period, with the signals in that window and a verdict per row. One of rows or stored is required, never both: send rows, or stored: one week of a plan version we hold (its id is shown in the app; needs the demand_planning module), paged by after. The body is at most 256 KB (413 above).

Key scope: read (or execute).



## OpenAPI

````yaml /openapi.json post /v1/forecast_checks
openapi: 3.1.0
info:
  title: InsightChain API
  version: 2.0.0
  description: 'The InsightChain API. Send your key as `Authorization: Bearer <key>`.'
  contact:
    name: InsightChain
    url: https://insightchain.ai/docs
  license:
    name: Proprietary
    url: https://insightchain.ai/terms
servers:
  - url: https://api.insightchain.ai
security: []
tags:
  - name: Data ingestion
  - name: Tariff check
  - name: Landed cost
  - name: Import taxes
  - name: Customs documents
  - name: Denied party screening
  - name: Location risk
  - name: Tariff impact and trade data
  - name: Recommendations
  - name: Orders and approval
  - name: Explanations
  - name: Alerts
  - name: Inventory
  - name: Forecast check
  - name: Disruptions
  - name: Product compliance
  - name: Product recalls
  - name: Product passports
  - name: Webhooks
  - name: Connections
  - name: Sync runs
  - name: API keys
  - name: Usage
  - name: Request log
  - name: Agent (MCP) server
paths:
  /v1/forecast_checks:
    post:
      tags:
        - Forecast check
      summary: Create forecast check
      description: >-
        Check your own forecast rows against our baseline for the same period,
        with the signals in that window and a verdict per row. One of rows or
        stored is required, never both: send rows, or stored: one week of a plan
        version we hold (its id is shown in the app; needs the demand_planning
        module), paged by after. The body is at most 256 KB (413 above).


        Key scope: read (or execute).
      operationId: createForecastCheck
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                stored:
                  type: object
                  properties:
                    version:
                      type: string
                      format: uuid
                      description: A plan version id, as the app shows it
                    week_start:
                      type: string
                      format: date
                      description: The Monday of the week to check; today or later
                    limit:
                      type: integer
                      minimum: 1
                      maximum: 500
                      default: 500
                      description: Item-location pairs
                    after:
                      type: object
                      properties:
                        item_id:
                          type: string
                          format: uuid
                        location_id:
                          type: string
                          format: uuid
                      required:
                        - item_id
                        - location_id
                      additionalProperties: false
                      description: The `next` of the previous response
                  required:
                    - version
                    - week_start
                  additionalProperties: false
                  description: Instead of rows, not with them
                rows:
                  type: array
                  items:
                    type: object
                    properties:
                      item:
                        type: string
                        minLength: 1
                        maxLength: 128
                        description: The item's external id
                      location:
                        type: string
                        minLength: 1
                        maxLength: 128
                        description: The location's external id
                      period_start:
                        type: string
                        format: date
                        description: Today (UTC) or later
                      period_days:
                        type: integer
                        minimum: 1
                        maximum: 90
                      quantity:
                        type: number
                        minimum: 0
                        maximum: 1000000000000
                        description: Your forecast for the whole period
                      ref:
                        type:
                          - string
                          - number
                        maxLength: 128
                        description: Echoed back
                    required:
                      - item
                      - location
                      - period_start
                      - period_days
                      - quantity
                    additionalProperties: false
                  minItems: 1
                  maxItems: 500
                options:
                  type: object
                  properties:
                    window_days:
                      type: integer
                      minimum: 30
                      maximum: 365
                      default: 90
                    tolerance_pct:
                      type: number
                      minimum: 0
                      maximum: 100
                      default: 15
                  additionalProperties: false
              additionalProperties: false
              oneOf:
                - required:
                    - rows
                - required:
                    - stored
            example:
              rows:
                - item: SKU-100
                  location: STORE-12
                  period_start: '2026-12-07'
                  period_days: 7
                  quantity: 140
                  ref: row-1
                - item: SKU-100
                  location: STORE-14
                  period_start: '2026-12-07'
                  period_days: 7
                  quantity: 95
                  ref: row-2
              options:
                window_days: 90
                tolerance_pct: 15
      responses:
        '200':
          description: OK
          headers:
            RateLimit-Limit:
              $ref: '#/components/headers/RateLimit-Limit'
            RateLimit-Remaining:
              $ref: '#/components/headers/RateLimit-Remaining'
            RateLimit-Reset:
              $ref: '#/components/headers/RateLimit-Reset'
            X-RateLimit-Limit-Day:
              $ref: '#/components/headers/X-RateLimit-Limit-Day'
            X-RateLimit-Remaining-Day:
              $ref: '#/components/headers/X-RateLimit-Remaining-Day'
            X-Request-ID:
              $ref: '#/components/headers/X-Request-ID'
            X-Client-Request-ID:
              $ref: '#/components/headers/X-Client-Request-ID'
            X-InsightChain-Sandbox:
              $ref: '#/components/headers/X-InsightChain-Sandbox'
          content:
            application/json:
              schema:
                type: object
                properties:
                  stored:
                    type: object
                    properties:
                      version:
                        type: object
                        properties:
                          id:
                            type: string
                            format: uuid
                          kind:
                            type: string
                          name:
                            type: string
                          source:
                            type:
                              - string
                              - 'null'
                        required:
                          - id
                          - kind
                          - name
                          - source
                      week_start:
                        type: string
                        format: date
                      count:
                        type: integer
                        description: Item-location pairs checked in this response
                      next:
                        type:
                          - object
                          - 'null'
                        properties:
                          item_id:
                            type: string
                            format: uuid
                          location_id:
                            type: string
                            format: uuid
                        required:
                          - item_id
                          - location_id
                        description: >-
                          Send as stored.after to check the pairs after these;
                          null when these were the last
                    required:
                      - version
                      - week_start
                      - count
                      - next
                    description: >-
                      Present when the request named a stored forecast instead
                      of rows
                  as_of:
                    type: string
                    format: date
                    description: Today (UTC)
                  options:
                    type: object
                    properties:
                      window_days:
                        type: integer
                      tolerance_pct:
                        type: number
                      horizon_days:
                        type: integer
                        description: A period must end within this many days of today
                      min_demand_days:
                        type: integer
                        description: Days with demand a baseline needs in the window
                      max_band_pct:
                        type: integer
                        description: The widest agreement band, in percent
                    required:
                      - window_days
                      - tolerance_pct
                      - horizon_days
                      - min_demand_days
                      - max_band_pct
                    description: The options as used
                  history_window:
                    type: object
                    properties:
                      from:
                        type: string
                        format: date
                      to:
                        type: string
                        format: date
                    required:
                      - from
                      - to
                  signals_adjust_baseline:
                    const: false
                    description: Signals are evidence only; they never change the baseline
                  counts:
                    type: object
                    properties:
                      agree:
                        type: integer
                      above:
                        type: integer
                      below:
                        type: integer
                      no_baseline:
                        type: integer
                      error:
                        type: integer
                    required:
                      - agree
                      - above
                      - below
                      - no_baseline
                      - error
                  rows:
                    type: array
                    items:
                      oneOf:
                        - $ref: '#/components/schemas/ForecastCheckRow'
                        - $ref: '#/components/schemas/ForecastCheckRowError'
                    description: >-
                      One per row of the request, in its order; `status` says
                      which shape a row has
                  notes:
                    type: array
                    items:
                      type: string
                  demand_source:
                    $ref: '#/components/schemas/DemandSource'
                    description: Present when at least one row resolved
                  duration_ms:
                    type: integer
                  request_id:
                    type: string
                    description: >-
                      Quote this when asking about the request; also the
                      X-Request-ID header
                required:
                  - as_of
                  - options
                  - history_window
                  - signals_adjust_baseline
                  - counts
                  - rows
                  - notes
                  - duration_ms
                  - request_id
              example:
                request_id: e32a78d5-2b7f-400d-aab0-a5eef299fffe
                as_of: '2026-11-21'
                options:
                  window_days: 90
                  tolerance_pct: 15
                  horizon_days: 90
                  min_demand_days: 4
                  max_band_pct: 100
                history_window:
                  from: '2026-08-23'
                  to: '2026-11-20'
                signals_adjust_baseline: false
                counts:
                  agree: 2
                  above: 0
                  below: 0
                  no_baseline: 0
                  error: 1
                rows:
                  - index: 0
                    ref: row-1
                    item: MAT-00000028
                    location: '1005'
                    period:
                      start: '2026-11-28'
                      end: '2026-12-04'
                      days: 7
                    quantity: 40
                    status: ok
                    history:
                      window_days: 90
                      from: '2026-08-23'
                      to: '2026-11-20'
                      demand_days: 11
                      total_quantity: 1090
                      mean_daily: 12.1111
                      classification: lumpy
                    baseline:
                      quantity: 67.69
                      daily_rate: 9.67
                      method: smoothed_weekday
                      classification: lumpy
                      in_sample_mae: null
                      period_offset_days: 7
                    baseline_reason: null
                    difference:
                      absolute: -27.69
                      percent: -40.9
                      band:
                        pct: 100
                        tolerance_pct: 15
                        noise_pct: 180.7
                        noise_basis: daily_std_dev
                        noise_daily: 46.2276
                        capped: true
                        rule: >-
                          agree when |percent| <= min(100, max(tolerance_pct,
                          noise_pct)); noise_pct = 100 * noise_daily *
                          sqrt(period_days) / baseline
                      verdict: agree
                    signals:
                      trend:
                        rising: true
                        fading: false
                        signals:
                          - id: efeb189e-a05a-44a6-8bd3-efbeab4b7f54
                            detector: event_window
                            direction: rising
                            headline: >-
                              Black Friday / Cyber week is 6 days out: 34 of 90
                              fitting styles will sell through before it and
                              supplier lead times are already longer t...
                            severity: medium
                        source: trends
                      demand_drivers:
                        count: 1
                        events:
                          - id: 06838e82-72da-4ac5-87d6-c110098dd2bd
                            source: disruptions
                            title: Western holiday retail peak 2026
                            event_type: holiday_peak
                            severity: 3
                            starts_at: '2026-11-27T00:00:00+00:00'
                            ends_at: '2026-12-31T23:59:59+00:00'
                            match: country
                            distance_km: null
                      calendar:
                        count: 0
                        holidays: []
                        org_events: []
                      supply:
                        disrupted: false
                        countries: []
                        events: []
                        source: disruptions
                    flags:
                      - demand_driver_in_period
                notes:
                  - >-
                    Baseline: a statistical forecast from daily demand over the
                    history window, the same for the same history (smoothed by
                    weekday for steady and variable demand, an
                    intermittent-demand method for sparse demand). demand_source
                    says which demand history was read.
                demand_source:
                  source: order_lines
                  history_complete: false
                  history_as_of: null
                  fallback_reason: history_not_built
                duration_ms: 13
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '405':
          $ref: '#/components/responses/MethodNotAllowed'
        '413':
          $ref: '#/components/responses/PayloadTooLarge'
        '415':
          $ref: '#/components/responses/UnsupportedMediaType'
        '422':
          $ref: '#/components/responses/Unprocessable'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalError'
        '502':
          $ref: '#/components/responses/UpstreamError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - apiKey: []
components:
  headers:
    RateLimit-Limit:
      schema:
        type: integer
      description: Requests allowed per minute. On every answer to an accepted API key
    RateLimit-Remaining:
      schema:
        type: integer
      description: Requests left in the current minute window
    RateLimit-Reset:
      schema:
        type: integer
      description: Seconds until the minute window resets
    X-RateLimit-Limit-Day:
      schema:
        type: integer
      description: The key's daily quota
    X-RateLimit-Remaining-Day:
      schema:
        type: integer
      description: Requests left today (resets 00:00 UTC)
    X-Request-ID:
      schema:
        type: string
      description: Quote this when asking about a request
    X-Client-Request-ID:
      schema:
        type: string
      description: Your own X-Request-ID request header, echoed. Absent when you sent none
    X-InsightChain-Sandbox:
      schema:
        type: string
        enum:
          - 'true'
      description: >-
        Present, and true, on every answer to a test key: the data is the
        sandbox's
    Allow:
      schema:
        type: string
      description: The methods the path takes
    Retry-After:
      schema:
        type: integer
      description: Seconds to wait before trying again
  schemas:
    ForecastCheckRow:
      type: object
      properties:
        index:
          type: integer
          description: The row's position in the request (0-based)
        ref:
          type:
            - string
            - number
            - 'null'
          description: >-
            The row's `ref` as sent; null when none was sent or the row came
            from a stored forecast
        item:
          type: string
          description: Item external id
        location:
          type: string
          description: Location external id
        period:
          type: object
          properties:
            start:
              type: string
              format: date
            end:
              type: string
              format: date
              description: The period's last day
            days:
              type: integer
          required:
            - start
            - end
            - days
        quantity:
          type: number
          description: Your forecast for the whole period
        status:
          const: ok
        history:
          type: object
          properties:
            window_days:
              type: integer
            from:
              type: string
              format: date
            to:
              type: string
              format: date
            demand_days:
              type: integer
              description: Days in the window with any demand
            total_quantity:
              type: number
            mean_daily:
              type: number
            classification:
              type: string
              enum:
                - steady
                - variable
                - intermittent
                - lumpy
                - no_demand
              description: The demand pattern over the window
          required:
            - window_days
            - from
            - to
            - demand_days
            - total_quantity
            - mean_daily
            - classification
        baseline:
          type:
            - object
            - 'null'
          properties:
            quantity:
              type: number
              description: Our baseline for the whole period
            daily_rate:
              type: number
            method:
              type: string
              enum:
                - smoothed_weekday
                - intermittent
              description: >-
                How the baseline was computed. smoothed_weekday: smoothed demand
                with a weekday pattern. intermittent: for demand that arrives on
                few days
            classification:
              type: string
              enum:
                - steady
                - variable
                - intermittent
                - lumpy
                - no_demand
              description: The demand pattern over the window
            in_sample_mae:
              type:
                - number
                - 'null'
              description: >-
                The baseline's mean absolute error per day on history; null when
                the method reports none
            period_offset_days:
              type: integer
              description: 'Days from today to the period''s first day (0: today)'
          required:
            - quantity
            - daily_rate
            - method
            - classification
            - in_sample_mae
            - period_offset_days
          description: >-
            Null when the history is too thin for a baseline; baseline_reason
            then says why
        baseline_reason:
          type:
            - object
            - 'null'
          properties:
            code:
              type: string
              enum:
                - no_demand_in_window
                - too_few_demand_days
            message:
              type: string
          required:
            - code
            - message
        difference:
          type: object
          properties:
            absolute:
              type:
                - number
                - 'null'
              description: Your quantity minus the baseline; null without a baseline
            percent:
              type:
                - number
                - 'null'
              description: >-
                The difference in percent of the baseline; null without a
                baseline or when the baseline is 0
            band:
              type:
                - object
                - 'null'
              properties:
                pct:
                  type: number
                  description: >-
                    The band used, in percent: a difference at or under it
                    agrees
                tolerance_pct:
                  type: number
                  description: The tolerance of the request
                noise_pct:
                  type:
                    - number
                    - 'null'
                  description: >-
                    The baseline's own uncertainty over the period, in percent
                    of the baseline; null when the baseline is 0
                noise_basis:
                  type: string
                  enum:
                    - in_sample_mae
                    - daily_std_dev
                  description: >-
                    What noise_daily is: the baseline's mean daily error on
                    history, or the daily standard deviation of demand
                noise_daily:
                  type: number
                  description: Units per day
                capped:
                  type: boolean
                  description: True when the band was cut at options.max_band_pct
                rule:
                  type: string
                  description: The agreement rule, in words
              required:
                - pct
                - tolerance_pct
                - noise_pct
                - noise_basis
                - noise_daily
                - capped
                - rule
            verdict:
              type: string
              enum:
                - agree
                - above
                - below
                - no_baseline
          required:
            - absolute
            - percent
            - band
            - verdict
        signals:
          type: object
          properties:
            trend:
              type:
                - object
                - 'null'
              properties:
                rising:
                  type: boolean
                  description: >-
                    At least one live finding says demand for the style is
                    rising
                fading:
                  type: boolean
                  description: At least one says a trait it carries is late-cycle or fading
                signals:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                        description: The finding
                      detector:
                        type: string
                      direction:
                        type: string
                        enum:
                          - rising
                          - fading
                      headline:
                        type: string
                      severity:
                        type:
                          - string
                          - 'null'
                        description: low, medium, high or critical
                    required:
                      - id
                      - detector
                      - direction
                      - headline
                      - severity
                  description: The findings behind it, most severe first, at most 3
                source:
                  const: trends
              required:
                - rising
                - fading
                - signals
                - source
              description: >-
                Current trend findings for the item's style; null when the
                organization has no trend findings
            demand_drivers:
              type: object
              properties:
                count:
                  type: integer
                  description: Every event that bears on the row
                events:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                        description: 'The event: `id` of GET /v1/disruptions'
                      source:
                        const: disruptions
                        description: Where to read the event
                      title:
                        type: string
                      event_type:
                        type: string
                      severity:
                        type: integer
                        description: 1 (minor) to 5 (severe)
                      starts_at:
                        type:
                          - string
                          - 'null'
                        format: date-time
                      ends_at:
                        type:
                          - string
                          - 'null'
                        format: date-time
                      match:
                        type: string
                        enum:
                          - radius
                          - country
                        description: >-
                          How the event reaches the location: inside its radius,
                          or in one of its countries
                      distance_km:
                        type:
                          - integer
                          - 'null'
                        description: >-
                          From the location to the event; null for a country
                          match
                    required:
                      - id
                      - source
                      - title
                      - event_type
                      - severity
                      - starts_at
                      - ends_at
                      - match
                      - distance_km
                  description: The most severe, at most 10
              required:
                - count
                - events
              description: >-
                Demand-moving events in the period that reach the location and
                concern the item's category
            calendar:
              type: object
              properties:
                count:
                  type: integer
                  description: Every holiday and calendar event in the period
                holidays:
                  type: array
                  items:
                    type: object
                    properties:
                      name:
                        type: string
                      date:
                        type: string
                        format: date
                      country_code:
                        type: string
                        description: ISO 3166-1 alpha-2
                      source:
                        type: string
                    required:
                      - name
                      - date
                      - country_code
                      - source
                  description: >-
                    Public holidays of the location's country in the period, at
                    most 10
                org_events:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                      name:
                        type: string
                      date:
                        type: string
                        format: date
                      region:
                        type: string
                      source:
                        const: calendar
                    required:
                      - id
                      - name
                      - date
                      - region
                      - source
                  description: Your own calendar events in the period, at most 10
              required:
                - count
                - holidays
                - org_events
            supply:
              type: object
              properties:
                disrupted:
                  type: boolean
                  description: >-
                    Whether a current supply-risk event reaches one of the
                    item's suppliers
                countries:
                  type: array
                  items:
                    type: string
                  description: Countries of the suppliers it reaches
                events:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                      title:
                        type: string
                      severity:
                        type:
                          - integer
                          - 'null'
                        description: 1 (minor) to 5 (severe)
                      countries:
                        type: array
                        items:
                          type: string
                    required:
                      - id
                      - title
                      - severity
                      - countries
                  description: The current events behind it, most severe first
                source:
                  const: disruptions
              required:
                - disrupted
                - countries
                - events
                - source
              description: >-
                The current state of supply for the item, not a forecast for the
                period
          required:
            - trend
            - demand_drivers
            - calendar
            - supply
        flags:
          type: array
          items:
            type: string
            enum:
              - their_forecast_below_baseline_while_trend_rising
              - their_forecast_above_baseline_while_trend_fading
              - demand_driver_in_period
              - calendar_event_in_period
              - supply_exposed
      required:
        - index
        - ref
        - item
        - location
        - period
        - quantity
        - status
        - history
        - baseline
        - baseline_reason
        - difference
        - signals
        - flags
    ForecastCheckRowError:
      type: object
      properties:
        index:
          type: integer
          description: The row's position in the request (0-based)
        ref:
          type:
            - string
            - number
            - 'null'
          description: >-
            The row's `ref` as sent; null when none was sent or the row came
            from a stored forecast
        item:
          type: string
          description: Item external id
        location:
          type: string
          description: Location external id
        period:
          type: object
          properties:
            start:
              type: string
              format: date
            end:
              type: string
              format: date
              description: The period's last day
            days:
              type: integer
          required:
            - start
            - end
            - days
        quantity:
          type: number
          description: Your forecast for the whole period
        status:
          const: error
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - unknown_item
                - unknown_location
                - period_in_past
                - period_beyond_horizon
            message:
              type: string
          required:
            - code
            - message
      required:
        - index
        - ref
        - item
        - location
        - period
        - quantity
        - status
        - error
    DemandSource:
      type: object
      properties:
        source:
          type: string
          enum:
            - daily_demand
            - order_lines
          description: >-
            Which demand history the answer was computed from. daily_demand: the
            daily history we keep (point of sale where a store has a feed, sales
            orders elsewhere). order_lines: your sales order lines, added up for
            this request while that history is not complete
        history_complete:
          type: boolean
          description: >-
            Whether the stored daily demand history is complete for the
            organization
        history_as_of:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            Every change committed before this time is in the stored history;
            null while it is not complete
        fallback_reason:
          type:
            - string
            - 'null'
          enum:
            - history_not_built
            - history_rebuilding
            - history_lagging
            - null
          description: Why the stored history did not answer; null when it did
      required:
        - source
        - history_complete
        - history_as_of
        - fallback_reason
    Error:
      type: object
      description: The body of every non-2xx answer
      properties:
        error:
          type: object
          properties:
            type:
              type: string
              enum:
                - invalid_request_error
                - authentication_error
                - permission_error
                - rate_limit_error
                - api_error
            code:
              type: string
              description: >-
                Stable machine-readable code, e.g. parameter_invalid,
                scope_missing, rate_limit_exceeded. Every code is listed at
                /docs/errors
            message:
              type: string
              description: For people; what `error` used to be as a plain string
            param:
              type:
                - string
                - 'null'
              description: The parameter the error is about, when there is one
            doc_url:
              type: string
              description: Where the code is documented
          required:
            - type
            - code
            - message
            - param
            - doc_url
        request_id:
          type: string
        details:
          type: array
          items: {}
          description: >-
            On a 400 for input with several problems: one entry per problem, a
            sentence or an object with `field` and `message`
        limit:
          type: integer
          description: 'On a 429: the limit that was reached'
        code:
          type: string
          deprecated: true
          description: 'Deprecated: use error.code'
        field:
          type: string
          deprecated: true
          description: 'Deprecated: use error.param'
      required:
        - error
        - request_id
      additionalProperties: true
  responses:
    BadRequest:
      description: >-
        Invalid input: an unknown or invalid parameter (error.param names it) or
        a body the route does not accept
      headers:
        X-Request-ID:
          $ref: '#/components/headers/X-Request-ID'
        RateLimit-Limit:
          $ref: '#/components/headers/RateLimit-Limit'
        RateLimit-Remaining:
          $ref: '#/components/headers/RateLimit-Remaining'
        RateLimit-Reset:
          $ref: '#/components/headers/RateLimit-Reset'
        X-RateLimit-Limit-Day:
          $ref: '#/components/headers/X-RateLimit-Limit-Day'
        X-RateLimit-Remaining-Day:
          $ref: '#/components/headers/X-RateLimit-Remaining-Day'
        X-Client-Request-ID:
          $ref: '#/components/headers/X-Client-Request-ID'
        X-InsightChain-Sandbox:
          $ref: '#/components/headers/X-InsightChain-Sandbox'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Missing or invalid API key
      headers:
        X-Request-ID:
          $ref: '#/components/headers/X-Request-ID'
        X-Client-Request-ID:
          $ref: '#/components/headers/X-Client-Request-ID'
        X-InsightChain-Sandbox:
          $ref: '#/components/headers/X-InsightChain-Sandbox'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: >-
        The key lacks the scope, or the organization lacks the module or is
        suspended
      headers:
        X-Request-ID:
          $ref: '#/components/headers/X-Request-ID'
        RateLimit-Limit:
          $ref: '#/components/headers/RateLimit-Limit'
        RateLimit-Remaining:
          $ref: '#/components/headers/RateLimit-Remaining'
        RateLimit-Reset:
          $ref: '#/components/headers/RateLimit-Reset'
        X-RateLimit-Limit-Day:
          $ref: '#/components/headers/X-RateLimit-Limit-Day'
        X-RateLimit-Remaining-Day:
          $ref: '#/components/headers/X-RateLimit-Remaining-Day'
        X-Client-Request-ID:
          $ref: '#/components/headers/X-Client-Request-ID'
        X-InsightChain-Sandbox:
          $ref: '#/components/headers/X-InsightChain-Sandbox'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: No such record in your organization
      headers:
        X-Request-ID:
          $ref: '#/components/headers/X-Request-ID'
        RateLimit-Limit:
          $ref: '#/components/headers/RateLimit-Limit'
        RateLimit-Remaining:
          $ref: '#/components/headers/RateLimit-Remaining'
        RateLimit-Reset:
          $ref: '#/components/headers/RateLimit-Reset'
        X-RateLimit-Limit-Day:
          $ref: '#/components/headers/X-RateLimit-Limit-Day'
        X-RateLimit-Remaining-Day:
          $ref: '#/components/headers/X-RateLimit-Remaining-Day'
        X-Client-Request-ID:
          $ref: '#/components/headers/X-Client-Request-ID'
        X-InsightChain-Sandbox:
          $ref: '#/components/headers/X-InsightChain-Sandbox'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    MethodNotAllowed:
      description: The route does not take this method; Allow lists the ones it takes
      headers:
        X-Request-ID:
          $ref: '#/components/headers/X-Request-ID'
        RateLimit-Limit:
          $ref: '#/components/headers/RateLimit-Limit'
        RateLimit-Remaining:
          $ref: '#/components/headers/RateLimit-Remaining'
        RateLimit-Reset:
          $ref: '#/components/headers/RateLimit-Reset'
        X-RateLimit-Limit-Day:
          $ref: '#/components/headers/X-RateLimit-Limit-Day'
        X-RateLimit-Remaining-Day:
          $ref: '#/components/headers/X-RateLimit-Remaining-Day'
        X-Client-Request-ID:
          $ref: '#/components/headers/X-Client-Request-ID'
        X-InsightChain-Sandbox:
          $ref: '#/components/headers/X-InsightChain-Sandbox'
        Allow:
          $ref: '#/components/headers/Allow'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    PayloadTooLarge:
      description: >-
        The body, or the data the request would read, is larger than the route
        allows
      headers:
        X-Request-ID:
          $ref: '#/components/headers/X-Request-ID'
        RateLimit-Limit:
          $ref: '#/components/headers/RateLimit-Limit'
        RateLimit-Remaining:
          $ref: '#/components/headers/RateLimit-Remaining'
        RateLimit-Reset:
          $ref: '#/components/headers/RateLimit-Reset'
        X-RateLimit-Limit-Day:
          $ref: '#/components/headers/X-RateLimit-Limit-Day'
        X-RateLimit-Remaining-Day:
          $ref: '#/components/headers/X-RateLimit-Remaining-Day'
        X-Client-Request-ID:
          $ref: '#/components/headers/X-Client-Request-ID'
        X-InsightChain-Sandbox:
          $ref: '#/components/headers/X-InsightChain-Sandbox'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    UnsupportedMediaType:
      description: The Content-Type is not one the route reads
      headers:
        X-Request-ID:
          $ref: '#/components/headers/X-Request-ID'
        RateLimit-Limit:
          $ref: '#/components/headers/RateLimit-Limit'
        RateLimit-Remaining:
          $ref: '#/components/headers/RateLimit-Remaining'
        RateLimit-Reset:
          $ref: '#/components/headers/RateLimit-Reset'
        X-RateLimit-Limit-Day:
          $ref: '#/components/headers/X-RateLimit-Limit-Day'
        X-RateLimit-Remaining-Day:
          $ref: '#/components/headers/X-RateLimit-Remaining-Day'
        X-Client-Request-ID:
          $ref: '#/components/headers/X-Client-Request-ID'
        X-InsightChain-Sandbox:
          $ref: '#/components/headers/X-InsightChain-Sandbox'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unprocessable:
      description: >-
        Well formed, but it cannot be carried out as sent; or the
        Idempotency-Key was used with another request
      headers:
        X-Request-ID:
          $ref: '#/components/headers/X-Request-ID'
        RateLimit-Limit:
          $ref: '#/components/headers/RateLimit-Limit'
        RateLimit-Remaining:
          $ref: '#/components/headers/RateLimit-Remaining'
        RateLimit-Reset:
          $ref: '#/components/headers/RateLimit-Reset'
        X-RateLimit-Limit-Day:
          $ref: '#/components/headers/X-RateLimit-Limit-Day'
        X-RateLimit-Remaining-Day:
          $ref: '#/components/headers/X-RateLimit-Remaining-Day'
        X-Client-Request-ID:
          $ref: '#/components/headers/X-Client-Request-ID'
        X-InsightChain-Sandbox:
          $ref: '#/components/headers/X-InsightChain-Sandbox'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    TooManyRequests:
      description: Per-minute or daily key limit; Retry-After is the real reset
      headers:
        X-Request-ID:
          $ref: '#/components/headers/X-Request-ID'
        RateLimit-Limit:
          $ref: '#/components/headers/RateLimit-Limit'
        RateLimit-Remaining:
          $ref: '#/components/headers/RateLimit-Remaining'
        RateLimit-Reset:
          $ref: '#/components/headers/RateLimit-Reset'
        X-RateLimit-Limit-Day:
          $ref: '#/components/headers/X-RateLimit-Limit-Day'
        X-RateLimit-Remaining-Day:
          $ref: '#/components/headers/X-RateLimit-Remaining-Day'
        X-Client-Request-ID:
          $ref: '#/components/headers/X-Client-Request-ID'
        X-InsightChain-Sandbox:
          $ref: '#/components/headers/X-InsightChain-Sandbox'
        Retry-After:
          $ref: '#/components/headers/Retry-After'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    InternalError:
      description: Internal error; quote request_id
      headers:
        X-Request-ID:
          $ref: '#/components/headers/X-Request-ID'
        RateLimit-Limit:
          $ref: '#/components/headers/RateLimit-Limit'
        RateLimit-Remaining:
          $ref: '#/components/headers/RateLimit-Remaining'
        RateLimit-Reset:
          $ref: '#/components/headers/RateLimit-Reset'
        X-RateLimit-Limit-Day:
          $ref: '#/components/headers/X-RateLimit-Limit-Day'
        X-RateLimit-Remaining-Day:
          $ref: '#/components/headers/X-RateLimit-Remaining-Day'
        X-Client-Request-ID:
          $ref: '#/components/headers/X-Client-Request-ID'
        X-InsightChain-Sandbox:
          $ref: '#/components/headers/X-InsightChain-Sandbox'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    UpstreamError:
      description: >-
        The API could not be reached, or a service this route depends on failed.
        Try again shortly
      headers:
        X-Request-ID:
          $ref: '#/components/headers/X-Request-ID'
        RateLimit-Limit:
          $ref: '#/components/headers/RateLimit-Limit'
        RateLimit-Remaining:
          $ref: '#/components/headers/RateLimit-Remaining'
        RateLimit-Reset:
          $ref: '#/components/headers/RateLimit-Reset'
        X-RateLimit-Limit-Day:
          $ref: '#/components/headers/X-RateLimit-Limit-Day'
        X-RateLimit-Remaining-Day:
          $ref: '#/components/headers/X-RateLimit-Remaining-Day'
        X-Client-Request-ID:
          $ref: '#/components/headers/X-Client-Request-ID'
        X-InsightChain-Sandbox:
          $ref: '#/components/headers/X-InsightChain-Sandbox'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    ServiceUnavailable:
      description: The API, or this route, is not available right now
      headers:
        X-Request-ID:
          $ref: '#/components/headers/X-Request-ID'
        RateLimit-Limit:
          $ref: '#/components/headers/RateLimit-Limit'
        RateLimit-Remaining:
          $ref: '#/components/headers/RateLimit-Remaining'
        RateLimit-Reset:
          $ref: '#/components/headers/RateLimit-Reset'
        X-RateLimit-Limit-Day:
          $ref: '#/components/headers/X-RateLimit-Limit-Day'
        X-RateLimit-Remaining-Day:
          $ref: '#/components/headers/X-RateLimit-Remaining-Day'
        X-Client-Request-ID:
          $ref: '#/components/headers/X-Client-Request-ID'
        X-InsightChain-Sandbox:
          $ref: '#/components/headers/X-InsightChain-Sandbox'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: >-
        An InsightChain API key: ic_live_... for your organization, ic_test_...
        for its sandbox

````

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