> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lerian.studio/llms.txt
> Use this file to discover all available pages before exploring further.

# Register a holder-ownership removal

> Severs ONE holder's ownership of a transactional account at the DICT (JDPI §8.2.05 Excluir Titular) and, as a consequence, has the DICT DELETE EVERY PIX key bound to that holder ON that account. The account itself stays open and the keys of its OTHER holders are untouched — that is the whole difference from POST /v1/account-closures, which closes the account and deletes every key on it regardless of holder.

Call it when a joint holder leaves, or when a holder's link to the account ends for any other reason, after that holder has stopped transacting. Deletion at the DICT is not reversible: each key is gone from the national directory and has to be registered again to come back, which restarts its ownership and can open a claim if another institution claimed the key in the meantime.

The target holder is named by personType + document and is deliberately NOT inferred from accountId: the holder being removed is frequently not the one whose credentials made the call. The ISPB is resolved server-side from accountId and never read from the body.

⚠️ A 200 does NOT mean every deletion succeeded. The response carries one outcome row per key the DICT attempted; read result on each (1 = deleted, 0 = not deleted, with resultDescription giving the reason), because only the successes are mirrored into this plugin's key projection. These rows are narrower than the account-closure ones — document and name are not populated here.

Refusals: 400 PIX-0061 when accountId or account is empty, or accountType is outside 0..4; 404 PIX-2016 when accountId does not resolve; 400 PIX-1000 when the DICT rejects a field, naming it; 404 PIX-1011 when the DICT knows no such holder-and-account binding or no keys under it; 422 PIX-1007 when the DICT refuses the removal in the current state; 503 PIX-1050 when the DICT is unreachable.



## OpenAPI

````yaml /en/openapi/v3-current/pix.yaml post /v1/holder-removals
openapi: 3.1.0
info:
  description: Brazilian PIX Direct (DICT + SPI) plugin API.
  title: plugin-br-pix-jd
  version: 1.0.0
servers: []
security:
  - BearerAuth: []
