The Saturation API makes it easy to bring your projects and budgets into your own apps or workflows. In this guide, youβll grab an API key, make your first request, and start building in just a few minutes.
Base URL
https://api.saturation.io/api/v1
- Log into Saturation and open your workspace
- Head to Settings β API Keys
- Click Generate New API Key
- Copy it right away and store it safely (in
.env
or your secret manager)
Add your API key to the request headers:
X-API-Key: your-api-key-here
Example (cURL):
curl "https://api.saturation.io/api/v1/projects" \
-H "X-API-Key: $SATURATION_API_KEY"
Example (JavaScript):
const API_BASE = 'https://api.saturation.io/api/v1';
const headers = {
'X-API-Key': process.env.SATURATION_API_KEY,
'Content-Type': 'application/json'
};
const list = await fetch(`${API_BASE}/projects`, { headers });
const data = await list.json();
console.log('Projects:', data.projects);
π GET /projects
returns { projects: Project[] }
.
Every project has its own budget. You can:
GET /projects/:projectId/budget
β fetch the budgetPOST /projects/:projectId/budget
β add budget linesGET /projects/:projectId/budget/accounts
β list accounts
Example (JavaScript):
const API = 'https://api.saturation.io/api/v1';
const headers = {
'X-API-Key': process.env.SATURATION_API_KEY,
'Content-Type': 'application/json'
};
const projectId = '<your-project-id>';
await fetch(`${API}/projects/${projectId}/budget`, {
method: 'POST',
headers,
body: JSON.stringify({
lines: [
{
type: 'line',
accountId: '1000',
description: 'Paid Social Ads',
phaseData: {
estimate: {
quantity: 1,
rate: 25000
}
}
},
{
type: 'subtotal',
description: 'Campaign Subtotal',
color: 'indigo'
}
]
})
});
401 Unauthorized
β Invalid or missing API key403 Forbidden
β Workspace access restricted404 Not Found
β Project or resource not found429 Too Many Requests
β Slow down; retry after a delay
- Keep your API key safe (server-side only)
- Use a secret manager or
.env
file - Rotate keys regularly
- Use pagination for big lists
- Prefer
idMode='user'
for human readable IDs like accounting codes - Always handle non-200 responses
Weβve got you covered. Reach out anytime: support@saturation.io
β¨ Thatβs it! Youβre ready to explore the API and start building.