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

# Explain lineage

> Where a number or an item came from, down to the source events.



## OpenAPI

````yaml openapi/en/cell.json POST /v1/insights/lineage
openapi: 3.1.0
info:
  title: Niadra data API
  version: '1'
  description: >-
    Writing, context, history, objects, identity, privacy and governance of one
    space. Every space has a stable address, with the space and the region in
    its name.
servers:
  - url: https://{space}.{region}.api.niadra.com
    variables:
      space:
        default: acme-prod
        description: The space, which comes in the source key.
      region:
        default: us-east-1
        description: The region of the space, which also comes in the key.
security: []
paths:
  /v1/insights/lineage:
    post:
      summary: Explain lineage
      description: >-
        Explains where one item of a pseudonymous customer came from, down to
        the events that produced it.


        **Authentication.** Source key with the `analytics` scope, or a Console
        person token with the analysis role (or admin). People with the vendor
        role have no access.
      operationId: explain_lineage_v1_insights_lineage_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LineageRequest'
            example:
              pseudonym: psn_7f3a
              item_id: 0192f7a2-5d10-7a8e-b1c4-3f6e8d9a0b12
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                additionalProperties: true
                title: Response Explain Lineage V1 Insights Lineage Post
                type: object
              example:
                item:
                  id: 0192f7a2-5d10-7a8e-b1c4-3f6e8d9a0b12
                  kind: fact
                  predicate: preferred_visit_time
                events:
                  - event_id: 0192f7a1-6c1e-7c3a-9b1e-5d2f8a4c0e11
                    channel: whatsapp
                    kind: message
                    occurred_at: '2026-09-22T17:02:11Z'
          description: The item and the events behind it.
        '422':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: The request does not match the contract.
      security:
        - sourceKey: []
components:
  schemas:
    LineageRequest:
      additionalProperties: false
      properties:
        item_id:
          format: uuid
          title: Item Id
          type: string
        pseudonym:
          pattern: ^[A-Za-z0-9_-]{3,80}$
          title: Pseudonym
          type: string
      required:
        - pseudonym
        - item_id
      title: LineageRequest
      type: object
    Problem:
      additionalProperties: false
      description: RFC 9457 problem details; `code` comes from the versioned error catalog.
      properties:
        code:
          title: Code
          type: string
        detail:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Detail
        request_id:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Request Id
        status:
          title: Status
          type: integer
        title:
          title: Title
          type: string
        type:
          default: about:blank
          title: Type
          type: string
      required:
        - title
        - status
        - code
      title: Problem
      type: object
  securitySchemes:
    sourceKey:
      type: http
      scheme: bearer
      description: nia_sk_...

````