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

# Retract a pattern

> Retracts a wrong pattern with a tombstone, so the same evidence does not bring it back.



## OpenAPI

````yaml openapi/en/cell.json POST /v1/traits/{trait_id}/retract
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/traits/{trait_id}/retract:
    post:
      tags:
        - operate
      summary: Retract a pattern
      description: >-
        Retracts a pattern that is wrong. The retraction leaves a tombstone, so
        the same evidence does not bring the pattern back, and the case enters
        the golden set of your space. The pattern leaves the context of the next
        reads.


        **Authentication.** Console person token with the `security`,
        `integration` role (or admin), or a source key with the `admin` scope.
      operationId: retract_trait_v1_traits__trait_id__retract_post
      parameters:
        - in: path
          name: trait_id
          required: true
          schema:
            format: uuid
            title: Trait Id
            type: string
          example: 0192f7a5-2a43-7c1d-8f27-6c9b1a2d3e45
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TraitView'
              example:
                trait_id: 0192f7a5-2a43-7c1d-8f27-6c9b1a2d3e45
                profile_id: 0192f7a0-3b2e-7d41-8c5a-2e9f4b7a1c03
                name: recurring_complaint
                layer: volatile
                rule_version: '3'
                confidence: 1
                first_seen: '2026-09-22T17:03:40Z'
                last_evidence_at: '2026-09-22T17:02:11Z'
                expires_at: '2026-11-02T17:02:11Z'
                evidence:
                  - kind: episode
                    id: 0192f7a3-7c32-7b0c-9e16-5b8a0f1c2d34
                  - kind: episode
                    id: 0192f7a3-7c32-7b0c-9e16-5b8a0f1c2d99
                retracted_at: '2026-09-23T10:15:00Z'
          description: The pattern, now with `retracted_at`.
        '422':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: The request does not match the contract.
      security:
        - sourceKey: []
        - personToken: []
components:
  schemas:
    TraitView:
      additionalProperties: false
      properties:
        confidence:
          title: Confidence
          type: number
        evidence:
          items:
            $ref: '#/components/schemas/EvidencePointer'
          title: Evidence
          type: array
        expires_at:
          format: date-time
          title: Expires At
          type: string
        first_seen:
          format: date-time
          title: First Seen
          type: string
        last_evidence_at:
          format: date-time
          title: Last Evidence At
          type: string
        layer:
          title: Layer
          type: string
        name:
          title: Name
          type: string
        profile_id:
          title: Profile Id
          type: string
        retracted_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Retracted At
        rule_version:
          title: Rule Version
          type: string
        trait_id:
          title: Trait Id
          type: string
      required:
        - trait_id
        - profile_id
        - name
        - layer
        - rule_version
        - first_seen
        - last_evidence_at
        - expires_at
        - confidence
      title: TraitView
      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
    EvidencePointer:
      additionalProperties: false
      properties:
        id:
          title: Id
          type: string
        kind:
          title: Kind
          type: string
      required:
        - kind
        - id
      title: EvidencePointer
      type: object
  securitySchemes:
    sourceKey:
      type: http
      scheme: bearer
      description: nia_sk_...
    personToken:
      type: http
      scheme: bearer
      bearerFormat: JWT

````