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

# Create order action

> Act in the approval loop: propose, edit_quantity and cancel (execute); approve, reject, execute and verify (approve, creator an org admin who is not the proposer); get_policies (read). A quantity a person set always waits for a person's approval, and whoever sets it becomes the order's proposer. With product compliance on, a cross-border order the current verdict blocks (or leaves unknown, in strict mode) is refused at propose, approve and execute with 409 and code compliance_blocked or compliance_unknown.

Key scope per action: get_policies read, propose execute, edit_quantity execute, cancel execute, approve approve, reject approve, execute approve, verify approve. Module: execution. propose is repeat-safe through the body's idempotency_key; the Idempotency-Key header is not read.



## OpenAPI

````yaml /openapi.json post /v1/orders/actions
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/orders/actions:
    post:
      tags:
        - Orders and approval
      summary: Create order action
      description: >-
        Act in the approval loop: propose, edit_quantity and cancel (execute);
        approve, reject, execute and verify (approve, creator an org admin who
        is not the proposer); get_policies (read). A quantity a person set
        always waits for a person's approval, and whoever sets it becomes the
        order's proposer. With product compliance on, a cross-border order the
        current verdict blocks (or leaves unknown, in strict mode) is refused at
        propose, approve and execute with 409 and code compliance_blocked or
        compliance_unknown.


        Key scope per action: get_policies read, propose execute, edit_quantity
        execute, cancel execute, approve approve, reject approve, execute
        approve, verify approve. Module: execution. propose is repeat-safe
        through the body's idempotency_key; the Idempotency-Key header is not
        read.
      operationId: createOrderAction
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                action:
                  type: string
                  enum:
                    - get_policies
                    - propose
                    - edit_quantity
                    - cancel
                    - approve
                    - reject
                    - execute
                    - verify
                recommendation_id:
                  type: string
                  format: uuid
                  description: The recommendation id. Required when action is propose
                order_id:
                  type: string
                  format: uuid
                  description: >-
                    The order id. Required when action is edit_quantity,
                    approve, reject, cancel, execute or verify
                action_request_id:
                  type: string
                  format: uuid
                  description: 'Deprecated: use order_id'
                  deprecated: true
                connection_id:
                  type: string
                  format: uuid
                  description: >-
                    propose: the ERP connection to write to (GET
                    /v1/connections)
                idempotency_key:
                  type: string
                  description: >-
                    propose: your own key for this proposal. Proposing again
                    with the same key returns the order made the first time;
                    left out, a recommendation is proposed once
                quantity:
                  type: number
                  minimum: 0
                  maximum: 10000000
                  description: >-
                    The planner's quantity, above 0, at most three decimals,
                    within the recommendation's own constraints. Required when
                    action is edit_quantity; optional with propose, and then
                    quantity_reason is required
                quantity_reason:
                  type: string
                  minLength: 3
                  maxLength: 500
                  description: >-
                    propose: why the quantity differs from the recommended one.
                    Required when propose carries quantity
                reason:
                  type: string
                  minLength: 3
                  maxLength: 500
                  description: >-
                    Why the quantity changes. Required when action is
                    edit_quantity
              required:
                - action
              additionalProperties: false
            example:
              action: propose
              recommendation_id: 5b8f6c1e-2d47-4a9b-8e21-7c6d5f4a3b2e
      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:
                  order:
                    $ref: '#/components/schemas/ExecutionOrderResult'
                    description: >-
                      Every action but get_policies: the order, its status after
                      the action, and what the action adds
                  decision:
                    $ref: '#/components/schemas/ExecutionDecision'
                    description: 'propose, for a new order: what the execution rule decided'
                  idempotent:
                    const: true
                    description: >-
                      propose: the order already existed (same idempotency_key,
                      by default one per recommendation) and is returned as it
                      is
                  quantity_applied:
                    const: false
                    description: >-
                      propose, with idempotent: the quantity sent was not
                      applied to the existing order; change it with
                      edit_quantity
                  policies:
                    type: array
                    items:
                      $ref: '#/components/schemas/ExecutionPolicy'
                    description: >-
                      get_policies: the rule in force per order kind; a kind
                      without one waits for a person
                  kinds:
                    type: array
                    items:
                      type: string
                      enum:
                        - stock_transfer
                        - purchase_order
                        - expedite
                        - markdown
                    description: 'get_policies: every order kind'
                  writable_kinds:
                    type: array
                    items:
                      type: string
                      enum:
                        - stock_transfer
                        - purchase_order
                        - expedite
                        - markdown
                    description: >-
                      get_policies: kinds at least one connection can write to
                      the ERP
                  connections:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          format: uuid
                        name:
                          type: string
                        system_type:
                          type: string
                        writable_kinds:
                          type: array
                          items:
                            type: string
                            enum:
                              - stock_transfer
                              - purchase_order
                              - expedite
                              - markdown
                        writeback_enabled:
                          type: boolean
                          description: The connection's own write-back switch
                      required:
                        - id
                        - name
                        - system_type
                        - writable_kinds
                        - writeback_enabled
                    description: 'get_policies: connections that can write orders'
                  writeback_feature:
                    type: boolean
                    description: >-
                      get_policies: whether ERP write-back is turned on for the
                      organization
                  compliance_gate:
                    type: object
                    properties:
                      enabled:
                        type: boolean
                      mode:
                        type:
                          - string
                          - 'null'
                        enum:
                          - flag
                          - strict
                          - null
                        description: null while the gate is off
                    required:
                      - enabled
                      - mode
                    description: 'get_policies: the product compliance check on orders'
                  request_id:
                    type: string
                    description: >-
                      Quote this when asking about the request; also the
                      X-Request-ID header
                required:
                  - request_id
                description: >-
                  Depends on `action`. get_policies: policies, kinds,
                  writable_kinds, connections, writeback_feature and
                  compliance_gate. propose: order and decision, or order and
                  idempotent for an order that already existed. edit_quantity,
                  approve, reject, cancel, execute, verify: order
              example:
                request_id: 3178a9cd-d63d-4b79-9419-49b0d2ba023e
                order:
                  id: 9920f152-30a1-4b35-a975-a80edd2da8c1
                  status: proposed
                decision:
                  outcome: manual
                  level: 1
                  policy_id: null
                  version: null
                  checks: []
                  reasons:
                    - 'No rule is set for purchase orders: a person approves'
                  evaluated_at: '2026-11-21T10:44:17.575Z'
        '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'
        '409':
          $ref: '#/components/responses/Conflict'
        '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:
    ExecutionOrderResult:
      type: object
      properties:
        id:
          type: string
          format: uuid
        status:
          type: string
          enum:
            - proposed
            - approved
            - rejected
            - canceled
            - executing
            - executed
            - partially_applied
            - failed
          description: >-
            The order's status after the action. A repeated propose answers the
            existing order's status, whatever it is now. partially_applied:
            written, but the ERP stored something other than what was sent
        quantity:
          type: number
          description: 'edit_quantity: the new quantity'
        previous_quantity:
          type:
            - number
            - 'null'
          description: 'edit_quantity: the quantity it replaced'
        amount:
          type:
            - number
            - 'null'
          description: >-
            edit_quantity: the order's value at the new quantity, when it has
            one
        currency:
          type:
            - string
            - 'null'
          description: edit_quantity
        maker:
          type: string
          format: uuid
          description: >-
            edit_quantity: who set the quantity. That person is now the order's
            proposer, so someone else approves
        mode:
          type: string
          enum:
            - live
            - dry_run
            - manual
          description: >-
            execute: how it ran. live: written to the ERP; dry_run: rehearsed,
            nothing written; manual: handed over by hand
        external_ref:
          type:
            - string
            - 'null'
          description: >-
            execute: the document number in the ERP; MANUAL-... or DRYRUN-...
            when nothing was written; null when it failed
        error:
          type:
            - string
            - 'null'
          description: 'execute: why it failed'
        verification:
          oneOf:
            - $ref: '#/components/schemas/WritebackVerificationSummary'
            - type: 'null'
          description: >-
            execute: the read-back of a live write, null otherwise. verify: the
            new read-back
      required:
        - id
        - status
      description: >-
        propose, approve, reject, cancel: id and status. edit_quantity: also
        quantity, previous_quantity, amount, currency and maker. execute (and a
        propose a level-3 rule executed at once): also mode, external_ref, error
        and verification. verify: also verification
    ExecutionDecision:
      type: object
      properties:
        outcome:
          type: string
          enum:
            - blocked
            - manual
            - auto_approve
            - auto_execute
          description: >-
            manual: the order waits for a person; auto_approve / auto_execute:
            the rule approved (and ran) it
        level:
          type: number
          enum:
            - 0
            - 1
            - 2
            - 3
          description: >-
            0 recommend only, 1 a person approves, 2 approved inside its limits,
            3 approved and executed inside its limits
        policy_id:
          type:
            - string
            - 'null'
          format: uuid
          description: >-
            The rule that decided; null when the default (a person approves)
            applied
        version:
          type:
            - integer
            - 'null'
        checks:
          type: array
          items:
            type: object
            properties:
              rule:
                type: string
                enum:
                  - max_amount
                  - max_quantity
                  - daily_budget
                  - daily_max_orders
                  - allowed_locations
                  - allowed_suppliers
                  - min_priority
                  - cooldown_hours
                  - level
                  - enabled
                  - edited_quantity
                  - compliance
                description: The rule that was checked
              ok:
                type: boolean
              detail:
                type: string
                description: What was compared, in words
            required:
              - rule
              - ok
              - detail
        reasons:
          type: array
          items:
            type: string
          description: >-
            Why the order waits for a person, in order; empty when the rule
            approved it
        evaluated_at:
          type: string
          format: date-time
      required:
        - outcome
        - level
        - policy_id
        - version
        - checks
        - reasons
        - evaluated_at
    ExecutionPolicy:
      type: object
      properties:
        id:
          type: string
          format: uuid
        org_id:
          type: string
          format: uuid
        order_kind:
          type: string
          enum:
            - stock_transfer
            - purchase_order
            - expedite
            - markdown
        version:
          type: integer
        level:
          type: number
          enum:
            - 0
            - 1
            - 2
            - 3
          description: >-
            0 recommend only, 1 a person approves, 2 approved inside its limits,
            3 approved and executed inside its limits
        guardrails:
          type: object
          properties:
            max_amount:
              type: number
              description: Largest order value the rule may approve
            max_quantity:
              type: number
            daily_budget:
              type: number
              description: Sum of order values the rule may approve per UTC day
            daily_max_orders:
              type: integer
              description: Orders the rule may approve per UTC day
            allowed_locations:
              type: array
              items:
                type: string
              description: Location numbers the order may touch; absent means any
            allowed_suppliers:
              type: array
              items:
                type: string
              description: Supplier numbers a purchase order may go to; absent means any
            min_priority:
              type: number
              description: Lowest recommendation priority (0 to 100) the rule acts on
            cooldown_hours:
              type: number
              description: >-
                No second automatic order for the same item and location within
                this many hours
          description: >-
            The limits inside which the rule acts on its own; only the limits
            that are set are present
        enabled:
          type: boolean
          description: 'false while the rule is paused: every order then waits for a person'
        paused_reason:
          type:
            - string
            - 'null'
        paused_at:
          type:
            - string
            - 'null'
          format: date-time
        created_by:
          type: string
          format: uuid
        created_at:
          type: string
          format: date-time
      required:
        - id
        - org_id
        - order_kind
        - version
        - level
        - guardrails
        - enabled
        - paused_reason
        - paused_at
        - created_by
        - created_at
    WritebackVerificationSummary:
      type: object
      properties:
        outcome:
          type: string
          enum:
            - verified
            - differences
            - not_verified
          description: 'not_verified: the document could not be read back yet'
        adopted:
          type: boolean
          description: >-
            true when the document was found by our reference instead of created
            by this attempt
        duplicates:
          type: array
          items:
            type: string
          description: Other documents carrying our reference
        differences:
          type: array
          items:
            type: object
            properties:
              field:
                type: string
              sent:
                type: string
              stored:
                type:
                  - string
                  - 'null'
            required:
              - field
              - sent
              - stored
          description: Fields the ERP stored differently from what was sent
        error:
          type: string
          description: Why the read-back did not verify (not_verified only)
      required:
        - outcome
        - adopted
        - duplicates
        - differences
    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'
    Conflict:
      description: >-
        The request conflicts with the record's current state, or its
        Idempotency-Key is still in use
      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'
    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.