paths:
  /v1/holder-removals:
    post:
      tags:
        - Entries
      summary: Register a holder-ownership removal
      description: >-
        Severs ONE holder's ownership of a transactional account at the DICT
        (JDPI §8.2.05 Excluir Titular) and, as a consequence, has the DICT
        DELETE EVERY PIX key bound to that holder ON that account. The account
        itself stays open and the keys of its OTHER holders are untouched — that
        is the whole difference from POST /v1/account-closures, which closes the
        account and deletes every key on it regardless of holder.


        Call it when a joint holder leaves, or when a holder's link to the
        account ends for any other reason, after that holder has stopped
        transacting. Deletion at the DICT is not reversible: each key is gone
        from the national directory and has to be registered again to come back,
        which restarts its ownership and can open a claim if another institution
        claimed the key in the meantime.


        The target holder is named by personType + document and is deliberately
        NOT inferred from accountId: the holder being removed is frequently not
        the one whose credentials made the call. The ISPB is resolved
        server-side from accountId and never read from the body.


        ⚠️ A 200 does NOT mean every deletion succeeded. The response carries
        one outcome row per key the DICT attempted; read result on each (1 =
        deleted, 0 = not deleted, with resultDescription giving the reason),
        because only the successes are mirrored into this plugin's key
        projection. These rows are narrower than the account-closure ones —
        document and name are not populated here.


        Refusals: 400 PIX-0061 when accountId or account is empty, or
        accountType is outside 0..4; 404 PIX-2016 when accountId does not
        resolve; 400 PIX-1000 when the DICT rejects a field, naming it; 404
        PIX-1011 when the DICT knows no such holder-and-account binding or no
        keys under it; 422 PIX-1007 when the DICT refuses the removal in the
        current state; 503 PIX-1050 when the DICT is unreachable.
      operationId: removeHolder
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/HolderRemovalBody'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HolderRemovalResponse'
          description: OK
        '422':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Unprocessable Entity
        '500':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Internal Server Error
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Error
components:
  schemas:
    HolderRemovalBody:
      additionalProperties: false
      properties:
        account:
          description: The account number.
          examples:
            - '0007654321'
          type: string
        accountId:
          description: The CRM account id of the caller (resolves the server-side ISPB).
          examples:
            - acc-123
          type: string
        accountType:
          description: The account type (0=Checking,1=Salary,2=Savings,3=Payment,4=PI).
          examples:
            - 0
          format: int64
          type: integer
        branch:
          description: The branch number of the account.
          examples:
            - '0001'
          type: string
        document:
          description: The target holder document (CPF/CNPJ).
          examples:
            - '82437485000140'
          type: string
        personType:
          description: The target holder person type (0=Person,1=Corporate).
          examples:
            - 1
          format: int64
          type: integer
      required:
        - accountId
        - accountType
        - account
        - personType
        - document
      type: object
    HolderRemovalResponse:
      additionalProperties: false
      properties:
        deletedKeys:
          description: The per-key deletion outcomes.
          items:
            $ref: '#/components/schemas/DeletedKeyView'
          type:
            - array
            - 'null'
      required:
        - deletedKeys
      type: object
    Detail:
      additionalProperties: false
      properties:
        code:
          description: >-
            Stable, machine-readable domain error code scoped to the emitting
            service (format: <SERVICE>-NNNN).
          examples:
            - ERR-0001
          type: string
        detail:
          description: >-
            A human-readable explanation specific to this occurrence of the
            problem.
          examples:
            - Property foo is required but is missing.
          type: string
        errors:
          description: Optional list of individual error details
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type:
            - array
            - 'null'
        instance:
          description: >-
            A URI reference that identifies the specific occurrence of the
            problem.
          examples:
            - https://example.com/error-log/abc123
          format: uri
          type: string
        status:
          description: HTTP status code
          examples:
            - 400
          format: int64
          type: integer
        title:
          description: >-
            A short, human-readable summary of the problem type. This value
            should not change between occurrences of the error.
          examples:
            - Bad Request
          type: string
        type:
          default: about:blank
          description: A URI reference to human-readable documentation for the error.
          examples:
            - https://example.com/errors/example
          format: uri
          type: string
        upstream:
          $ref: '#/components/schemas/Upstream'
          description: >-
            RFC 9457 extension member: the error a proxied third-party provider
            reported. Absent unless the emitting service explicitly surfaced
            one.
      type: object
    DeletedKeyView:
      additionalProperties: false
      properties:
        document:
          description: The key owner document (account-closure only).
          examples:
            - '82437485000140'
          type: string
        key:
          description: The deleted PIX key value.
          examples:
            - foo@bar.com
          type: string
        name:
          description: The key owner name (account-closure only).
          examples:
            - Empresa de Tal
          type: string
        reason:
          description: The deletion reason code.
          examples:
            - 1
          format: int64
          type: integer
        result:
          description: Deletion result (0=not deleted,1=deleted).
          examples:
            - 1
          format: int64
          type: integer
        resultDescription:
          description: The failure reason when result=0.
          examples:
            - Falha de comunicação com DICT
          type: string
      required:
        - key
        - reason
        - result
      type: object
    ErrorDetail:
      additionalProperties: false
      properties:
        location:
          description: >-
            Where the error occurred, e.g. 'body.items[3].tags' or
            'path.thing-id'
          type: string
        message:
          description: Error message text
          type: string
        value:
          description: The value at the given location
      type: object
    Upstream:
      additionalProperties: false
      properties:
        code:
          description: The upstream provider's own error code, verbatim.
          examples:
            - E4001
          type: string
        message:
          description: >-
            The upstream provider's own error message, verbatim (bounded, never
            its raw response body).
          examples:
            - account not found at provider
          type: string
      type: object
  securitySchemes:
    BearerAuth:
      bearerFormat: JWT
      description: JWT bearer token issued by the identity provider.
      scheme: bearer
      type: http

````