curl --request PUT \
--url https://api.despezzas.com/v1/accounts/{id} \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"logo": "https://cdn.despezzas.com/banks/nubank.png",
"name": "Nubank"
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({logo: 'https://cdn.despezzas.com/banks/nubank.png', name: 'Nubank'})
};
fetch('https://api.despezzas.com/v1/accounts/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.despezzas.com/v1/accounts/{id}"
payload = {
"logo": "https://cdn.despezzas.com/banks/nubank.png",
"name": "Nubank"
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.despezzas.com/v1/accounts/{id}"
payload := strings.NewReader("{\n \"logo\": \"https://cdn.despezzas.com/banks/nubank.png\",\n \"name\": \"Nubank\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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))
}{
"id": "3a9e7d21-4b5c-4d6e-8f70-1a2b3c4d5e6f",
"include_total_balance": true,
"is_default": true,
"logo": "https://cdn.despezzas.com/banks/nubank.png",
"name": "Nubank",
"user_id": "0d6b923c-3392-424e-a152-2ee32474e8d5",
"balance": 1250000,
"createdAt": "2026-09-01T09:00:00.000Z",
"profile_id": null,
"subtype": null,
"type": "PERSONAL_BANK",
"updatedAt": "2026-09-15T14:32:10.000Z"
}{
"message": "Credenciais de API inválidas",
"statusCode": 401,
"error": "Unauthorized"
}{
"message": "Credenciais de API inválidas",
"statusCode": 401,
"error": "Unauthorized"
}{
"message": "Credenciais de API inválidas",
"statusCode": 401,
"error": "Unauthorized"
}{
"message": "Credenciais de API inválidas",
"statusCode": 401,
"error": "Unauthorized"
}{
"message": "Credenciais de API inválidas",
"statusCode": 401,
"error": "Unauthorized"
}Atualizar conta
name e logo continuam obrigatórios; os demais campos só mudam se enviados.
Escopo necessário: write.
curl --request PUT \
--url https://api.despezzas.com/v1/accounts/{id} \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"logo": "https://cdn.despezzas.com/banks/nubank.png",
"name": "Nubank"
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({logo: 'https://cdn.despezzas.com/banks/nubank.png', name: 'Nubank'})
};
fetch('https://api.despezzas.com/v1/accounts/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.despezzas.com/v1/accounts/{id}"
payload = {
"logo": "https://cdn.despezzas.com/banks/nubank.png",
"name": "Nubank"
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.despezzas.com/v1/accounts/{id}"
payload := strings.NewReader("{\n \"logo\": \"https://cdn.despezzas.com/banks/nubank.png\",\n \"name\": \"Nubank\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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))
}{
"id": "3a9e7d21-4b5c-4d6e-8f70-1a2b3c4d5e6f",
"include_total_balance": true,
"is_default": true,
"logo": "https://cdn.despezzas.com/banks/nubank.png",
"name": "Nubank",
"user_id": "0d6b923c-3392-424e-a152-2ee32474e8d5",
"balance": 1250000,
"createdAt": "2026-09-01T09:00:00.000Z",
"profile_id": null,
"subtype": null,
"type": "PERSONAL_BANK",
"updatedAt": "2026-09-15T14:32:10.000Z"
}{
"message": "Credenciais de API inválidas",
"statusCode": 401,
"error": "Unauthorized"
}{
"message": "Credenciais de API inválidas",
"statusCode": 401,
"error": "Unauthorized"
}{
"message": "Credenciais de API inválidas",
"statusCode": 401,
"error": "Unauthorized"
}{
"message": "Credenciais de API inválidas",
"statusCode": 401,
"error": "Unauthorized"
}{
"message": "Credenciais de API inválidas",
"statusCode": 401,
"error": "Unauthorized"
}Authorizations
HTTP Basic com o token como usuário e o secret como senha: curl -u dpz_tk_…:dpz_sk_…. Crie a chave em https://despezzas.com/settings/api-keys.
Path Parameters
Identificador do recurso.
"8f1c2a34-5b6d-4e7f-8a9b-0c1d2e3f4a5b"
Body
Logo: URL ou código de banco da lista pública.
"https://cdn.despezzas.com/banks/nubank.png"
Nome.
"Nubank"
Saldo inicial. Em centavos.
1250000
Se entra no saldo total. Padrão: true.
true
Tipo. Padrão: PERSONAL_BANK.
PERSONAL_BANK, BUSINESS_BANK, INVESTMENT, OTHER "PERSONAL_BANK"
Response
Sucesso.
Id da conta.
"3a9e7d21-4b5c-4d6e-8f70-1a2b3c4d5e6f"
Se entra no saldo total.
true
Conta padrão do contexto.
true
Logo do banco (URL).
"https://cdn.despezzas.com/banks/nubank.png"
Nome.
"Nubank"
Dono.
"0d6b923c-3392-424e-a152-2ee32474e8d5"
Saldo atual. Em centavos.
1250000
Criação.
"2026-09-01T09:00:00.000Z"
Perfil de Acesso / empresa.
null
Subtipo informado pelo banco (Open Finance).
null
Tipo.
PERSONAL_BANK, BUSINESS_BANK, INVESTMENT, OTHER, null "PERSONAL_BANK"
Última alteração.
"2026-09-15T14:32:10.000Z"