> ## 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.

# Timeline

> Conversations, system events and actions in order, one line each, by the customer handle in the body.



## OpenAPI

````yaml openapi/en/cell.json POST /v1/history/timeline
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/history/timeline:
    post:
      tags:
        - read
      summary: Timeline
      description: >-
        The customer story in order, newest first: one conversation, system
        event or action per line, paginated. `POST` because the subject handle
        is personal data.


        **Authentication.** Source key: `Authorization: Bearer nia_sk_...`.
        Required scope: `search`.
      operationId: timeline_v1_history_timeline_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TimelineRequest'
            example:
              subject:
                type: phone_e164
                value: '+14155550123'
              filters:
                since: '2026-01-01T00:00:00Z'
              limit: 20
              verification: V1
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TimelineResponse'
              example:
                items:
                  - id: ep_01J2
                    kind: episode
                    text: >-
                      Technician did not show up · $40 credit on the April bill
                      · settled
                    at: '2026-03-12T14:20:00Z'
                    channel: voice
                    source_id: src_voice
                    outcome: resolved
                    confidence: 0.94
                    origin_event_id: evt_01J2A
                  - id: ep_01J3
                    kind: episode
                    text: Customer confirmed the credit and the new visit
                    at: '2026-03-14T12:02:00Z'
                    channel: whatsapp
                    source_id: src_whatsapp
                    outcome: resolved
                    confidence: 0.91
                    origin_event_id: evt_01J3C
                next_cursor: c_01J8ZQ
                withheld: 1
                as_of: '2026-09-22T17:07:02Z'
          description: One page.
        '422':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: The request does not match the contract.
      security:
        - sourceKey: []
      x-codeSamples:
        - lang: python
          label: Python
          source: |-
            page = niadra.timeline(
                phone("+14155550123"),
                filters={"since": "2026-01-01T00:00:00Z"},
                limit=20,
            )
            for item in page.items:
                print(item.at, item.kind, item.text)
        - lang: typescript
          label: TypeScript
          source: >-
            const { data: page } = await niadra.timeline({
              subject: handles.phone("+14155550123"),
              filters: { since: "2026-01-01T00:00:00Z" },
              limit: 20,
            });

            for (const item of page?.items ?? []) console.log(item.at,
            item.kind, item.text);
components:
  schemas:
    TimelineRequest:
      additionalProperties: false
      properties:
        about:
          anyOf:
            - $ref: '#/components/schemas/Handle'
            - type: 'null'
        conversation_id:
          anyOf:
            - maxLength: 512
              minLength: 1
              type: string
            - type: 'null'
          title: Conversation Id
        cursor:
          anyOf:
            - type: string
            - type: 'null'
          title: Cursor
        filters:
          $ref: '#/components/schemas/HistoryFilters'
        limit:
          default: 20
          maximum: 100
          minimum: 1
          title: Limit
          type: integer
        subject:
          $ref: '#/components/schemas/Handle'
        verification:
          $ref: '#/components/schemas/Verification'
          default: V0
      required:
        - subject
      title: TimelineRequest
      type: object
    TimelineResponse:
      additionalProperties: false
      properties:
        as_of:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: As Of
        items:
          items:
            $ref: '#/components/schemas/HistoryItem'
          title: Items
          type: array
        next_cursor:
          anyOf:
            - type: string
            - type: 'null'
          title: Next Cursor
        withheld:
          default: 0
          title: Withheld
          type: integer
      required:
        - items
      title: TimelineResponse
      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
    Handle:
      additionalProperties: false
      description: >-
        An identifier of a subject in some channel or system: a phone, an
        e-mail, a CRM id.
      properties:
        scope:
          anyOf:
            - maxLength: 256
              minLength: 1
              type: string
            - type: 'null'
          description: >-
            Namespace for scoped identifiers: the WhatsApp Business account for
            `wa_bsuid`, the system for `system_id`, the country for
            `gov_id_hmac`.
          title: Scope
        subject_kind:
          anyOf:
            - $ref: '#/components/schemas/SubjectKind'
            - type: 'null'
          description: Defaults to `person`, except for organization-only handle types.
        type:
          $ref: '#/components/schemas/HandleType'
        value:
          maxLength: 320
          minLength: 1
          title: Value
          type: string
          description: >-
            The identifier. Normalized on the server: E.164 for phones,
            lowercase for e-mail.
      required:
        - type
        - value
      title: Handle
      type: object
    HistoryFilters:
      additionalProperties: false
      properties:
        categories:
          items:
            maxLength: 256
            minLength: 1
            type: string
          title: Categories
          type: array
        channels:
          items:
            maxLength: 256
            minLength: 1
            type: string
          title: Channels
          type: array
        item_kinds:
          items:
            enum:
              - episode
              - fact
              - open_item
              - action
              - system_event
              - object
              - trait
            type: string
          title: Item Kinds
          type: array
        object:
          anyOf:
            - $ref: '#/components/schemas/ObjectRef'
            - type: 'null'
        outcome:
          anyOf:
            - maxLength: 256
              minLength: 1
              type: string
            - type: 'null'
          title: Outcome
        since:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Since
        until:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Until
      title: HistoryFilters
      type: object
    Verification:
      description: Session verification levels. `no_customer` sits outside the V0-V4 scale.
      enum:
        - V0
        - V1
        - V2
        - V3
        - V4
        - no_customer
      title: Verification
      type: string
    HistoryItem:
      additionalProperties: false
      properties:
        at:
          format: date-time
          title: At
          type: string
        channel:
          anyOf:
            - type: string
            - type: 'null'
          title: Channel
        confidence:
          anyOf:
            - type: number
            - type: 'null'
          title: Confidence
        id:
          title: Id
          type: string
        kind:
          title: Kind
          type: string
          description: >-
            One of `episode`, `fact`, `open_item`, `action`, `system_event`,
            `object`, `trait`.
        origin_event_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Origin Event Id
          description: The event this item came from.
        outcome:
          anyOf:
            - type: string
            - type: 'null'
          title: Outcome
        source_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Source Id
        text:
          title: Text
          type: string
          description: Dense text, in the same key-value style as the pack.
      required:
        - id
        - kind
        - text
        - at
      title: HistoryItem
      type: object
    SubjectKind:
      enum:
        - person
        - account
        - partner
      title: SubjectKind
      type: string
      description: >-
        A person, a customer organization (`account`) or an organization that
        takes part without being a customer (`partner`).
    HandleType:
      enum:
        - phone_e164
        - wa_id
        - wa_jid
        - wa_lid
        - wa_bsuid
        - email
        - gov_id_hmac
        - app_user_id
        - system_id
        - org_registry_hmac
        - email_domain
        - anon_id
      title: HandleType
      type: string
      description: >-
        The kind of identifier. The value is classified by its format, never by
        the field it came from.
    ObjectRef:
      additionalProperties: false
      description: >-
        A business object in a system of record, e.g. `invoice` / `erp` /
        `0823`.
      properties:
        id:
          maxLength: 512
          minLength: 1
          title: Id
          type: string
          description: The id in that system.
        namespace:
          maxLength: 256
          minLength: 1
          title: Namespace
          type: string
          description: The system it lives in, such as `erp`.
        type:
          maxLength: 256
          minLength: 1
          title: Type
          type: string
          description: Object type, such as `invoice`, `order` or `ticket`.
      required:
        - type
        - namespace
        - id
      title: ObjectRef
      type: object
  securitySchemes:
    sourceKey:
      type: http
      scheme: bearer
      description: nia_sk_...

````