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

# Pix key formats

> Check which Pix key types the API accepts and the regular expression that validates each one.

A Pix key identifies a bank account in the Pix ecosystem, so it is the simplest thing to ask a customer for before a payout; the API accepts the five key types below and validates each one with the regular expression shown.

| Type | Regex | Example | V2 `type` |
| - | - | - | - |
| Email | `^[a-z0-9.!#$%&'*+/=?^_{}~-]+@[a-z0-9-]+(?:\.[a-z0-9-]+)*$` | `johndoe@example.com` | `email` |
| Phone number | `^\+[1-9][0-9]\d{1,14}$` | `+5510998765432` | `phone` |
| CPF (tax number) | `^[0-9]{11}$` | `12345678901` | `tax_number` |
| CNPJ (tax number) | `^[A-Z0-9]{12}[0-9]{2}$` | `AB12CD3400EF95` *(also accepts `12345678901234`)* | `tax_number` |
| Random key | `^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$` | `123e4567-e89b-12d3-a456-426655440000` | `random_key` |

> [!NOTE]
>
> As of July 01, 2026, a CNPJ may contain alphanumeric characters. The validation accepts both the legacy numeric format and the new alphanumeric format defined by the Brazilian Federal Revenue Service.

Before paying a key, check it with [`POST /v2/out/pix/keys/check`](https://docs.trio.com.br/v2/api-reference/banking-api/payments/pix/transfer-pix/check-key), sending the `entity_id` that pays and the `key`. The response returns the key `type`, the resolved `counterparty` and the check `id`, which [`POST /v2/out/pix`](https://docs.trio.com.br/v2/api-reference/banking-api/payments/pix/transfer-pix/generate-pix-payment) takes as `check_id`; the [Cash out](https://docs.trio.com.br/v2/guides/payments/cash-out.md) guide walks through the payment. To register a Pix key on one of your own bank accounts, see [Create a Pix key](https://docs.trio.com.br/v2/api-reference/banking-api/receivables/pix-keys/create-pix-key.md).


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