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

# API Reference (2024-08-24.zero)

The Flatpeak API is RESTful and resource-driven, using:

* Standard HTTP methods (GET, POST, etc.)
* JSON for writes and reads
* Bearer token authentication
* Sandbox mode
* Consistent status codes across operations

## Connect endpoints

The Connect API operates differently:

| Feature          | Details                                                   |
| :--------------- | :-------------------------------------------------------- |
| **Endpoint**     | Single endpoint, used like a JSON‑structured conversation |
| **Session ID**   | A one-time-use `connect_token` authorises each session    |
| **Flow Control** | Your app must handle every step of Connect session        |

## Developer tips

1. Use REST best practices for non-Connect endpoints
2. Ensure Authorization keys match environment (`sk_test_` vs `sk_live_`)
3. For Connect, follow session flow and handle all required pages
4. Test in sandbox mode before going live
