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

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

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

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

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

fetch('https://spi.sandbox.lerian.net/api/v1/dict/keys/{key}', 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/{key}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'reason' => '<string>',
'accountNumber' => '<string>',
'accountType' => '<string>',
'branch' => '<string>',
'keyType' => '<string>',
'ownerName' => '<string>',
'ownerTaxId' => '<string>',
'ownerTradeName' => '<string>',
'participantISPB' => '<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/{key}"

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

req, _ := http.NewRequest("PUT", 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.put("https://spi.sandbox.lerian.net/api/v1/dict/keys/{key}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"reason\": \"<string>\",\n \"accountNumber\": \"<string>\",\n \"accountType\": \"<string>\",\n \"branch\": \"<string>\",\n \"keyType\": \"<string>\",\n \"ownerName\": \"<string>\",\n \"ownerTaxId\": \"<string>\",\n \"ownerTradeName\": \"<string>\",\n \"participantISPB\": \"<string>\"\n}")
.asString();
require 'uri'
require 'net/http'

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

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

request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"reason\": \"<string>\",\n \"accountNumber\": \"<string>\",\n \"accountType\": \"<string>\",\n \"branch\": \"<string>\",\n \"keyType\": \"<string>\",\n \"ownerName\": \"<string>\",\n \"ownerTaxId\": \"<string>\",\n \"ownerTradeName\": \"<string>\",\n \"participantISPB\": \"<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.

Path Parameters

key
string
required

PIX key value to update (the immutable identifier).

Body

application/json

Mutable key fields (account + owner name/trade name) and the update reason; keyType and ownerTaxId are immutable and rejected if changed.

reason
string
required

Update reason: USER_REQUESTED (not for EVP keys), BRANCH_TRANSFER, RECONCILIATION, or RFB_VALIDATION.

Example:

"BRANCH_TRANSFER"

accountNumber
string

New account number (account mutable field).

Example:

"9988776"

accountType
string

New account type (account mutable field).

Example:

"CACC"

branch
string

New account branch (account mutable field).

Example:

"0001"

keyType
string

Immutable: supplying a value differing from the stored keyType is rejected.

Example:

"CPF"

ownerName
string

New owner legal name (owner mutable field).

Example:

"João Silva"

ownerTaxId
string

Immutable: supplying a value differing from the stored ownerTaxId is rejected.

Example:

"12345678901"

ownerTradeName
string

New owner trade name (owner mutable field).

Example:

"Silva ME"

participantISPB
string

New owning participant ISPB (account mutable field).

Example:

"12345678"

Response

OK

Updated PIX key with its mutable fields applied

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"