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

# Context of a pseudonym

> The context of one customer, by pseudonym, for analysis.



## OpenAPI

````yaml openapi/en/cell.json POST /v1/insights/context
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/context:
    post:
      summary: Context of a pseudonym
      description: >-
        The memory of one customer, by pseudonym, as the analyst audience may
        see it: facts, episodes, open items and patterns. Sensitive categories
        stay out unless your policy opens them to analysts.


        **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: customer_context_v1_insights_context_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CustomerContextRequest'
            example:
              pseudonym: psn_7f3a
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerContextResponse'
              example:
                pseudonym: psn_7f3a
                kind: person
                facts:
                  - predicate: plan
                    value: family
                    since: '2021-04-10'
                episodes:
                  - category: technician_visit
                    outcome: open
                    ended_at: '2026-09-22T17:03:00Z'
                open_items:
                  - kind: promise
                    what: Technician visit rescheduled
                    status: open
                traits:
                  - name: recurring_complaint
                    expires_at: '2026-11-02T17:02:11Z'
                notice: >-
                  Analyst view. Sensitive categories are left out unless your
                  policy opens them.
          description: The customer memory, by pseudonym.
        '422':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: The request does not match the contract.
      security:
        - sourceKey: []
components:
  schemas:
    CustomerContextRequest:
      additionalProperties: false
      properties:
        pseudonym:
          pattern: ^[A-Za-z0-9_-]{3,80}$
          title: Pseudonym
          type: string
      required:
        - pseudonym
      title: CustomerContextRequest
      type: object
    CustomerContextResponse:
      additionalProperties: false
      properties:
        episodes:
          items:
            additionalProperties: true
            type: object
          title: Episodes
          type: array
        facts:
          items:
            additionalProperties: true
            type: object
          title: Facts
          type: array
        kind:
          title: Kind
          type: string
        notice:
          title: Notice
          type: string
        open_items:
          items:
            additionalProperties: true
            type: object
          title: Open Items
          type: array
        pseudonym:
          title: Pseudonym
          type: string
        traits:
          items:
            additionalProperties: true
            type: object
          title: Traits
          type: array
      required:
        - pseudonym
        - kind
        - notice
        - facts
        - episodes
        - open_items
        - traits
      title: CustomerContextResponse
      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_...

````