Skip to main content
POST
/
api
/
v1
/
dict
/
keys
Register PIX key
curl --request POST \
  --url https://spi.sandbox.lerian.net/api/v1/dict/keys \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "accountNumber": "<string>",
  "keyType": "<string>",
  "keyValue": "<string>",
  "openingDate": "<string>",
  "ownerName": "<string>",
  "ownerTaxId": "<string>",
  "participantISPB": "<string>",
  "branch": "<string>",
  "ownerTradeName": "<string>"
}
'
import requests

url = "https://spi.sandbox.lerian.net/api/v1/dict/keys"

payload = {
"accountNumber": "<string>",
"keyType": "<string>",
"keyValue": "<string>",
"openingDate": "<string>",
"ownerName": "<string>",
"ownerTaxId": "<string>",
"participantISPB": "<string>",
"branch": "<string>",
"ownerTradeName": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
accountNumber: '<string>',
keyType: '<string>',
keyValue: '<string>',
openingDate: '<string>',
ownerName: '<string>',
ownerTaxId: '<string>',
participantISPB: '<string>',
branch: '<string>',
ownerTradeName: '<string>'
})
};

fetch('https://spi.sandbox.lerian.net/api/v1/dict/keys', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://spi.sandbox.lerian.net/api/v1/dict/keys",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'accountNumber' => '<string>',
'keyType' => '<string>',
'keyValue' => '<string>',
'openingDate' => '<string>',
'ownerName' => '<string>',
'ownerTaxId' => '<string>',
'participantISPB' => '<string>',
'branch' => '<string>',
'ownerTradeName' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://spi.sandbox.lerian.net/api/v1/dict/keys"

payload := strings.NewReader("{\n \"accountNumber\": \"<string>\",\n \"keyType\": \"<string>\",\n \"keyValue\": \"<string>\",\n \"openingDate\": \"<string>\",\n \"ownerName\": \"<string>\",\n \"ownerTaxId\": \"<string>\",\n \"participantISPB\": \"<string>\",\n \"branch\": \"<string>\",\n \"ownerTradeName\": \"<string>\"\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://spi.sandbox.lerian.net/api/v1/dict/keys")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"accountNumber\": \"<string>\",\n \"keyType\": \"<string>\",\n \"keyValue\": \"<string>\",\n \"openingDate\": \"<string>\",\n \"ownerName\": \"<string>\",\n \"ownerTaxId\": \"<string>\",\n \"participantISPB\": \"<string>\",\n \"branch\": \"<string>\",\n \"ownerTradeName\": \"<string>\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://spi.sandbox.lerian.net/api/v1/dict/keys")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"accountNumber\": \"<string>\",\n \"keyType\": \"<string>\",\n \"keyValue\": \"<string>\",\n \"openingDate\": \"<string>\",\n \"ownerName\": \"<string>\",\n \"ownerTaxId\": \"<string>\",\n \"participantISPB\": \"<string>\",\n \"branch\": \"<string>\",\n \"ownerTradeName\": \"<string>\"\n}"

response = http.request(request)
puts response.read_body
{
  "createdAt": "<string>",
  "id": "<string>",
  "keyType": "<string>",
  "keyValue": "<string>",
  "ownerName": "<string>",
  "ownerTaxId": "<string>",
  "participantISPB": "<string>",
  "status": "<string>",
  "updatedAt": "<string>",
  "accountNumber": "<string>",
  "branch": "<string>",
  "openingDate": "2023-11-07T05:31:56Z",
  "ownerTradeName": "<string>"
}
{
"code": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "about:blank"
}

Authorizations

Authorization
string
header
required

JWT bearer token issued by the identity provider.

Headers

Idempotency-Key
string

Idempotency key, max 255 characters

Body

application/json

PIX key to register (key type, value, owner identity, and participant ISPB); registration fails closed if BACEN DICT rejects or is unavailable

accountNumber
string
required

Account number (1..20 digits).

Example:

"9988776"

accountType
enum<string>
required

BACEN account type: CACC (current), TRAN (transactional), SLRY (salary), or SVGS (savings).

Available options:
CACC,
TRAN,
SLRY,
SVGS
Example:

"CACC"

keyType
string
required

PIX key type: CPF, CNPJ, EMAIL, PHONE, or EVP (random key).

Example:

"CPF"

keyValue
string
required

PIX key value, formatted according to keyType (e.g. 11 digits for CPF, E.164 for PHONE, an email address for EMAIL).

Example:

"12345678901"

openingDate
string
required

Account opening date, RFC 3339 (the FI account's opening date, not the key's creation moment).

Example:

"2020-01-15T00:00:00Z"

ownerName
string
required

Full legal name of the key owner.

Example:

"João Silva"

ownerTaxId
string
required

Owner tax identifier (CPF for individuals, CNPJ for businesses), digits only.

Example:

"12345678901"

participantISPB
string
required

Owning participant ISPB, the 8-digit BACEN institution identifier.

Example:

"12345678"

branch
string

Account branch (1..4 digits), optional.

Example:

"0001"

ownerTradeName
string

Owner trade name (legal-entity / CNPJ owners), optional.

Example:

"Silva ME"

Response

Created

Registered PIX key with its assigned status

createdAt
string
required

Key creation timestamp, RFC 3339 (UTC).

Example:

"2025-03-07T14:30:00Z"

id
string
required

Unique PIX key identifier (UUID) assigned by the service.

Example:

"550e8400-e29b-41d4-a716-446655440000"

keyType
string
required

PIX key type: CPF, CNPJ, EMAIL, PHONE, or EVP (random key).

Example:

"CPF"

keyValue
string
required

PIX key value in its canonical format for the key type.

Example:

"12345678901"

ownerName
string
required

Full legal name of the key owner.

Example:

"João Silva"

ownerTaxId
string
required

Owner tax identifier (CPF or CNPJ), digits only.

Example:

"12345678901"

participantISPB
string
required

Owning participant ISPB, the 8-digit BACEN institution identifier.

Example:

"12345678"

status
string
required

Key lifecycle status: ACTIVE, INACTIVE, PENDING_CLAIM, or PENDING_BACEN_SYNC.

Example:

"ACTIVE"

updatedAt
string
required

Timestamp of the last update to the key, RFC 3339 (UTC).

Example:

"2025-03-07T14:30:00Z"

accountNumber
string

Account number (1..20 digits), omitted for a tuple-less key.

Example:

"9988776"

accountType
enum<string>

BACEN account type (CACC, TRAN, SLRY, SVGS), omitted for a tuple-less key.

Available options:
CACC,
TRAN,
SLRY,
SVGS
Example:

"CACC"

branch
string

Account branch (1..4 digits), omitted when unset.

Example:

"0001"

openingDate
string<date-time>

Account opening date, RFC 3339, omitted for a tuple-less key.

Example:

"2020-01-15T00:00:00Z"

ownerTradeName
string

Owner trade name (legal-entity owners), omitted when unset.

Example:

"Silva ME"