API Reference
The FlatPeak API is RESTful and resource-driven, using:
- Standard HTTP methods (GET, POST, etc.)
- JSON for writes and reads
- Bearer token authenticaiton
- Sandbox mode (test API keys start with
sk_test_
; live keys withsk_live_
) - 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 |
Usage | Follow the Connect guide to implement this flow |
Developer tips
- Use REST best practices for non-Connect endpoints
- Ensure Authorization keys match environment (
sk_test_
vssk_live_
) - For Connect, follow session flow and handle all required pages
- Test in sandbox mode before going live