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

# Ingest records

> Push canonical supply-chain records; idempotent upsert by external_id, per-entity counts. Optional Idempotency-Key header. The body is at most 2 MB (413 above).

Key scope: ingest. Module: connectors. Takes Idempotency-Key (applied by the route itself). At most 50 record errors are returned; `error_count` is the full number



## OpenAPI

````yaml /openapi.json post /v1/ingest/records
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/ingest/records:
    post:
      tags:
        - Data ingestion
      summary: Ingest records
      description: >-
        Push canonical supply-chain records; idempotent upsert by external_id,
        per-entity counts. Optional Idempotency-Key header. The body is at most
        2 MB (413 above).


        Key scope: ingest. Module: connectors. Takes Idempotency-Key (applied by
        the route itself). At most 50 record errors are returned; `error_count`
        is the full number
      operationId: ingestRecords
      parameters:
        - name: Idempotency-Key
          in: header
          required: false
          schema:
            type: string
            minLength: 1
            maxLength: 128
            pattern: ^[\x21-\x7E]{1,128}$
          description: >-
            Makes a retry safe: the same key and body answers from the first run
            without storing anything again (replayed: true), another body is 422
            idempotency_key_reused, a request still running is 409
            idempotency_key_in_use
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                connection:
                  type: string
                  maxLength: 100
                  description: Connection name (default 'default')
                entities:
                  type: object
                  properties:
                    suppliers:
                      type: array
                      items:
                        type: object
                        properties:
                          external_id:
                            type: string
                            maxLength: 50
                            description: >-
                              Your id for the record; sending it again updates
                              the record
                          name:
                            type: string
                            maxLength: 200
                          city:
                            type: string
                            maxLength: 200
                          lead_time_days:
                            type: integer
                            minimum: 0
                        required:
                          - external_id
                          - name
                    items:
                      type: array
                      items:
                        type: object
                        properties:
                          external_id:
                            type: string
                            maxLength: 50
                            description: >-
                              Your id for the record; sending it again updates
                              the record
                          description:
                            type: string
                            maxLength: 500
                          uom:
                            type: string
                            maxLength: 10
                            description: Unit of measure
                          category:
                            type: string
                            maxLength: 100
                          unit_cost:
                            type: number
                            minimum: 0
                        required:
                          - external_id
                    item_variants:
                      type: array
                      items:
                        type: object
                        properties:
                          external_id:
                            type: string
                            maxLength: 50
                            description: >-
                              Your id for the record; sending it again updates
                              the record
                          item_external_id:
                            type: string
                            maxLength: 50
                            description: The external_id of the item
                          variant_code:
                            type: string
                            maxLength: 30
                        required:
                          - external_id
                          - item_external_id
                          - variant_code
                    product_lots:
                      type: array
                      items:
                        type: object
                        properties:
                          external_id:
                            type: string
                            maxLength: 50
                            description: >-
                              Your id for the record; sending it again updates
                              the record
                          item_external_id:
                            type: string
                            maxLength: 50
                            description: The external_id of the item
                          lot_code:
                            type: string
                            maxLength: 50
                        required:
                          - external_id
                          - item_external_id
                          - lot_code
                    locations:
                      type: array
                      items:
                        type: object
                        properties:
                          external_id:
                            type: string
                            maxLength: 50
                            description: >-
                              Your id for the record; sending it again updates
                              the record
                          name:
                            type: string
                            maxLength: 200
                          city:
                            type: string
                            maxLength: 200
                        required:
                          - external_id
                          - name
                    customers:
                      type: array
                      items:
                        type: object
                        properties:
                          external_id:
                            type: string
                            maxLength: 50
                            description: >-
                              Your id for the record; sending it again updates
                              the record
                          name:
                            type: string
                            maxLength: 200
                        required:
                          - external_id
                          - name
                    price_lists:
                      type: array
                      items:
                        type: object
                        properties:
                          external_id:
                            type: string
                            maxLength: 50
                            description: >-
                              Your id for the record; sending it again updates
                              the record
                          name:
                            type: string
                            maxLength: 200
                          entries:
                            type: array
                            items:
                              type: object
                              properties:
                                item_external_id:
                                  type: string
                                  maxLength: 50
                                  description: The external_id of the item
                                unit_price:
                                  type: number
                                  minimum: 0
                              required:
                                - item_external_id
                                - unit_price
                            description: >-
                              A line that lacks a required field is an error on
                              the record
                        required:
                          - external_id
                          - name
                    inventory_levels:
                      type: array
                      items:
                        type: object
                        properties:
                          item_external_id:
                            type: string
                            maxLength: 50
                            description: The external_id of the item
                          location_external_id:
                            type: string
                            maxLength: 50
                            description: The external_id of the location
                          quantity_on_hand:
                            type: number
                        required:
                          - item_external_id
                          - location_external_id
                          - quantity_on_hand
                    purchase_orders:
                      type: array
                      items:
                        type: object
                        properties:
                          external_id:
                            type: string
                            maxLength: 50
                            description: >-
                              Your id for the record; sending it again updates
                              the record
                          supplier_external_id:
                            type: string
                            maxLength: 50
                            description: The external_id of the supplier
                          lines:
                            type: array
                            items:
                              type: object
                              properties:
                                line_number:
                                  type: integer
                                  minimum: 1
                                item_external_id:
                                  type: string
                                  maxLength: 50
                                  description: The external_id of the item
                                quantity:
                                  type: number
                                  minimum: 0
                                location_external_id:
                                  type: string
                                  maxLength: 50
                                  description: >-
                                    The external_id of the location it is
                                    delivered to
                                unit_price:
                                  type: number
                                  minimum: 0
                                expected_delivery_date:
                                  type: string
                                  format: date
                              required:
                                - line_number
                                - item_external_id
                                - quantity
                            description: >-
                              A line that lacks a required field is an error on
                              the record
                        required:
                          - external_id
                          - supplier_external_id
                    goods_receipts:
                      type: array
                      items:
                        type: object
                        properties:
                          external_id:
                            type: string
                            maxLength: 50
                            description: >-
                              Your id for the record; sending it again updates
                              the record
                          document_external_id:
                            type: string
                            maxLength: 50
                            description: The material document
                          po_external_id:
                            type: string
                            maxLength: 50
                            description: The external_id of the purchase order
                          po_line_number:
                            type: integer
                            minimum: 0
                          posting_date:
                            type: string
                            format: date
                          quantity:
                            type: number
                            description: 'Signed: a reversal is negative'
                        required:
                          - external_id
                          - document_external_id
                          - po_external_id
                          - po_line_number
                          - posting_date
                          - quantity
                    sales_orders:
                      type: array
                      items:
                        type: object
                        properties:
                          external_id:
                            type: string
                            maxLength: 50
                            description: >-
                              Your id for the record; sending it again updates
                              the record
                          lines:
                            type: array
                            items:
                              type: object
                              properties:
                                line_number:
                                  type: integer
                                  minimum: 1
                                item_external_id:
                                  type: string
                                  maxLength: 50
                                  description: The external_id of the item
                                quantity:
                                  type: number
                                  minimum: 0
                              required:
                                - line_number
                                - item_external_id
                                - quantity
                            description: >-
                              A line that lacks a required field is an error on
                              the record
                        required:
                          - external_id
                    deliveries:
                      type: array
                      items:
                        type: object
                        properties:
                          external_id:
                            type: string
                            maxLength: 50
                            description: >-
                              Your id for the record; sending it again updates
                              the record
                          lines:
                            type: array
                            items:
                              type: object
                              properties:
                                line_number:
                                  type: integer
                                  minimum: 1
                                item_external_id:
                                  type: string
                                  maxLength: 50
                                  description: The external_id of the item
                                quantity:
                                  type: number
                                  minimum: 0
                              required:
                                - line_number
                                - item_external_id
                                - quantity
                            description: >-
                              A line that lacks a required field is an error on
                              the record
                        required:
                          - external_id
                    billing_documents:
                      type: array
                      items:
                        type: object
                        properties:
                          external_id:
                            type: string
                            maxLength: 50
                            description: >-
                              Your id for the record; sending it again updates
                              the record
                          lines:
                            type: array
                            items:
                              type: object
                              properties:
                                line_number:
                                  type: integer
                                  minimum: 1
                              required:
                                - line_number
                            description: >-
                              A line that lacks a required field is an error on
                              the record
                        required:
                          - external_id
                    returns:
                      type: array
                      items:
                        type: object
                        properties:
                          external_id:
                            type: string
                            maxLength: 50
                            description: >-
                              Your id for the record; sending it again updates
                              the record
                          lines:
                            type: array
                            items:
                              type: object
                              properties:
                                line_number:
                                  type: integer
                                  minimum: 1
                                item_external_id:
                                  type: string
                                  maxLength: 50
                                  description: The external_id of the item
                                quantity:
                                  type: number
                                  minimum: 0
                              required:
                                - line_number
                                - item_external_id
                                - quantity
                            description: >-
                              A line that lacks a required field is an error on
                              the record
                        required:
                          - external_id
                    pos_transactions:
                      type: array
                      items:
                        type: object
                        properties:
                          external_id:
                            type: string
                            maxLength: 50
                            description: >-
                              Your id for the record; sending it again updates
                              the record
                          item_external_id:
                            type: string
                            maxLength: 50
                            description: The external_id of the item
                          transaction_date:
                            type: string
                            format: date
                          quantity:
                            type: number
                            description: 'Signed: a return is negative'
                        required:
                          - external_id
                          - item_external_id
                          - transaction_date
                          - quantity
                  additionalProperties: false
                  description: >-
                    1-1000 records across all entities: at least one entity with
                    at least one record. A record that lacks a required field is
                    reported in the response and the others are stored
              required:
                - entities
              additionalProperties: false
            example:
              connection: default
              entities:
                suppliers:
                  - external_id: SUP-100
                    name: Northwind Textiles Ltd
                    city: Hai Phong
                    lead_time_days: 35
                items:
                  - external_id: SKU-100
                    description: Cotton T-shirt, white
                    uom: EA
                    category: Tops
                    unit_cost: 6.4
                locations:
                  - external_id: DC-01
                    name: West distribution centre
                    city: Portland
                inventory_levels:
                  - item_external_id: SKU-100
                    location_external_id: DC-01
                    quantity_on_hand: 1840
                purchase_orders:
                  - external_id: PO-7781
                    supplier_external_id: SUP-100
                    lines:
                      - line_number: 1
                        item_external_id: SKU-100
                        location_external_id: DC-01
                        quantity: 1000
                        unit_price: 6.4
                        expected_delivery_date: '2026-12-18'
      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:
                  run_id:
                    type: string
                    format: uuid
                    description: The ingest run; GET /v1/sync_runs lists it
                  connection:
                    type:
                      - string
                      - 'null'
                    description: >-
                      The connection the records were stored under; null only on
                      a replay whose connection has since been removed
                  status:
                    type: string
                    enum:
                      - success
                      - partial
                      - failed
                    description: >-
                      success: every record stored. partial: some refused.
                      failed: none stored
                  results:
                    type: object
                    additionalProperties:
                      $ref: '#/components/schemas/IngestEntityCounts'
                    description: >-
                      Counts per entity (suppliers, items, locations,
                      purchase_orders, ...); every entity is listed, sent or not
                  error_count:
                    type: integer
                    description: Records refused, in full
                  errors:
                    type: array
                    items:
                      $ref: '#/components/schemas/IngestRecordError'
                  duration_ms:
                    type:
                      - integer
                      - 'null'
                  replayed:
                    const: true
                    description: >-
                      Present when the Idempotency-Key was already used with the
                      same body: this is the first run's result, nothing was
                      processed again
                  original_request_id:
                    type: string
                    format: uuid
                    description: 'With replayed: the request_id of the run that did the work'
                  request_id:
                    type: string
                    description: >-
                      Quote this when asking about the request; also the
                      X-Request-ID header
                required:
                  - run_id
                  - connection
                  - status
                  - results
                  - error_count
                  - errors
                  - duration_ms
                  - request_id
              example:
                request_id: 2e885a5c-6399-4ca2-b76f-dd5a39550562
                run_id: 7f5ae59e-2c72-417f-af0a-8c79219a6779
                connection: erp-main
                status: success
                results:
                  suppliers:
                    received: 0
                    upserted: 0
                    failed: 0
                  items:
                    received: 1
                    upserted: 1
                    failed: 0
                error_count: 0
                errors: []
                duration_ms: 8
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '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:
    IngestEntityCounts:
      type: object
      properties:
        received:
          type: integer
          description: Records of the entity that arrived
        upserted:
          type: integer
          description: Records stored (created or updated)
        failed:
          type: integer
          description: Records refused or not stored
      required:
        - received
        - upserted
        - failed
    IngestRecordError:
      type: object
      properties:
        entity:
          type: string
          description: The entity the record was sent under
        index:
          type: integer
          description: The record's position in that entity's array, from 0
        external_id:
          type:
            - string
            - 'null'
          description: The record's external_id, when it had one
        errors:
          type: array
          items:
            type: object
            properties:
              field:
                type: string
              message:
                type: string
            required:
              - field
              - message
      required:
        - entity
        - index
        - external_id
        - errors
    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'
    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.