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

# Change a PIX key entry

> Re-points an existing PIX key to a new transactional account and/or a new owner name inside the SAME participant (§8.2.02 Alterar Chave de Endereçamento). entryId is the key VALUE, URL-encoded, and it never changes - no operation in this API edits a key's value.

Only the destination travels in the body: newBranch, newAccountType, newAccount, accountOpeningDate, newName and newTradeName, all optional per the spec. The owner identity (ISPB, CPF/CNPJ, person type) is derived server-side from accountId and is never read from the payload. reason is required and is DICT's motivo: 0=Customer Request, 2=Branch Transfer, 6=Reconciliation, 8=Receita Federal Validation; an EVP (RANDOM) key must not use 0.

It is a pure control-plane write: the plugin does NOT touch its own key row, so GET /v1/entries reflects the change only through its DICT source and a local row keeps the old coordinates until then. DICT may open a possession or portability claim as a consequence of the change; when it does, the response carries claimOpenedAt. Failures are DICT's, translated into the PIX-1xxx family - an unknown key is 404 PIX-1011.



## OpenAPI

````yaml /en/openapi/v3-current/pix.yaml put /v1/entries/{entryId}
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/entries/{entryId}:
    put:
      tags:
        - Entries
      summary: Change a PIX key entry
      description: >-
        Re-points an existing PIX key to a new transactional account and/or a
        new owner name inside the SAME participant (§8.2.02 Alterar Chave de
        Endereçamento). entryId is the key VALUE, URL-encoded, and it never
        changes - no operation in this API edits a key's value.


        Only the destination travels in the body: newBranch, newAccountType,
        newAccount, accountOpeningDate, newName and newTradeName, all optional
        per the spec. The owner identity (ISPB, CPF/CNPJ, person type) is
        derived server-side from accountId and is never read from the payload.
        reason is required and is DICT's motivo: 0=Customer Request, 2=Branch
        Transfer, 6=Reconciliation, 8=Receita Federal Validation; an EVP
        (RANDOM) key must not use 0.


        It is a pure control-plane write: the plugin does NOT touch its own key
        row, so GET /v1/entries reflects the change only through its DICT source
        and a local row keeps the old coordinates until then. DICT may open a
        possession or portability claim as a consequence of the change; when it
        does, the response carries claimOpenedAt. Failures are DICT's,
        translated into the PIX-1xxx family - an unknown key is 404 PIX-1011.
      operationId: changeEntry
      parameters:
        - description: The PIX key value (URL-encoded).
          in: path
          name: entryId
          required: true
          schema:
            description: The PIX key value (URL-encoded).
            examples:
              - foo@bar.com
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChangeEntryBody'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChangeEntryResponse'
          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:
    ChangeEntryBody:
      additionalProperties: false
      properties:
        accountId:
          description: The CRM account id of the key owner (resolves the server-side ISPB).
          examples:
            - acc-123
          type: string
        accountOpeningDate:
          description: The new account's opening timestamp (RFC3339).
          examples:
            - '2020-01-10T11:30:17.001Z'
          type: string
        newAccount:
          description: The new account number to associate with the key.
          examples:
            - '0007654321'
          type: string
        newAccountType:
          description: The new account type (0=Checking,1=Salary,2=Savings,3=Payment,4=PI).
          examples:
            - 0
          format: int64
          type: integer
        newBranch:
          description: The new branch number to associate with the key.
          examples:
            - '0001'
          type: string
        newName:
          description: The new owner full name / legal name.
          examples:
            - Empresa Nova
          type: string
        newTradeName:
          description: The new owner trade name (sent only for a corporate owner).
          examples:
            - Fantasia Nova
          type: string
        reason:
          description: >-
            Change reason (0=Customer Request,2=Branch
            Transfer,6=Reconciliation,8=Receita Federal Validation). EVP keys
            must not use 0.
          examples:
            - 2
          format: int64
          type: integer
      required:
        - accountId
        - reason
      type: object
    ChangeEntryResponse:
      additionalProperties: false
      properties:
        claimOpenedAt:
          description: >-
            When a possession/portability claim was opened by the change
            (RFC3339), if any.
          examples:
            - '2026-01-03T00:00:00Z'
          type: string
        createdAt:
          description: When the key was created (RFC3339).
          examples:
            - '2026-01-01T00:00:00Z'
          type: string
        key:
          description: The PIX key (unchanged).
          examples:
            - foo@bar.com
          type: string
        ownershipStartAt:
          description: When ownership of the key began (RFC3339).
          examples:
            - '2026-01-02T00:00:00Z'
          type: string
      required:
        - key
      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
    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

````