> ## 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 PIX key entry

> Registers a PIX key for the account named by accountId, and is also the only entry point to the claim flow. keyType must agree with the value in key (0=CPF, 1=CNPJ, 2=EMAIL, 3=PHONE, 4=RANDOM) or the call is 422 PIX-0010 naming the expected and detected types; omit key for RANDOM and DICT mints the EVP value (§8.2.01). isValidated is accepted but ignored - the service always restarts validation.

An unvalidated EMAIL or PHONE key never reaches DICT on this call: the service stores it locally as awaiting ownership confirmation (status 2), sends a 6-digit code to that address, and answers with status 2. Finish it with POST /v1/entries/{entryId}/confirmation. Calling this route again for the same key re-arms the row with a NEW code and the previous one stops working. A key of those two types that the account already holds at DICT is 409 PIX-0071. CPF, CNPJ and RANDOM keys go straight to DICT.

If DICT answers that the key is already registered elsewhere, the call still SUCCEEDS: the service records a claim-pending row (status 4) carrying the claim type DICT implied - portability when the current holder's document matches yours, possession otherwise (§8.2.07) - and no claim is opened yet. Opening it is POST /v1/claims, which works only on a row this call created. The whole operation is idempotent on (accountId, key): an existing live row is returned with its current status rather than registered a second time.



## OpenAPI

````yaml /en/openapi/v3-current/pix.yaml post /v1/entries
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:
    post:
      tags:
        - Entries
      summary: Register a PIX key entry
      description: >-
        Registers a PIX key for the account named by accountId, and is also the
        only entry point to the claim flow. keyType must agree with the value in
        key (0=CPF, 1=CNPJ, 2=EMAIL, 3=PHONE, 4=RANDOM) or the call is 422
        PIX-0010 naming the expected and detected types; omit key for RANDOM and
        DICT mints the EVP value (§8.2.01). isValidated is accepted but ignored
        - the service always restarts validation.


        An unvalidated EMAIL or PHONE key never reaches DICT on this call: the
        service stores it locally as awaiting ownership confirmation (status 2),
        sends a 6-digit code to that address, and answers with status 2. Finish
        it with POST /v1/entries/{entryId}/confirmation. Calling this route
        again for the same key re-arms the row with a NEW code and the previous
        one stops working. A key of those two types that the account already
        holds at DICT is 409 PIX-0071. CPF, CNPJ and RANDOM keys go straight to
        DICT.


        If DICT answers that the key is already registered elsewhere, the call
        still SUCCEEDS: the service records a claim-pending row (status 4)
        carrying the claim type DICT implied - portability when the current
        holder's document matches yours, possession otherwise (§8.2.07) - and no
        claim is opened yet. Opening it is POST /v1/claims, which works only on
        a row this call created. The whole operation is idempotent on
        (accountId, key): an existing live row is returned with its current
        status rather than registered a second time.
      operationId: registerEntry
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RegisterEntryBody'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateEntryResponse'
          description: Created
        '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:
    RegisterEntryBody:
      additionalProperties: false
      properties:
        accountId:
          description: The CRM account id of the key owner.
          examples:
            - acc-123
          type: string
        isValidated:
          description: 'Ignored: the service always forces validation to start fresh.'
          examples:
            - false
          type: boolean
        key:
          description: The PIX key value (omit for a RANDOM key).
          examples:
            - foo@bar.com
          type: string
        keyType:
          description: Numeric eKeyType (0=CPF,1=CNPJ,2=EMAIL,3=PHONE,4=RANDOM).
          examples:
            - 2
          format: int64
          type: integer
      required:
        - keyType
        - 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

````