Produto BaaS (titular). Requer Bearer JWT do login da conta e assinatura HMAC obrigatória. Scope: baas.key-managements.write. Guia: documentação técnica.
stringAssinatura HMAC-SHA256 da requisição (hex).
stringTimestamp Unix (segundos, UTC) usado na assinatura.
stringNonce único por requisição (anti-replay).
stringRequer Bearer token do login da conta e assinatura HMAC obrigatórios.
Scope: baas.key-managements.write.
Envie X-Signature, X-Timestamp e X-Nonce em todo pedido assinado. Veja Autenticação do parceiro.
| Header | Obrigatório | Descrição |
|---|---|---|
Authorization | Sim | Bearer {{access_token}} |
Accept | Sim | application/json |
X-Signature | Sim | Assinatura HMAC |
X-Timestamp | Sim | Timestamp da assinatura |
X-Nonce | Sim | Nonce único por requisição |
| Campo | Tipo | Descrição |
|---|---|---|
key_type | integer | 0 CPF, 1 CNPJ, 2 e-mail, 3 telefone, 4 EVP |
key | string | Obrigatório para tipos 0 a 3. Omitir para EVP |
status: active (ativação imediata).need_confirmation: true. Em seguida: verification-code (verified) e store-after-verification (active).| Código | Descrição |
|---|---|
| 200 | OK |
| 201 | Recurso criado |
| 400 | Parâmetros inválidos |
| 401 | Token ou HMAC inválido |
| 403 | Scope ausente |
| 404 | Não encontrado |
| 422 | Validação ou regra de negócio |
| 500 | Erro interno |
curl --request POST \
--url 'https://api-h.nuvende.com.br/api/v2/baas/key-managements' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {{access_token}}' \
--header 'X-Timestamp: {{timestamp}}' \
--header 'X-Nonce: {{nonce}}' \
--header 'X-Signature: {{signature}}' \
--data '{
"key_type": 2,
"key": "[email protected]"
}'
const axios = require("axios");
const data = {
key_type: 2,
key: "[email protected]",
};
axios({
method: "post",
url: "https://api-h.nuvende.com.br/api/v2/baas/key-managements",
headers: {
"Content-Type": "application/json",
Accept: "application/json",
Authorization: "Bearer {{access_token}}",
"X-Timestamp": "{{timestamp}}",
"X-Nonce": "{{nonce}}",
"X-Signature": "{{signature}}",
},
data,
})
.then((response) => console.log(JSON.stringify(response.data)))
.catch((error) => console.log(error.response?.data || error.message));
import json
import requests
url = "https://api-h.nuvende.com.br/api/v2/baas/key-managements"
payload = {
"key_type": 2,
"key": "[email protected]",
}
headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {{access_token}}",
"X-Timestamp": "{{timestamp}}",
"X-Nonce": "{{nonce}}",
"X-Signature": "{{signature}}",
}
response = requests.post(url, headers=headers, data=json.dumps(payload))
print(response.text)
<?php
$curl = curl_init();
$opts = [
CURLOPT_URL => 'https://api-h.nuvende.com.br/api/v2/baas/key-managements',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => '{
"key_type": 2,
"key": "[email protected]"
}',
CURLOPT_HTTPHEADER => [
'Content-Type: application/json',
'Accept: application/json',
'Authorization: Bearer {{access_token}}',
'X-Timestamp: {{timestamp}}',
'X-Nonce: {{nonce}}',
'X-Signature: {{signature}}',
],
];
curl_setopt_array($curl, $opts);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
{
"need_confirmation": true
}
curl --request POST \
--url 'https://api-h.nuvende.com.br/api/v2/baas/key-managements' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {{access_token}}' \
--header 'X-Timestamp: {{timestamp}}' \
--header 'X-Nonce: {{nonce}}' \
--header 'X-Signature: {{signature}}' \
--data '{"key_type":0,"key":"11144477735"}'
curl --request POST \
--url 'https://api-h.nuvende.com.br/api/v2/baas/key-managements' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {{access_token}}' \
--header 'X-Timestamp: {{timestamp}}' \
--header 'X-Nonce: {{nonce}}' \
--header 'X-Signature: {{signature}}' \
--data '{"key_type":1,"key":"43587980000107"}'
curl --request POST \
--url 'https://api-h.nuvende.com.br/api/v2/baas/key-managements' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {{access_token}}' \
--header 'X-Timestamp: {{timestamp}}' \
--header 'X-Nonce: {{nonce}}' \
--header 'X-Signature: {{signature}}' \
--data '{"key_type":3,"key":"11987654321"}'
curl --request POST \
--url 'https://api-h.nuvende.com.br/api/v2/baas/key-managements' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {{access_token}}' \
--header 'X-Timestamp: {{timestamp}}' \
--header 'X-Nonce: {{nonce}}' \
--header 'X-Signature: {{signature}}' \
--data '{"key_type":4}'
{
"id": 3,
"key": "550e8400-e29b-41d4-a716-446655440000",
"key_type": 4,
"status": "active"
}
Fluxo OTP (e-mail ou telefone): POST /key-managements → POST /verification-code → POST /{id}/store-after-verification.
{
"message": "Pix Key already exist."
}
{
"message": "An error occurred while creating the key, please try again in a moment"
}
{
"key_type": ["The key type field is required."]
}