curl --request GET \
--url https://api.despezzas.com/v1/reports/forecast \
--header 'Authorization: Basic <encoded-value>'const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api.despezzas.com/v1/reports/forecast', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.despezzas.com/v1/reports/forecast"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.despezzas.com/v1/reports/forecast"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"as_of": "2026-09-15",
"averages": {
"account_expenses": 420000,
"bill_payments": 190000,
"card_purchases": 185000,
"result": 190000,
"revenues": 800000
},
"basis": "cash",
"confidence": "high",
"current_balance": 1250000,
"estimated_by_category": {
"account": [
{
"average_monthly": 120000,
"id": "b1a2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
"share_percent": 18.4,
"title": "Alimentação",
"icon_background_color": "#F97316",
"icon_name": "restaurant",
"image": null,
"is_essential": true
}
],
"card": [
{
"average_monthly": 120000,
"id": "b1a2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
"share_percent": 18.4,
"title": "Alimentação",
"icon_background_color": "#F97316",
"icon_name": "restaurant",
"image": null,
"is_essential": true
}
]
},
"forecast": [
{
"card_bills_due": 185000,
"expenses": {
"account": {
"estimated": 110000,
"installments": 60000,
"planned": 0,
"recurring": 250000,
"subscriptions": 30000,
"total": 450000
},
"card_bills": {
"committed": 60000,
"projected_estimated": 95000,
"projected_recurring": 30000,
"total": 185000
},
"total": 635000
},
"is_current": false,
"items": {
"installments": [
{
"amount": 5590,
"informational": false,
"is_expense": true,
"key": "sub:netflix",
"source": "detected",
"title": "Netflix",
"via": "card_bill",
"account_id": null,
"category": {
"id": "b1a2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
"is_essential": true,
"title": "Alimentação",
"icon_background_color": "#F97316",
"icon_name": "restaurant",
"image": null
},
"credit_card_id": "c4d5e6f7-0a1b-4c2d-9e3f-4a5b6c7d8e9f",
"date": "2026-10-05",
"id": "8f1c2a34-5b6d-4e7f-8a9b-0c1d2e3f4a5b",
"installment_label": null,
"logo_url": null,
"months_seen": 6
}
],
"recurring": [
{
"amount": 5590,
"informational": false,
"is_expense": true,
"key": "sub:netflix",
"source": "detected",
"title": "Netflix",
"via": "card_bill",
"account_id": null,
"category": {
"id": "b1a2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
"is_essential": true,
"title": "Alimentação",
"icon_background_color": "#F97316",
"icon_name": "restaurant",
"image": null
},
"credit_card_id": "c4d5e6f7-0a1b-4c2d-9e3f-4a5b6c7d8e9f",
"date": "2026-10-05",
"id": "8f1c2a34-5b6d-4e7f-8a9b-0c1d2e3f4a5b",
"installment_label": null,
"logo_url": null,
"months_seen": 6
}
],
"subscriptions": [
{
"amount": 5590,
"informational": false,
"is_expense": true,
"key": "sub:netflix",
"source": "detected",
"title": "Netflix",
"via": "card_bill",
"account_id": null,
"category": {
"id": "b1a2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
"is_essential": true,
"title": "Alimentação",
"icon_background_color": "#F97316",
"icon_name": "restaurant",
"image": null
},
"credit_card_id": "c4d5e6f7-0a1b-4c2d-9e3f-4a5b6c7d8e9f",
"date": "2026-10-05",
"id": "8f1c2a34-5b6d-4e7f-8a9b-0c1d2e3f4a5b",
"installment_label": null,
"logo_url": null,
"months_seen": 6
}
]
},
"period": "2026-10",
"result": 165000,
"revenues": {
"committed": 0,
"estimated": 0,
"recurring": 800000,
"total": 800000
},
"running_balance": 1415000
}
],
"history": [
{
"card_purchases": 190000,
"expenses": {
"account": {
"installments": 60000,
"recurring": 250000,
"subscriptions": 30000,
"total": 450000,
"variable": 110000
},
"bill_payments": 190000,
"total": 640000
},
"is_current": false,
"period": "2026-08",
"result": 140000,
"revenues": {
"total": 780000
}
}
],
"history_months": 6,
"history_months_used": 6,
"months": 3,
"totals": {
"card_bills_due": 555000,
"ending_balance": 1745000,
"expenses": 1905000,
"lowest_balance": {
"period": "2026-10",
"running_balance": 1250000
},
"result": 495000,
"revenues": 2400000
}
}{
"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"
}Previsão
Projeção dos próximos meses (regime de caixa) a partir do histórico.
Escopo necessário: read.
curl --request GET \
--url https://api.despezzas.com/v1/reports/forecast \
--header 'Authorization: Basic <encoded-value>'const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api.despezzas.com/v1/reports/forecast', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.despezzas.com/v1/reports/forecast"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.despezzas.com/v1/reports/forecast"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"as_of": "2026-09-15",
"averages": {
"account_expenses": 420000,
"bill_payments": 190000,
"card_purchases": 185000,
"result": 190000,
"revenues": 800000
},
"basis": "cash",
"confidence": "high",
"current_balance": 1250000,
"estimated_by_category": {
"account": [
{
"average_monthly": 120000,
"id": "b1a2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
"share_percent": 18.4,
"title": "Alimentação",
"icon_background_color": "#F97316",
"icon_name": "restaurant",
"image": null,
"is_essential": true
}
],
"card": [
{
"average_monthly": 120000,
"id": "b1a2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
"share_percent": 18.4,
"title": "Alimentação",
"icon_background_color": "#F97316",
"icon_name": "restaurant",
"image": null,
"is_essential": true
}
]
},
"forecast": [
{
"card_bills_due": 185000,
"expenses": {
"account": {
"estimated": 110000,
"installments": 60000,
"planned": 0,
"recurring": 250000,
"subscriptions": 30000,
"total": 450000
},
"card_bills": {
"committed": 60000,
"projected_estimated": 95000,
"projected_recurring": 30000,
"total": 185000
},
"total": 635000
},
"is_current": false,
"items": {
"installments": [
{
"amount": 5590,
"informational": false,
"is_expense": true,
"key": "sub:netflix",
"source": "detected",
"title": "Netflix",
"via": "card_bill",
"account_id": null,
"category": {
"id": "b1a2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
"is_essential": true,
"title": "Alimentação",
"icon_background_color": "#F97316",
"icon_name": "restaurant",
"image": null
},
"credit_card_id": "c4d5e6f7-0a1b-4c2d-9e3f-4a5b6c7d8e9f",
"date": "2026-10-05",
"id": "8f1c2a34-5b6d-4e7f-8a9b-0c1d2e3f4a5b",
"installment_label": null,
"logo_url": null,
"months_seen": 6
}
],
"recurring": [
{
"amount": 5590,
"informational": false,
"is_expense": true,
"key": "sub:netflix",
"source": "detected",
"title": "Netflix",
"via": "card_bill",
"account_id": null,
"category": {
"id": "b1a2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
"is_essential": true,
"title": "Alimentação",
"icon_background_color": "#F97316",
"icon_name": "restaurant",
"image": null
},
"credit_card_id": "c4d5e6f7-0a1b-4c2d-9e3f-4a5b6c7d8e9f",
"date": "2026-10-05",
"id": "8f1c2a34-5b6d-4e7f-8a9b-0c1d2e3f4a5b",
"installment_label": null,
"logo_url": null,
"months_seen": 6
}
],
"subscriptions": [
{
"amount": 5590,
"informational": false,
"is_expense": true,
"key": "sub:netflix",
"source": "detected",
"title": "Netflix",
"via": "card_bill",
"account_id": null,
"category": {
"id": "b1a2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
"is_essential": true,
"title": "Alimentação",
"icon_background_color": "#F97316",
"icon_name": "restaurant",
"image": null
},
"credit_card_id": "c4d5e6f7-0a1b-4c2d-9e3f-4a5b6c7d8e9f",
"date": "2026-10-05",
"id": "8f1c2a34-5b6d-4e7f-8a9b-0c1d2e3f4a5b",
"installment_label": null,
"logo_url": null,
"months_seen": 6
}
]
},
"period": "2026-10",
"result": 165000,
"revenues": {
"committed": 0,
"estimated": 0,
"recurring": 800000,
"total": 800000
},
"running_balance": 1415000
}
],
"history": [
{
"card_purchases": 190000,
"expenses": {
"account": {
"installments": 60000,
"recurring": 250000,
"subscriptions": 30000,
"total": 450000,
"variable": 110000
},
"bill_payments": 190000,
"total": 640000
},
"is_current": false,
"period": "2026-08",
"result": 140000,
"revenues": {
"total": 780000
}
}
],
"history_months": 6,
"history_months_used": 6,
"months": 3,
"totals": {
"card_bills_due": 555000,
"ending_balance": 1745000,
"expenses": 1905000,
"lowest_balance": {
"period": "2026-10",
"running_balance": 1250000
},
"result": 495000,
"revenues": 2400000
}
}{
"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.
Query Parameters
Meses a projetar (1–12). Padrão: 6.
6
Filtra pelas contas informadas (repita o parâmetro ou use account_ids[]). Também aceita a forma account_ids[].
["3a9e7d21-4b5c-4d6e-8f70-1a2b3c4d5e6f"]
Filtra pelos cartões informados. Também aceita a forma credit_card_ids[].
["c4d5e6f7-0a1b-4c2d-9e3f-4a5b6c7d8e9f"]
Response
Sucesso.
Projeção dos próximos meses a partir do histórico: compromissos, recorrências detectadas e estimativas por categoria.
Data de referência (YYYY-MM-DD).
"2026-09-15"
Show child attributes
Show child attributes
Regime.
cash "cash"
Confiança da projeção.
low, medium, high "high"
Saldo atual. Em centavos.
1250000
Show child attributes
Show child attributes
Meses projetados.
Show child attributes
Show child attributes
Meses passados usados na projeção.
Show child attributes
Show child attributes
Meses de histórico considerados.
6
Meses de histórico com dados.
6
Meses projetados.
3
Show child attributes
Show child attributes