> ## Documentation Index
> Fetch the complete documentation index at: https://docs.aflux.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# API overview

> Base URL, conventions, pagination and the shape of every response.

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

<Card title="Base URL" icon="link">
  ```
  https://backend.aflux.ai/api/v1
  ```
</Card>

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

## Conventions

<AccordionGroup>
  <Accordion title="Money is a decimal string">
    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.
  </Accordion>

  <Accordion title="Dates and timestamps">
    Calendar dates (`startsAt`, `endsAt`, `plannedDate`, `agreedDate`) are `YYYY-MM-DD`. Timestamps (`createdAt`, `capturedAt`, …) are RFC 3339 with an offset.
  </Accordion>

  <Accordion title="Identifiers">
    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.
  </Accordion>

  <Accordion title="Null means 'not measured'">
    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](/guides/analytics).
  </Accordion>

  <Accordion title="Pagination">
    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.
  </Accordion>

  <Accordion title="Idempotency">
    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.
  </Accordion>
</AccordionGroup>

## Where to start

<CardGroup cols={2}>
  <Card title="Authentication" icon="key" href="/api/authentication">
    How to send your API key.
  </Card>

  <Card title="Errors" icon="triangle-exclamation" href="/api/errors">
    The error shape and what each status means.
  </Card>

  <Card title="Quickstart" icon="rocket" href="/quickstart">
    A campaign end to end with `curl`.
  </Card>

  <Card title="MCP server" icon="robot" href="/mcp/overview">
    The same capabilities as tools for an AI agent.
  </Card>
</CardGroup>
