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

# Confirm PIX key ownership

> Confirms ownership of an EMAIL or PHONE key with the 6-digit code POST /v1/entries delivered. entryId is the key VALUE, URL-encoded; the body carries token and accountId. On success the key is registered at DICT and the local row becomes FINALIZED (0); if that registration comes back claim-pending instead, the response carries THAT status and no key was bound.

The route is dual-purpose, and the second purpose runs FIRST and ignores the code entirely: if DICT reports a CONFIRMED claim on this key - the holder has already agreed to give it away - the service concludes that claim at DICT (§8.2.12), soft-deletes the local pending row, and answers 200 with an EMPTY CreateEntryResponse - the JSON object {}, because every field is omitempty - and NOT an absent body. A generated client deserializes it normally; what it reads is every field unset, which is the signal that this branch ran and no key was bound here. That conclusion is irreversible, so a caller expecting a rejected code can find the transfer completed instead.

Otherwise the code decides. It is matched by hash, so a code that fits no pending row of this account is 401 PIX-0059 - the same answer as a missing code, with nothing in the response distinguishing the two. A row that is not awaiting confirmation is 422 PIX-0073.



## OpenAPI

````yaml /en/openapi/v3-current/pix.yaml post /v1/entries/{entryId}/confirmation
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}/confirmation:
    post:
      tags:
        - Entries
      summary: Confirm PIX key ownership
      description: >-
        Confirms ownership of an EMAIL or PHONE key with the 6-digit code POST
        /v1/entries delivered. entryId is the key VALUE, URL-encoded; the body
        carries token and accountId. On success the key is registered at DICT
        and the local row becomes FINALIZED (0); if that registration comes back
        claim-pending instead, the response carries THAT status and no key was
        bound.


        The route is dual-purpose, and the second purpose runs FIRST and ignores
        the code entirely: if DICT reports a CONFIRMED claim on this key - the
        holder has already agreed to give it away - the service concludes that
        claim at DICT (§8.2.12), soft-deletes the local pending row, and answers
        200 with an EMPTY CreateEntryResponse - the JSON object {}, because
        every field is omitempty - and NOT an absent body. A generated client
        deserializes it normally; what it reads is every field unset, which is
        the signal that this branch ran and no key was bound here. That
        conclusion is irreversible, so a caller expecting a rejected code can
        find the transfer completed instead.


        Otherwise the code decides. It is matched by hash, so a code that fits
        no pending row of this account is 401 PIX-0059 - the same answer as a
        missing code, with nothing in the response distinguishing the two. A row
        that is not awaiting confirmation is 422 PIX-0073.
      operationId: confirmEntry
      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/ConfirmEntryBody'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateEntryResponse'
          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:
    ConfirmEntryBody:
      additionalProperties: false
      properties:
        accountId:
          description: The CRM account id of the key owner.
          examples:
            - acc-123
          type: string
        token:
          description: The OTP ownership-confirmation code.
          examples:
            - '123456'
          type: string
      required:
        - token
        - accountId
      type: object
    CreateEntryResponse:
      additionalProperties: false
      properties:
        key:
          description: The PIX key value.
          examples:
            - '11122233300'
          type: string
        keyType:
          description: Numeric eKeyType.
          examples:
            - 4
          format: int64
          type: integer
        status:
          description: Numeric eKeyStatus.
          examples:
            - 1
          format: int64
          type: integer
        statusDescription:
          description: Human-readable eKeyStatus label.
          examples:
            - ACTIVE
          type: string
      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

````