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

# Forget

> Erases a profile, handle or conversation by lineage and issues an erasure receipt.



## OpenAPI

````yaml openapi/en/cell.json POST /v1/forget
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/forget:
    post:
      tags:
        - governance
      summary: Forget
      description: >-
        Erases a profile, a handle or a conversation by lineage: event content,
        the facts left without evidence, episodes, open items, objects owned by
        the handle, the personal content of actions, patterns, links,
        measurement rows, review samples, trigger payloads, packs and files,
        plus tombstones for the continuous export. Forgetting a person never
        erases the account it is linked to. The erasure runs in the background;
        follow it with `GET /v1/forget/{request_id}`. When it completes, the
        answer carries the erasure receipt hash and the export runs that already
        held the data, and the `erasure.completed` webhook fires.


        **Authentication.** Console person token with the `security` role (or
        admin), or a source key with the `admin` scope.
      operationId: forget_v1_forget_post
      parameters:
        - in: header
          name: Idempotency-Key
          required: true
          schema:
            maxLength: 256
            minLength: 1
            title: Idempotency-Key
            type: string
          description: >-
            Mandatory. Kept 24 hours with the body hash; the same key with a
            different body returns 409.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ForgetRequest'
            example:
              target: handle
              handle:
                type: phone_e164
                value: '+14155550123'
        required: true
      responses:
        '202':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErasureOut'
              example:
                request_id: 0192f7b0-4c11-7e2a-9d30-1a2b3c4d5e6f
                target_kind: handle
                target_id: 0192f7a0-9f01-7a22-8b33-4c5d6e7f8091
                status: pending
                requested_at: '2026-09-22T18:00:00Z'
                completed_at: null
                erased: {}
                export_run_ids: []
                receipt_hash: null
          description: >-
            Accepted. The erasure is queued; `status` moves from `pending` to
            `running` and `completed`.
        '422':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: The request does not match the contract.
      security:
        - sourceKey: []
        - personToken: []
components:
  schemas:
    ForgetRequest:
      additionalProperties: false
      description: What to forget. Handles travel only in the body, never in a URL.
      properties:
        conversation_id:
          anyOf:
            - maxLength: 512
              minLength: 1
              type: string
            - type: 'null'
          title: Conversation Id
        handle:
          anyOf:
            - $ref: '#/components/schemas/Handle'
            - type: 'null'
        profile_id:
          anyOf:
            - format: uuid
              type: string
            - type: 'null'
          title: Profile Id
        target:
          enum:
            - profile
            - handle
            - conversation
          title: Target
          type: string
      required:
        - target
      title: ForgetRequest
      type: object
    ErasureOut:
      additionalProperties: false
      properties:
        completed_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Completed At
        erased:
          additionalProperties:
            type: integer
          description: Rows erased per table.
          title: Erased
          type: object
        export_run_ids:
          description: Continuous export runs that already carried erased rows.
          items:
            type: string
          title: Export Run Ids
          type: array
        receipt_hash:
          anyOf:
            - type: string
            - type: 'null'
          description: Hex SHA-256 of the erasure receipt.
          title: Receipt Hash
        request_id:
          title: Request Id
          type: string
        requested_at:
          format: date-time
          title: Requested At
          type: string
        status:
          enum:
            - pending
            - running
            - completed
            - failed
          title: Status
          type: string
        target_id:
          description: Profile id, handle id or conversation id; never the handle value.
          title: Target Id
          type: string
        target_kind:
          enum:
            - profile
            - handle
            - conversation
          title: Target Kind
          type: string
      required:
        - request_id
        - status
        - target_kind
        - target_id
        - requested_at
      title: ErasureOut
      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
    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.
  securitySchemes:
    sourceKey:
      type: http
      scheme: bearer
      description: nia_sk_...
    personToken:
      type: http
      scheme: bearer
      bearerFormat: JWT

````