curl --request GET \
--url https://app.sure.am/api/v1/cash_flow \
--header 'X-Api-Key: <api-key>'import requests
url = "https://app.sure.am/api/v1/cash_flow"
headers = {"X-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://app.sure.am/api/v1/cash_flow', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.sure.am/api/v1/cash_flow",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Api-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.sure.am/api/v1/cash_flow"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.sure.am/api/v1/cash_flow")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.sure.am/api/v1/cash_flow")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"month": "2023-12-25",
"as_of": "2023-12-25",
"time_zone": "<string>",
"currency": "<string>",
"period": {
"start_date": "2023-12-25",
"end_date": "2023-12-25"
},
"income": "<string>",
"spending": "<string>",
"net_savings": "<string>",
"savings_rate": "<string>",
"spending_comparison": {
"previous_period": {
"start_date": "2023-12-25",
"end_date": "2023-12-25"
},
"current_total": "<string>",
"comparison_total": "<string>",
"delta": "<string>",
"comparison_end_date": "2023-12-25",
"current": [
{
"date": "2023-12-25",
"amount": "<string>"
}
],
"previous": [
{
"date": "2023-12-25",
"amount": "<string>"
}
]
},
"sankey": {
"basis": "net_by_category",
"income": "<string>",
"spending": "<string>",
"net_savings": "<string>",
"nodes": [
{
"id": "<string>",
"name": "<string>",
"kind": "income",
"value": "<string>",
"percentage": "<string>",
"category_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"filter_value": "<string>",
"color": "<string>"
}
],
"links": [
{
"source": 1,
"target": 1,
"value": "<string>",
"percentage": "<string>"
}
]
}
}{
"error": "<string>",
"message": "<string>",
"details": [
"<string>"
],
"errors": [
"<string>"
]
}{
"error": "<string>",
"message": "<string>",
"details": [
"<string>"
],
"errors": [
"<string>"
]
}Show cash flow and optional Sankey graph
Server-calculated income, spending, savings, and daily cumulative comparison in family currency. Uses the authenticated user’s finance accounts and Sure reporting rules. Browser sessions do not authenticate this public API.
curl --request GET \
--url https://app.sure.am/api/v1/cash_flow \
--header 'X-Api-Key: <api-key>'import requests
url = "https://app.sure.am/api/v1/cash_flow"
headers = {"X-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://app.sure.am/api/v1/cash_flow', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.sure.am/api/v1/cash_flow",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Api-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.sure.am/api/v1/cash_flow"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.sure.am/api/v1/cash_flow")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.sure.am/api/v1/cash_flow")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"month": "2023-12-25",
"as_of": "2023-12-25",
"time_zone": "<string>",
"currency": "<string>",
"period": {
"start_date": "2023-12-25",
"end_date": "2023-12-25"
},
"income": "<string>",
"spending": "<string>",
"net_savings": "<string>",
"savings_rate": "<string>",
"spending_comparison": {
"previous_period": {
"start_date": "2023-12-25",
"end_date": "2023-12-25"
},
"current_total": "<string>",
"comparison_total": "<string>",
"delta": "<string>",
"comparison_end_date": "2023-12-25",
"current": [
{
"date": "2023-12-25",
"amount": "<string>"
}
],
"previous": [
{
"date": "2023-12-25",
"amount": "<string>"
}
]
},
"sankey": {
"basis": "net_by_category",
"income": "<string>",
"spending": "<string>",
"net_savings": "<string>",
"nodes": [
{
"id": "<string>",
"name": "<string>",
"kind": "income",
"value": "<string>",
"percentage": "<string>",
"category_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"filter_value": "<string>",
"color": "<string>"
}
],
"links": [
{
"source": 1,
"target": 1,
"value": "<string>",
"percentage": "<string>"
}
]
}
}{
"error": "<string>",
"message": "<string>",
"details": [
"<string>"
],
"errors": [
"<string>"
]
}{
"error": "<string>",
"message": "<string>",
"details": [
"<string>"
],
"errors": [
"<string>"
]
}Authorizations
API key for authentication. Generate one from your account settings.
Query Parameters
Non-future first day YYYY-MM-01; defaults to the current month in the family time zone.
Append server-calculated graph to the monthly summary; cannot combine with view.
sankey Graph-only envelope; omits daily comparison. Accepts month or an explicit date range; cannot combine with include.
sankey Inclusive ISO date. Requires end_date and view=sankey; cannot combine with month.
Inclusive ISO date at or after start_date. Explicit ranges preserve their bounds, including future dates.
How to group the Sankey graph. Requires view=sankey. "category" (default) routes flows through a single Cash Flow node; "account" routes them through each individual account.
category, account Response
summary returned
- Option 1
- Option 2
Show child attributes
Show child attributes
Percentage points; null when income is nonpositive. May be negative.
Show child attributes
Show child attributes
Refunds net within each category. Parent direct amounts exclude child totals before partitioning by direction. Graph income/spending may differ from gross monthly totals; net savings agrees. Decimal strings retain FX precision. Empty flow has empty nodes and links. When group_by=account the basis is net_by_account and nodes include account-kind nodes representing individual accounts between income and expense categories.
Show child attributes
Show child attributes
Was this page helpful?