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

# Correct a data subject's memory

> Retract or correct a fact, or resolve an open item, of one profile, as a data subject right exercised through governance; it becomes the same correction event as an agent's feedback.



## OpenAPI

````yaml openapi/en/cell.json POST /v1/corrections
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-2
        description: The region of the space, which also comes in the key.
security: []
paths:
  /v1/corrections:
    post:
      tags:
        - governance
      summary: Correct a data subject's memory
      description: >-
        Correction, a data subject's right (PRV-01): the fact is retracted or
        replaced, or the item

        resolved, by an event the memory module applies like an agent's
        feedback. A replayed key is a

        duplicate, not a second correction.


        **Authentication.** Console person token with the `security` role (or
        admin), or a source key with the `admin` scope.
      operationId: correct_v1_corrections_post
      parameters:
        - in: header
          name: Idempotency-Key
          required: true
          schema:
            maxLength: 256
            minLength: 1
            title: Idempotency-Key
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CorrectionRequest'
        required: true
      responses:
        '202':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchResponse'
          description: The correction event accepted, as a batch answer.
        '422':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: The request does not match the contract.
      security:
        - sourceKey: []
        - personToken: []
components:
  schemas:
    CorrectionRequest:
      additionalProperties: false
      description: >-
        The data subject's right to correction, exercised by a person with the
        privacy role (PRV-01). It

        becomes the same `feedback.*` event an agent's `POST /v1/feedback`
        makes, so the lineage keeps it.
      properties:
        action:
          enum:
            - retract_fact
            - correct_fact
            - resolve_open_item
          title: Action
          type: string
        fact_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Fact Id
        open_item_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Open Item Id
        profile_id:
          format: uuid
          title: Profile Id
          type: string
        reason:
          anyOf:
            - maxLength: 500
              type: string
            - type: 'null'
          title: Reason
        value:
          anyOf:
            - maxLength: 2000
              minLength: 1
              type: string
            - type: 'null'
          title: Value
      required:
        - profile_id
        - action
      title: CorrectionRequest
      type: object
    BatchResponse:
      additionalProperties: false
      properties:
        accepted:
          title: Accepted
          type: integer
        duplicates:
          title: Duplicates
          type: integer
          description: Items whose idempotency key was already stored.
        errors:
          items:
            $ref: '#/components/schemas/ItemError'
          title: Errors
          type: array
        masked:
          additionalProperties:
            type: integer
          description: >-
            Values held back from the accepted items before storage, by type
            (`card`, `cvv`, `password`, `secret`): the stored text says
            `[retido:cartão ****1234]` where the value was.
          title: Masked
          type: object
      required:
        - accepted
        - duplicates
        - errors
      title: BatchResponse
      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
    ItemError:
      additionalProperties: false
      properties:
        code:
          title: Code
          type: string
        detail:
          anyOf:
            - type: string
            - type: 'null'
          title: Detail
        index:
          title: Index
          type: integer
          description: Position of the item in `items`.
      required:
        - index
        - code
      title: ItemError
      type: object
  securitySchemes:
    sourceKey:
      type: http
      scheme: bearer
      description: nia_sk_...
    personToken:
      type: http
      scheme: bearer
      bearerFormat: JWT

````