curl --request PUT \
--url https://api.despezzas.com/v1/credit-card/{id} \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"account_id": "3a9e7d21-4b5c-4d6e-8f70-1a2b3c4d5e6f",
"closing_date": "3",
"expiring_date": "10",
"is_unlimited": false,
"limit": 1500000,
"name": "Nubank Mastercard"
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
account_id: '3a9e7d21-4b5c-4d6e-8f70-1a2b3c4d5e6f',
closing_date: '3',
expiring_date: '10',
is_unlimited: false,
limit: 1500000,
name: 'Nubank Mastercard'
})
};
fetch('https://api.despezzas.com/v1/credit-card/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.despezzas.com/v1/credit-card/{id}"
payload = {
"account_id": "3a9e7d21-4b5c-4d6e-8f70-1a2b3c4d5e6f",
"closing_date": "3",
"expiring_date": "10",
"is_unlimited": False,
"limit": 1500000,
"name": "Nubank Mastercard"
}
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/credit-card/{id}"
payload := strings.NewReader("{\n \"account_id\": \"3a9e7d21-4b5c-4d6e-8f70-1a2b3c4d5e6f\",\n \"closing_date\": \"3\",\n \"expiring_date\": \"10\",\n \"is_unlimited\": false,\n \"limit\": 1500000,\n \"name\": \"Nubank Mastercard\"\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))
}{
"account_id": "3a9e7d21-4b5c-4d6e-8f70-1a2b3c4d5e6f",
"closing_date": "3",
"expiring_date": "10",
"id": "c4d5e6f7-0a1b-4c2d-9e3f-4a5b6c7d8e9f",
"logo": "https://cdn.despezzas.com/banks/nubank.png",
"name": "Nubank Mastercard",
"user_id": "0d6b923c-3392-424e-a152-2ee32474e8d5",
"available_limit": 1315000,
"createdAt": "2026-09-01T09:00:00.000Z",
"is_unlimited": false,
"limit": 1500000,
"needs_closing_date_review": false,
"profile_id": null,
"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 cartão
Escopo necessário: write.
curl --request PUT \
--url https://api.despezzas.com/v1/credit-card/{id} \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"account_id": "3a9e7d21-4b5c-4d6e-8f70-1a2b3c4d5e6f",
"closing_date": "3",
"expiring_date": "10",
"is_unlimited": false,
"limit": 1500000,
"name": "Nubank Mastercard"
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
account_id: '3a9e7d21-4b5c-4d6e-8f70-1a2b3c4d5e6f',
closing_date: '3',
expiring_date: '10',
is_unlimited: false,
limit: 1500000,
name: 'Nubank Mastercard'
})
};
fetch('https://api.despezzas.com/v1/credit-card/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.despezzas.com/v1/credit-card/{id}"
payload = {
"account_id": "3a9e7d21-4b5c-4d6e-8f70-1a2b3c4d5e6f",
"closing_date": "3",
"expiring_date": "10",
"is_unlimited": False,
"limit": 1500000,
"name": "Nubank Mastercard"
}
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/credit-card/{id}"
payload := strings.NewReader("{\n \"account_id\": \"3a9e7d21-4b5c-4d6e-8f70-1a2b3c4d5e6f\",\n \"closing_date\": \"3\",\n \"expiring_date\": \"10\",\n \"is_unlimited\": false,\n \"limit\": 1500000,\n \"name\": \"Nubank Mastercard\"\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))
}{
"account_id": "3a9e7d21-4b5c-4d6e-8f70-1a2b3c4d5e6f",
"closing_date": "3",
"expiring_date": "10",
"id": "c4d5e6f7-0a1b-4c2d-9e3f-4a5b6c7d8e9f",
"logo": "https://cdn.despezzas.com/banks/nubank.png",
"name": "Nubank Mastercard",
"user_id": "0d6b923c-3392-424e-a152-2ee32474e8d5",
"available_limit": 1315000,
"createdAt": "2026-09-01T09:00:00.000Z",
"is_unlimited": false,
"limit": 1500000,
"needs_closing_date_review": false,
"profile_id": null,
"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
Todos opcionais: só o que for enviado é alterado.
Conta de pagamento.
"3a9e7d21-4b5c-4d6e-8f70-1a2b3c4d5e6f"
Dia do fechamento (1–31).
"3"
Dia do vencimento (1–31).
"10"
Sem limite.
false
Limite. Em centavos.
1500000
Nome.
"Nubank Mastercard"
Response
Sucesso.
Conta de pagamento.
"3a9e7d21-4b5c-4d6e-8f70-1a2b3c4d5e6f"
Dia do fechamento (1–31).
"3"
Dia do vencimento (1–31).
"10"
Id do cartão.
"c4d5e6f7-0a1b-4c2d-9e3f-4a5b6c7d8e9f"
Bandeira/logo (URL).
"https://cdn.despezzas.com/banks/nubank.png"
Nome.
"Nubank Mastercard"
Dono.
"0d6b923c-3392-424e-a152-2ee32474e8d5"
Limite disponível. Em centavos.
1315000
Criação.
"2026-09-01T09:00:00.000Z"
Sem limite definido.
false
Limite total. Em centavos.
1500000
Se o dia de fechamento importado precisa de confirmação.
false
Perfil de Acesso / empresa.
null
Última alteração.
"2026-09-15T14:32:10.000Z"