Skip to main content
The Aflux REST API is the same surface the console runs on — 60 endpoints, no separate feature set.

Base URL

The endpoint pages in this section are generated from the live OpenAPI document at https://backend.aflux.ai/openapi, so they describe exactly what is deployed.

Conventions

Every amount — budgets, prices, balances, fees — is a JSON string like "500.00", never a float. Parse it as a decimal; never as a binary floating-point number.
Calendar dates (startsAt, endsAt, plannedDate, agreedDate) are YYYY-MM-DD. Timestamps (createdAt, capturedAt, …) are RFC 3339 with an offset.
Almost everything is a UUID. Channels are the exception: channelId is a 64-bit integer, because it comes from the channel index rather than from Aflux.
In analytics, a metric that has not been measured is null, never 0. Zero is a measurement; null is the absence of one. See Analytics.
List endpoints answer with items and, where the list can be long, a nextCursor. Pass it back to continue. An absent nextCursor means you have reached the end.
Campaign creation takes an idempotencyKey you generate. Reuse it when retrying the same request; a fresh UUID means a genuinely new campaign — and a new charge.

Where to start

Authentication

How to send your API key.

Errors

The error shape and what each status means.

Quickstart

A campaign end to end with curl.

MCP server

The same capabilities as tools for an AI agent.