API reference
Authentication
API keys, how to send them, and how to rotate one.
Every request carries an API key as a bearer token. Keys start with pk_live_. Create one in Settings → API keys; it is shown once.
Every request
curl https://app.prepaid.ai/api/v1/balance \ -H "Authorization: Bearer $PREPAID_API_KEY"What a key can reach
A key belongs to one workspace, and that is the only tenant identity the API has. No parameter, header or body field can name a workspace. Every response carries the workspaceId the key belongs to.
Every endpoint reads. A key cannot spend credits, change an agent or touch a phone line.
Rotation
- Create the new key and deploy it.
- Check the old key’s “last used” in Settings → API keys stops moving.
- Revoke the old key. Anything still using it gets
401 key revokedimmediately.
Revoke a key the moment it is exposed. A lost key cannot be recovered or re-shown. Create a new one.
There is no test mode and no sandbox. Name your keys by where they live, so you know which one to revoke.