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

# End a link

> Ends the link between a person and an organization.



## OpenAPI

````yaml openapi/en/cell.json POST /v1/identity/links/{link_id}/end
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/identity/links/{link_id}/end:
    post:
      tags:
        - identity
      summary: End a link
      description: >-
        Ends the link. Past conversations keep their `about`; new reads with
        `about` for this pair return 422 `about_without_link`.


        **Authentication.** Console person token with the `security`,
        `integration` role (or admin), or a source key with the `admin` scope.
      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: >-
            Required. Kept 24 hours with the hash of the body: a retry with the
            same key returns the first answer, and the same key with a different
            body returns 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: The ended link.
        '422':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: The request does not match the contract.
      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: 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_...
    personToken:
      type: http
      scheme: bearer
      bearerFormat: JWT

````