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

# Ingest sensor events

> Push RFID, ambient IoT, temperature and GPS reads. The body is at most 2 MB (413 above).

Key scope: ingest. Module: sensing. API key only (no session). At most the first 50 rejected events are listed in `errors`; `error_count` is the full number



## OpenAPI

````yaml /openapi.json post /v1/ingest/sensor_events
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/sensor_events:
    post:
      tags:
        - Data ingestion
      summary: Ingest sensor events
      description: >-
        Push RFID, ambient IoT, temperature and GPS reads. The body is at most 2
        MB (413 above).


        Key scope: ingest. Module: sensing. API key only (no session). At most
        the first 50 rejected events are listed in `errors`; `error_count` is
        the full number
      operationId: ingestSensorEvents
      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 for 24 hours: the same key and body replays the
            first answer (Idempotency-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: A name for where the reads come from (default 'sensing')
                events:
                  type: array
                  items:
                    type: object
                    description: >-
                      One of epc or item_external_id is required. An event that
                      lacks a required field is reported in the response's
                      errors and the others are stored
                    properties:
                      source:
                        type: string
                        enum:
                          - rfid
                          - ambient_iot
                          - temp
                          - gps
                          - manual
                      event_type:
                        type: string
                        enum:
                          - read
                          - move
                          - temp
                          - dwell
                      observed_at:
                        type: string
                        format: date-time
                      epc:
                        type: string
                        maxLength: 128
                        description: The tag. Required unless item_external_id is sent
                      item_external_id:
                        type: string
                        maxLength: 50
                        description: Required unless epc is sent
                      lot_external_id:
                        type: string
                        maxLength: 50
                      location_external_id:
                        type: string
                        maxLength: 50
                      value:
                        type: object
                        description: >-
                          The reading. Required when event_type is temp, with a
                          numeric temperature_c
                      attributes:
                        type: object
                    required:
                      - source
                      - event_type
                      - observed_at
                  minItems: 1
                  maxItems: 1000
              required:
                - events
              additionalProperties: false
            example:
              events:
                - source: rfid
                  event_type: read
                  observed_at: '2026-12-01T09:30:00Z'
                  epc: urn:epc:id:sgtin:0400000.000012.1001
                  location_external_id: STORE-12
                - source: temp
                  event_type: temp
                  observed_at: '2026-12-01T09:31:00Z'
                  item_external_id: SKU-310
                  location_external_id: DC-01
                  value:
                    temperature_c: 4.6
      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'
            Idempotency-Replayed:
              $ref: '#/components/headers/Idempotency-Replayed'
          content:
            application/json:
              schema:
                type: object
                properties:
                  run_id:
                    type: string
                    format: uuid
                    description: The ingest run this push was recorded as
                  connection:
                    type: string
                    description: The connection the events were filed under
                  status:
                    type: string
                    enum:
                      - success
                      - partial
                      - failed
                    description: >-
                      success: no event was rejected; partial: some were
                      rejected and some new ones stored; failed: some were
                      rejected and no new one stored
                  results:
                    type: object
                    properties:
                      events:
                        type: object
                        properties:
                          received:
                            type: integer
                            description: >-
                              Events in the request; `upserted` counts the new
                              ones (an event sent before is not stored twice)
                          upserted:
                            type: integer
                          failed:
                            type: integer
                        required:
                          - received
                          - upserted
                          - failed
                      tracked_items:
                        type: object
                        properties:
                          received:
                            type: integer
                            description: >-
                              Tracked entities (a tag, or an item, lot and
                              location) the valid events touched
                          upserted:
                            type: integer
                          failed:
                            type: integer
                        required:
                          - received
                          - upserted
                          - failed
                    required:
                      - events
                      - tracked_items
                  error_count:
                    type: integer
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        index:
                          type: integer
                          description: Position of the event in the request's events array
                        external_id:
                          type:
                            - string
                            - 'null'
                          description: >-
                            The event's epc, else its item_external_id, when it
                            had one
                        errors:
                          type: array
                          items:
                            type: object
                            properties:
                              field:
                                type: string
                              message:
                                type: string
                            required:
                              - field
                              - message
                      required:
                        - index
                        - external_id
                        - errors
                  duration_ms:
                    type: integer
                    description: Milliseconds the request took
                  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: 75d8543f-1acb-4fe8-8c15-0453be9aa072
                run_id: 5149e632-4028-4dd1-a37d-fdf2f53a4fdd
                connection: store-sensors
                status: success
                results:
                  events:
                    received: 2
                    upserted: 2
                    failed: 0
                  tracked_items:
                    received: 1
                    upserted: 1
                    failed: 0
                error_count: 0
                errors: []
                duration_ms: 15
        '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
    Idempotency-Replayed:
      schema:
        type: string
        enum:
          - 'true'
      description: >-
        Present, and true, when the answer is the stored answer of an earlier
        request with the same Idempotency-Key
    Allow:
      schema:
        type: string
      description: The methods the path takes
    Retry-After:
      schema:
        type: integer
      description: Seconds to wait before trying again
  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'
  schemas:
    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
  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.