curl --request PUT \
--url https://api.despezzas.com/v1/spending-limits/{id} \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": 60000,
"category_id": "b1a2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
"frequency": "MONTHLY",
"start_date": "2026-09-01",
"title": "Delivery"
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amount: 60000,
category_id: 'b1a2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d',
frequency: 'MONTHLY',
start_date: '2026-09-01',
title: 'Delivery'
})
};
fetch('https://api.despezzas.com/v1/spending-limits/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.despezzas.com/v1/spending-limits/{id}"
payload = {
"amount": 60000,
"category_id": "b1a2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
"frequency": "MONTHLY",
"start_date": "2026-09-01",
"title": "Delivery"
}
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/spending-limits/{id}"
payload := strings.NewReader("{\n \"amount\": 60000,\n \"category_id\": \"b1a2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d\",\n \"frequency\": \"MONTHLY\",\n \"start_date\": \"2026-09-01\",\n \"title\": \"Delivery\"\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))
}{
"amount": 60000,
"id": "c0d1e2f3-a4b5-4c6d-8e7f-8a9b0c1d2e3f",
"title": "Delivery",
"user_id": "0d6b923c-3392-424e-a152-2ee32474e8d5",
"category_id": "b1a2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
"createdAt": "2026-09-01T09:00:00.000Z",
"frequency": "MONTHLY",
"notification_percentage": 80,
"profile_id": null,
"start_date": "2026-09-01",
"subcategory_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 limite
Mesmos campos obrigatórios da criação.
Escopo necessário: write.
curl --request PUT \
--url https://api.despezzas.com/v1/spending-limits/{id} \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": 60000,
"category_id": "b1a2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
"frequency": "MONTHLY",
"start_date": "2026-09-01",
"title": "Delivery"
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amount: 60000,
category_id: 'b1a2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d',
frequency: 'MONTHLY',
start_date: '2026-09-01',
title: 'Delivery'
})
};
fetch('https://api.despezzas.com/v1/spending-limits/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.despezzas.com/v1/spending-limits/{id}"
payload = {
"amount": 60000,
"category_id": "b1a2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
"frequency": "MONTHLY",
"start_date": "2026-09-01",
"title": "Delivery"
}
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/spending-limits/{id}"
payload := strings.NewReader("{\n \"amount\": 60000,\n \"category_id\": \"b1a2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d\",\n \"frequency\": \"MONTHLY\",\n \"start_date\": \"2026-09-01\",\n \"title\": \"Delivery\"\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))
}{
"amount": 60000,
"id": "c0d1e2f3-a4b5-4c6d-8e7f-8a9b0c1d2e3f",
"title": "Delivery",
"user_id": "0d6b923c-3392-424e-a152-2ee32474e8d5",
"category_id": "b1a2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
"createdAt": "2026-09-01T09:00:00.000Z",
"frequency": "MONTHLY",
"notification_percentage": 80,
"profile_id": null,
"start_date": "2026-09-01",
"subcategory_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
Limite. Em centavos.
60000
Categoria.
"b1a2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d"
Frequência (aceita minúsculas).
DAILY, WEEKLY, BIWEEKLY, MONTHLY, BIMONTHLY, QUARTERLY, SEMIANNUAL, ANNUAL "MONTHLY"
Início da primeira janela (YYYY-MM-DD).
"2026-09-01"
Título.
"Delivery"
Percentual que dispara o aviso.
80
Restringe a uma subcategoria.
null
Response
Sucesso.
Limite. Em centavos.
60000
Id.
"c0d1e2f3-a4b5-4c6d-8e7f-8a9b0c1d2e3f"
Título.
"Delivery"
Dono.
"0d6b923c-3392-424e-a152-2ee32474e8d5"
Categoria.
"b1a2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d"
Criação.
"2026-09-01T09:00:00.000Z"
Frequência.
DAILY, WEEKLY, BIWEEKLY, MONTHLY, BIMONTHLY, QUARTERLY, SEMIANNUAL, ANNUAL, null "MONTHLY"
Percentual que dispara o aviso.
80
Perfil de Acesso / empresa.
null
Início (YYYY-MM-DD).
"2026-09-01"
Subcategoria (null = categoria inteira).
null
Última alteração.
"2026-09-15T14:32:10.000Z"