> ## Documentation Index
> Fetch the complete documentation index at: https://developers.portao3.com.br/llms.txt
> Use this file to discover all available pages before exploring further.

# Register a Pix key

> Registers a Pix key on the wallet, so that payers can send Pix to it without its bank details.

Send the key's `type` and — for every type but a random key (`EVP`) — its `value`. The key usually comes back `ACTIVE`, ready to receive. When the phone number or e-mail address must be proven yours, it comes back `PENDING_CONFIRMATION`: [request a confirmation code](https://developers.portao3.com.br/api-reference/banking/pix-keys/request-a-pix-key-confirmation-code.md), then [confirm the key](https://developers.portao3.com.br/api-reference/banking/pix-keys/confirm-a-pix-key.md) with it. A wallet can hold more than one key. Use `default` as `walletId` for the organization's main wallet.

When registering fails, the error is returned and the attempt stays in the wallet's list as a `FAILED` key, with the reason in `failReason`. When the bank refused the key (a `422`), nothing was registered: fix the cause and register it again. When the bank failed or didn't answer in time (a `5xx`), the key may have been registered anyway — registering the same CNPJ, CPF, e-mail or phone again then usually answers `ENTRY_ALREADY_EXISTS`; contact support to have it reconciled. If the bank throttles the request, you get a `429`: wait and retry.

You need to be an organization admin, or have the wallet shared with you as `OWNER` or `USER`.


## OpenAPI

````yaml /api-reference/banking.openapi.json post /realms/{realmId}/organizations/{organizationId}/accounts/{accountId}/wallets/{walletId}/pix-dict
openapi: 3.0.3
info:
  title: Banking
  version: 1.0.0
  description: >-
    Portão 3 banking API. Every endpoint requires a bearer token in the
    Authorization header (Authorization: Bearer <token>) unless its page states
    otherwise; see the Authentication guide. That requirement is not repeated
    per endpoint. Generated by tools/openapi from code (routes + security) and
    the hand-written spec (request/response bodies). Banking attaches a zod
    validationSchema at the route; request bodies are resolved from it (object +
    array roots). Responses have no presenter layer, so they stay tier=unknown.
    Confidence tiers: generated:typed=300 copied:manual=0 unknown=20.
servers:
  - url: https://api.banking.v2.portao3.com.br/
    description: production
  - url: https://api.banking.dev.3pers.com.br/
    description: development
security: []
tags:
  - name: Accounts
  - name: Account Limits
  - name: Wallets
  - name: Transaction Limits
  - name: Transfers
  - name: Cards
  - name: Card Limits
  - name: Cards 3DS
  - name: Pix Payments
  - name: Pix Keys
  - name: PIX Charges
  - name: PIX Automatic
  - name: PIX Initiation (Open Finance)
  - name: PIX Infractions (MED)
  - name: Boleto Payments
  - name: Boleto Charges
  - name: TED Payments
  - name: Transactions
  - name: Transaction Reversals
  - name: Spend Review
  - name: Cashback
  - name: Currency Codes
