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

# Encerrar vínculo

> Encerra o vínculo entre uma pessoa e uma organização.



## OpenAPI

````yaml openapi/pt/cell.json POST /v1/identity/links/{link_id}/end
openapi: 3.1.0
info:
  title: API de dados da Niadra
  version: '1'
  description: >-
    Escrita, contexto, histórico, objetos, identidade, privacidade e governança
    de um espaço. Cada espaço tem um endereço estável, com o espaço e a região
    no nome.
servers:
  - url: https://{space}.{region}.api.niadra.com
    variables:
      space:
        default: acme-prod
        description: O espaço, que vem na chave de fonte.
      region:
        default: us-east-1
        description: A região do espaço, que também vem na chave.
security: []
paths:
  /v1/identity/links/{link_id}/end:
    post:
      tags:
        - identity
      summary: Encerrar vínculo
      description: >-
        Encerra o vínculo. As conversas passadas mantêm o `about`; leituras
        novas com `about` para este par devolvem 422 `about_without_link`.


        **Autenticação.** Token de pessoa do Console com o papel `security`,
        `integration` (ou admin), ou chave de fonte com o escopo `admin`.
      operationId: end_link_v1_identity_links__link_id__end_post
      parameters:
        - in: path
          name: link_id
          required: true
          schema:
            format: uuid
            title: Link Id
            type: string
        - in: header
          name: Idempotency-Key
          required: true
          schema:
            maxLength: 256
            minLength: 1
            title: Idempotency-Key
            type: string
          description: >-
            Obrigatório. Fica guardado 24 horas com o hash do corpo: repetir com
            a mesma chave devolve a primeira resposta, e a mesma chave com outro
            corpo devolve 409 `conflict`.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LinkEndIn'
            example:
              valid_to: '2026-10-01T00:00:00Z'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LinkOut'
              example:
                link_id: 0192f7a1-5b10-7c3a-8e21-4d2f8a4c0e08
                person_handle_id: 0192f7a1-5b10-7c3a-8e21-4d2f8a4c0e02
                org_handle_id: 0192f7a1-5b10-7c3a-8e21-4d2f8a4c0e05
                role: buyer
                can_see_contacts: false
                valid_from: '2026-09-22T17:10:00Z'
                valid_to: '2026-10-01T00:00:00Z'
          description: O vínculo encerrado.
        '422':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: >-
            422 `invalid_input`, `verification_not_allowed` ou
            `about_without_link`.
      security:
        - sourceKey: []
        - personToken: []
components:
  schemas:
    LinkEndIn:
      additionalProperties: false
      properties:
        valid_to:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Valid To
      title: LinkEndIn
      type: object
    LinkOut:
      additionalProperties: false
      properties:
        can_see_contacts:
          title: Can See Contacts
          type: boolean
        link_id:
          format: uuid
          title: Link Id
          type: string
        org_handle_id:
          format: uuid
          title: Org Handle Id
          type: string
        person_handle_id:
          format: uuid
          title: Person Handle Id
          type: string
        role:
          title: Role
          type: string
        valid_from:
          format: date-time
          title: Valid From
          type: string
        valid_to:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Valid To
      required:
        - link_id
        - person_handle_id
        - org_handle_id
        - role
        - can_see_contacts
        - valid_from
      title: LinkOut
      type: object
    Problem:
      additionalProperties: false
      description: >-
        Detalhes do problema no formato da RFC 9457; `code` vem do catálogo de
        erros versionado.
      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_...
    personToken:
      type: http
      scheme: bearer
      bearerFormat: JWT

````