Listar metas
curl --request GET \
--url https://api.despezzas.com/v2/goals \
--header 'Authorization: Basic <encoded-value>'const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api.despezzas.com/v2/goals', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.despezzas.com/v2/goals"
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/v2/goals"
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))
}{
"goals": [
{
"amount": 3000000,
"concluded": false,
"id": "a3b4c5d6-e7f8-4a9b-8c0d-1e2f3a4b5c6d",
"title": "Reserva de emergência",
"values": [
{
"createdAt": "2026-09-01T09:00:00.000Z",
"date": "2026-09-15T00:00:00.000Z",
"goal_id": "a3b4c5d6-e7f8-4a9b-8c0d-1e2f3a4b5c6d",
"id": "b9c8d7e6-f5a4-4b3c-8d2e-1f0a9b8c7d6e",
"is_expense": false,
"updatedAt": "2026-09-15T14:32:10.000Z",
"value": 50000
}
],
"category": {
"editions": [
{
"category_id": "b1a2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
"created_at": "2026-09-01T09:00:00.000Z",
"icon": null,
"icon_background_color": null,
"icon_name": null,
"id": "e8f9a0b1-c2d3-4e4f-8a5b-6c7d8e9f0a1b",
"is_essential": null,
"is_hidden": null,
"name": "Mercado",
"profile_id": null,
"updated_at": "2026-09-15T14:32:10.000Z",
"user_id": "0d6b923c-3392-424e-a152-2ee32474e8d5"
}
],
"id": "b1a2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
"is_essential": true,
"is_hidden": false,
"name": "Alimentação",
"createdAt": "2026-09-01T09:00:00.000Z",
"icon": null,
"icon_background_color": "#F97316",
"icon_name": "restaurant",
"image": null,
"profile_id": null,
"updatedAt": "2026-09-15T14:32:10.000Z",
"user_id": null
},
"category_id": null,
"createdAt": "2026-09-01T09:00:00.000Z",
"deadline": "2027-06-30T00:00:00.000Z",
"home_card_closed": false,
"image": "https://cdn.despezzas.com/goals/reserva-emergencia.jpg",
"is_monthly": false,
"profile_id": null,
"reminder": {
"amount": 50000,
"frequency": "MONTHLY",
"goal_id": "a3b4c5d6-e7f8-4a9b-8c0d-1e2f3a4b5c6d",
"id": "f0a1b2c3-d4e5-4f6a-8b7c-8d9e0f1a2b3c",
"start_date": "2026-09-01",
"createdAt": "2026-09-01T09:00:00.000Z",
"end_date": null,
"last_notification": null,
"updatedAt": "2026-09-15T14:32:10.000Z",
"user_id": "0d6b923c-3392-424e-a152-2ee32474e8d5"
},
"updatedAt": "2026-09-15T14:32:10.000Z",
"user_id": "0d6b923c-3392-424e-a152-2ee32474e8d5"
}
],
"total": 1250000
}{
"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"
}Metas
Listar metas
Metas do contexto com aportes, lembrete e categoria, mais a soma dos aportes.
Escopo necessário: read.
GET
/
v2
/
goals
Listar metas
curl --request GET \
--url https://api.despezzas.com/v2/goals \
--header 'Authorization: Basic <encoded-value>'const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api.despezzas.com/v2/goals', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.despezzas.com/v2/goals"
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/v2/goals"
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))
}{
"goals": [
{
"amount": 3000000,
"concluded": false,
"id": "a3b4c5d6-e7f8-4a9b-8c0d-1e2f3a4b5c6d",
"title": "Reserva de emergência",
"values": [
{
"createdAt": "2026-09-01T09:00:00.000Z",
"date": "2026-09-15T00:00:00.000Z",
"goal_id": "a3b4c5d6-e7f8-4a9b-8c0d-1e2f3a4b5c6d",
"id": "b9c8d7e6-f5a4-4b3c-8d2e-1f0a9b8c7d6e",
"is_expense": false,
"updatedAt": "2026-09-15T14:32:10.000Z",
"value": 50000
}
],
"category": {
"editions": [
{
"category_id": "b1a2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
"created_at": "2026-09-01T09:00:00.000Z",
"icon": null,
"icon_background_color": null,
"icon_name": null,
"id": "e8f9a0b1-c2d3-4e4f-8a5b-6c7d8e9f0a1b",
"is_essential": null,
"is_hidden": null,
"name": "Mercado",
"profile_id": null,
"updated_at": "2026-09-15T14:32:10.000Z",
"user_id": "0d6b923c-3392-424e-a152-2ee32474e8d5"
}
],
"id": "b1a2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
"is_essential": true,
"is_hidden": false,
"name": "Alimentação",
"createdAt": "2026-09-01T09:00:00.000Z",
"icon": null,
"icon_background_color": "#F97316",
"icon_name": "restaurant",
"image": null,
"profile_id": null,
"updatedAt": "2026-09-15T14:32:10.000Z",
"user_id": null
},
"category_id": null,
"createdAt": "2026-09-01T09:00:00.000Z",
"deadline": "2027-06-30T00:00:00.000Z",
"home_card_closed": false,
"image": "https://cdn.despezzas.com/goals/reserva-emergencia.jpg",
"is_monthly": false,
"profile_id": null,
"reminder": {
"amount": 50000,
"frequency": "MONTHLY",
"goal_id": "a3b4c5d6-e7f8-4a9b-8c0d-1e2f3a4b5c6d",
"id": "f0a1b2c3-d4e5-4f6a-8b7c-8d9e0f1a2b3c",
"start_date": "2026-09-01",
"createdAt": "2026-09-01T09:00:00.000Z",
"end_date": null,
"last_notification": null,
"updatedAt": "2026-09-15T14:32:10.000Z",
"user_id": "0d6b923c-3392-424e-a152-2ee32474e8d5"
},
"updatedAt": "2026-09-15T14:32:10.000Z",
"user_id": "0d6b923c-3392-424e-a152-2ee32474e8d5"
}
],
"total": 1250000
}{
"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
basicAuthapiSecret & apiToken
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.