paths:
  /realms/{realmId}/organizations/{organizationId}/accounts/{accountId}/wallets/{walletId}/pix-dict:
    post:
      tags:
        - Pix Keys
      summary: Register a Pix key
      description: >-
        Registers a Pix key on the wallet, so that payers can send Pix to it
        without its bank details.
      operationId: >-
        postRealmsByRealmIdOrganizationsByOrganizationIdAccountsByAccountIdWalletsByWalletIdPixDict
      parameters:
        - name: realmId
          in: path
          required: true
          description: |-
            ID of your realm.

            Format: `UUID`
          schema:
            type: string
            format: uuid
          example: f495ff0c-ab54-4f99-8e92-ca8682e4de9b
        - name: organizationId
          in: path
          required: true
          description: |-
            ID of the organization.

            Format: `UUID`
          schema:
            type: string
            format: uuid
          example: c4bd3f21-dfbd-44e8-8055-68ba15bed410
        - name: accountId
          in: path
          required: true
          description: ID of the organization's account (24 hexadecimal characters).
          schema:
            type: string
            pattern: ^[0-9a-fA-F]{24}$
          example: 66f2a1c7b4d3e80012c9a0b4
        - name: walletId
          in: path
          required: true
          description: >-
            ID of the wallet that receives the key (24 hexadecimal characters),
            or `default` for the organization's main wallet.
          schema:
            type: string
            pattern: ^([0-9a-fA-F]{24}|default)$
          example: 66f2a3d1b4d3e80012c9a0d2
        - name: x-environment
          in: header
          required: false
          description: >-
            Environment of the wallet: `LIVE` (production) or `TEST` (sandbox).
            When you omit it, `TEST` is used; any other value is rejected.
          schema:
            type: string
            enum:
              - LIVE
              - TEST
          example: LIVE
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                type:
                  type: string
                  enum:
                    - EVP
                    - CNPJ
                    - CPF
                    - EMAIL
                    - PHONE
                  description: >-
                    Kind of key: `EVP` (a random key the bank generates), `CNPJ`
                    or `CPF` (the account holder's document), `EMAIL` or
                    `PHONE`. A document key must be the account holder's own CPF
                    or CNPJ.
                  example: EMAIL
                value:
                  description: >-
                    The key to register. Required for every type but `EVP`,
                    whose key is generated for you — a value sent with `EVP` is
                    ignored. Formats: `CPF`, 11 digits; `CNPJ`, 14 characters
                    (12 letters or digits, then 2 digits) without punctuation;
                    `EMAIL`, a lowercase e-mail address; `PHONE`, `+` and the
                    country code, area code and number, digits only
                    (`+5511987654321`). At most 77 characters, and some words
                    used in scams are refused.
                  example: financeiro@horizontelog.com.br
                  type: string
              required:
                - type
      responses:
        '201':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  _id:
                    type: string
                    description: ID of the Pix key — use it as `pixDictId`.
                    example: 6728b1e2b4d3e80012c9a5a1
                  realmId:
                    type: string
                    description: ID of the realm.
                    example: f495ff0c-ab54-4f99-8e92-ca8682e4de9b
                  organizationId:
                    type: string
                    description: ID of the organization.
                    example: c4bd3f21-dfbd-44e8-8055-68ba15bed410
                  accountId:
                    type: string
                    description: ID of the organization's account.
                    example: 66f2a1c7b4d3e80012c9a0b4
                  walletId:
                    type: string
                    description: ID of the wallet that holds the key.
                    example: 66f2a3d1b4d3e80012c9a0d2
                  environment:
                    type: string
                    enum:
                      - LIVE
                      - TEST
                    description: 'Environment of the key: `LIVE` or `TEST`.'
                    example: LIVE
                  account:
                    type: object
                    properties:
                      bankIspb:
                        type: string
                        description: >-
                          ISPB code of Portão 3's banking partner, which holds
                          the account (8 digits). `failed` when the key could
                          not be registered.
                        example: '12345678'
                      branch:
                        type: string
                        description: >-
                          Branch of the account. `failed` when the key could not
                          be registered.
                        example: '001'
                      number:
                        type: number
                        description: >-
                          Number of the account. `-1` when the key could not be
                          registered.
                        example: 10023456
                      type:
                        type: string
                        enum:
                          - CACC
                          - SLRY
                          - SVGS
                          - TRAN
                        description: >-
                          Type of the account: `TRAN` (payment account) for the
                          wallets' keys. `CACC` when the key could not be
                          registered.
                        example: TRAN
                    required:
                      - bankIspb
                      - branch
                      - number
                      - type
                    description: The bank account the key points to.
                  external:
                    type: object
                    properties:
                      entryId:
                        type: string
                        description: >-
                          ID of the key's entry in the Pix directory. `failed`
                          when the key could not be registered.
                        example: b6f1d2c3-4e5a-4b7c-9d8e-1f2a3b4c5d6e
                    description: The key's identifiers in the Pix directory.
                  status:
                    type: string
                    enum:
                      - ACTIVE
                      - PENDING_CONFIRMATION
                      - REMOVED
                      - FAILED
                    description: >-
                      Status of the key:

                      - `ACTIVE` — registered: Pix sent to the key reach the
                      wallet.

                      - `PENDING_CONFIRMATION` — waiting for the confirmation
                      code sent to the phone number   or e-mail address (request
                      one with `request-otp`, then confirm it).

                      - `REMOVED` — removed from the wallet, or claimed by
                      another institution. A removed key   stays listed.

                      - `FAILED` — registering failed; `failReason` says why.
                      When the bank refused the key,   nothing was registered;
                      when it failed or didn't answer in time, the key may
                      have   been registered anyway.
                    example: ACTIVE
                  failReason:
                    type: string
                    description: >-
                      Why the registration was refused, as `<code> | <message>`
                      — for example `ENTRY_KEY_OWNED_BY_DIFFERENT_PERSON | The
                      key already exists in the provider, but is linked to
                      another person.` Only on `FAILED` keys.
                    example: >-
                      ENTRY_KEY_OWNED_BY_DIFFERENT_PARTICIPANT | The key is
                      linked to another institution.
                  type:
                    type: string
                    enum:
                      - PHONE
                      - EMAIL
                      - CPF
                      - CNPJ
                      - EVP
                    description: >-
                      Kind of key: `EVP` (random key), `CNPJ`, `CPF`, `EMAIL` or
                      `PHONE`.
                    example: EVP
                  value:
                    type: string
                    description: >-
                      The key: a lowercase UUID for `EVP`, digits only for `CPF`
                      and `CNPJ` (a CNPJ may carry letters in its first 12
                      positions), a lowercase e-mail address, or a phone number
                      as `+` and digits (`+5511987654321`). On a `FAILED` key,
                      what was sent — empty for an `EVP` that was never
                      generated.
                    example: 9f1c2e7a-4b3d-4e8f-a6c1-2d5b7e9f0a13
                  createdAt:
                    type: string
                    description: When the key was created (ISO 8601).
                    example: '2026-11-04T14:05:12.348Z'
                  updatedAt:
                    type: string
                    description: When the key was last updated (ISO 8601).
                    example: '2026-11-04T14:05:12.348Z'
                  __v:
                    type: number
                    description: Internal version of the record.
                    example: 0
                required:
                  - _id
                  - realmId
                  - organizationId
                  - accountId
                  - walletId
                  - environment
                  - account
                  - external
                  - status
                  - type
                  - value
                  - createdAt
                  - updatedAt
                  - __v
                description: >-
                  A Pix key of a wallet: an alias (a random key, a CPF or CNPJ,
                  an e-mail address or a phone number) registered in the Pix
                  directory so that payers can send Pix to the wallet without
                  its bank details.
        '400':
          description: '`WALLET_NOT_ACTIVE` — The wallet isn''t `ACTIVE`.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  traceId:
                    type: string
                    description: >-
                      Identifier of the request that failed. Quote it when
                      contacting support.
                    example: 1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b
                  code:
                    type: string
                    enum:
                      - WALLET_NOT_ACTIVE
                    description: >-
                      Stable, machine-readable error code. Branch on this, never
                      on `message`.
                  origin:
                    type: string
                    enum:
                      - BANKING
                    description: Service that produced the error.
                  message:
                    type: string
                    description: >-
                      Human-readable explanation. Its wording may change without
                      notice.
                required:
                  - traceId
                  - code
                  - origin
                  - message
              example:
                traceId: 1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b
                code: WALLET_NOT_ACTIVE
                origin: BANKING
                message: Wallet is not active
        '403':
          description: >-
            `FORBIDDEN_WALLET` — You aren't an organization admin and the wallet
            isn't shared with you as `OWNER` or `USER`.
          content:
            application/json:
              schema:
                type: object
                properties:
                  traceId:
                    type: string
                    description: >-
                      Identifier of the request that failed. Quote it when
                      contacting support.
                    example: 1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b
                  code:
                    type: string
                    enum:
                      - FORBIDDEN_WALLET
                    description: >-
                      Stable, machine-readable error code. Branch on this, never
                      on `message`.
                  origin:
                    type: string
                    enum:
                      - BANKING
                    description: Service that produced the error.
                  message:
                    type: string
                    description: >-
                      Human-readable explanation. Its wording may change without
                      notice.
                required:
                  - traceId
                  - code
                  - origin
                  - message
              example:
                traceId: 1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b
                code: FORBIDDEN_WALLET
                origin: BANKING
                message: >-
                  You do not have permission to perform this action on this
                  wallet
        '404':
          description: >-
            `ACCOUNT_NOT_FOUND` — No account with this ID exists in the
            organization.


            `WALLET_NOT_FOUND` — The account has no wallet with this ID in this
            environment — or, with `walletId` `default`, no main wallet.
          content:
            application/json:
              schema:
                type: object
                properties:
                  traceId:
                    type: string
                    description: >-
                      Identifier of the request that failed. Quote it when
                      contacting support.
                    example: 1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b
                  code:
                    type: string
                    enum:
                      - ACCOUNT_NOT_FOUND
                      - WALLET_NOT_FOUND
                    description: >-
                      Stable, machine-readable error code. Branch on this, never
                      on `message`.
                  origin:
                    type: string
                    enum:
                      - BANKING
                    description: Service that produced the error.
                  message:
                    type: string
                    description: >-
                      Human-readable explanation. Its wording may change without
                      notice.
                required:
                  - traceId
                  - code
                  - origin
                  - message
              example:
                traceId: 1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b
                code: ACCOUNT_NOT_FOUND
                origin: BANKING
                message: Account not found
        '422':
          description: >-
            `BAD_REQUEST` — A path or body field is invalid — for example
            `value` missing, or in the wrong format for `type`; `fields` lists
            each one.


            `ENTRY_KEY_OWNED_BY_DIFFERENT_PERSON` — Another person or company
            holds this key.


            `ENTRY_KEY_OWNED_BY_DIFFERENT_PARTICIPANT` — The key is registered
            at another bank or payment institution. Remove it there before
            registering it here.


            `ENTRY_ALREADY_EXISTS` — The key is already registered for this
            account.


            `EXCEEDED_ENTRIES_LIMIT` — The account already holds as many keys as
            it can.


            `KYC_NOT_APPROVED` — The account holder's registration isn't
            approved yet.


            `entry_locked_by_claim` — The key has an open claim (a portability
            or ownership claim) and can't be registered until it is settled.


            `BANKING_PROVIDER_VALIDATION_ERROR` — The bank refused a field of
            the key; `fields` names it.
          content:
            application/json:
              schema:
                type: object
                properties:
                  traceId:
                    type: string
                    description: >-
                      Identifier of the request that failed. Quote it when
                      contacting support.
                    example: 1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b
                  code:
                    type: string
                    enum:
                      - BAD_REQUEST
                      - ENTRY_KEY_OWNED_BY_DIFFERENT_PERSON
                      - ENTRY_KEY_OWNED_BY_DIFFERENT_PARTICIPANT
                      - ENTRY_ALREADY_EXISTS
                      - EXCEEDED_ENTRIES_LIMIT
                      - KYC_NOT_APPROVED
                      - entry_locked_by_claim
                      - BANKING_PROVIDER_VALIDATION_ERROR
                    description: >-
                      Stable, machine-readable error code. Branch on this, never
                      on `message`.
                  origin:
                    type: string
                    enum:
                      - BANKING
                    description: Service that produced the error.
                  message:
                    type: string
                    description: >-
                      Human-readable explanation. Its wording may change without
                      notice.
                  fields:
                    type: array
                    description: >-
                      One entry per invalid request field (validation errors
                      only).
                    items:
                      type: object
                      properties:
                        field:
                          type: string
                          description: >-
                            Path of the invalid field, e.g. `label` or
                            `values[0].value`.
                          example: label
                        message:
                          type: string
                          description: Why the field was rejected.
                          example: label is required
                        code:
                          type: string
                          description: >-
                            `<FIELD>_<REASON>` — e.g. `LABEL_REQUIRED`,
                            `TYPE_ONE_OF`, `VALUES_VALUE_TYPE_ERROR`.
                          example: LABEL_REQUIRED
                        values:
                          type: array
                          items:
                            type: string
                          description: >-
                            The accepted values, when the field is an
                            enumeration.
                      required:
                        - field
                        - message
                        - code
                required:
                  - traceId
                  - code
                  - origin
                  - message
              example:
                traceId: 1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b
                code: BAD_REQUEST
                origin: BANKING
                message: >-
                  Bad Request: Your request is invalid or incomplete. Please
                  make sure you are requesting with the right fields.
                fields:
                  - field: type
                    message: >-
                      Invalid option: expected one of
                      "EVP"|"CNPJ"|"CPF"|"EMAIL"|"PHONE"
                    code: TYPE_ONE_OF
                    values:
                      - EVP
                      - CNPJ
                      - CPF
                      - EMAIL
                      - PHONE
        '500':
          description: >-
            `BANKING_PROVIDER_UNAVAILABLE` — The bank answered with a server
            error. The key may or may not have been registered: retrying a CNPJ,
            CPF, e-mail or phone is safe (`ENTRY_ALREADY_EXISTS` means it was);
            retrying an `EVP` registers another random key.


            `BANKING_PROVIDER_INTEGRATION_ERROR` — The bank answered with an
            error this API doesn't recognize. The key may or may not have been
            registered.
          content:
            application/json:
              schema:
                type: object
                properties:
                  traceId:
                    type: string
                    description: >-
                      Identifier of the request that failed. Quote it when
                      contacting support.
                    example: 1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b
                  code:
                    type: string
                    enum:
                      - BANKING_PROVIDER_UNAVAILABLE
                      - BANKING_PROVIDER_INTEGRATION_ERROR
                    description: >-
                      Stable, machine-readable error code. Branch on this, never
                      on `message`.
                  origin:
                    type: string
                    enum:
                      - BANKING
                    description: Service that produced the error.
                  message:
                    type: string
                    description: >-
                      Human-readable explanation. Its wording may change without
                      notice.
                required:
                  - traceId
                  - code
                  - origin
                  - message
              example:
                traceId: 1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b
                code: BANKING_PROVIDER_UNAVAILABLE
                origin: BANKING
                message: Banking provider temporarily unavailable, please retry
        '502':
          description: >-
            `BANKING_PROVIDER_UNAVAILABLE` — The bank's gateway failed. The key
            may or may not have been registered: retrying a CNPJ, CPF, e-mail or
            phone is safe (`ENTRY_ALREADY_EXISTS` means it was); retrying an
            `EVP` registers another random key.
          content:
            application/json:
              schema:
                type: object
                properties:
                  traceId:
                    type: string
                    description: >-
                      Identifier of the request that failed. Quote it when
                      contacting support.
                    example: 1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b
                  code:
                    type: string
                    enum:
                      - BANKING_PROVIDER_UNAVAILABLE
                    description: >-
                      Stable, machine-readable error code. Branch on this, never
                      on `message`.
                  origin:
                    type: string
                    enum:
                      - BANKING
                    description: Service that produced the error.
                  message:
                    type: string
                    description: >-
                      Human-readable explanation. Its wording may change without
                      notice.
                required:
                  - traceId
                  - code
                  - origin
                  - message
              example:
                traceId: 1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b
                code: BANKING_PROVIDER_UNAVAILABLE
                origin: BANKING
                message: Banking provider temporarily unavailable, please retry
        '503':
          description: >-
            `BANKING_PROVIDER_UNAVAILABLE` — The bank was unavailable. The key
            may or may not have been registered: retrying a CNPJ, CPF, e-mail or
            phone is safe (`ENTRY_ALREADY_EXISTS` means it was); retrying an
            `EVP` registers another random key.
          content:
            application/json:
              schema:
                type: object
                properties:
                  traceId:
                    type: string
                    description: >-
                      Identifier of the request that failed. Quote it when
                      contacting support.
                    example: 1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b
                  code:
                    type: string
                    enum:
                      - BANKING_PROVIDER_UNAVAILABLE
                    description: >-
                      Stable, machine-readable error code. Branch on this, never
                      on `message`.
                  origin:
                    type: string
                    enum:
                      - BANKING
                    description: Service that produced the error.
                  message:
                    type: string
                    description: >-
                      Human-readable explanation. Its wording may change without
                      notice.
                required:
                  - traceId
                  - code
                  - origin
                  - message
              example:
                traceId: 1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b
                code: BANKING_PROVIDER_UNAVAILABLE
                origin: BANKING
                message: Banking provider temporarily unavailable, please retry
        '504':
          description: >-
            `BANKING_PROVIDER_UNAVAILABLE` — The bank didn't answer in time (its
            gateway's own timeout says "Banking provider temporarily
            unavailable, please retry"). The key may or may not have been
            registered: retrying a CNPJ, CPF, e-mail or phone is safe
            (`ENTRY_ALREADY_EXISTS` means it was); retrying an `EVP` registers
            another random key.
          content:
            application/json:
              schema:
                type: object
                properties:
                  traceId:
                    type: string
                    description: >-
                      Identifier of the request that failed. Quote it when
                      contacting support.
                    example: 1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b
                  code:
                    type: string
                    enum:
                      - BANKING_PROVIDER_UNAVAILABLE
                    description: >-
                      Stable, machine-readable error code. Branch on this, never
                      on `message`.
                  origin:
                    type: string
                    enum:
                      - BANKING
                    description: Service that produced the error.
                  message:
                    type: string
                    description: >-
                      Human-readable explanation. Its wording may change without
                      notice.
                required:
                  - traceId
                  - code
                  - origin
                  - message
              example:
                traceId: 1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b
                code: BANKING_PROVIDER_UNAVAILABLE
                origin: BANKING
                message: Banking provider did not respond in time, please retry

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.