Skip to content

API keys

Bearer credentials for the REST API. See Authentication for how they are used and how to keep them safe.

GET /keys/

Returns array<ApiKey>. Prefix and last-used only, never the secret.

POST /keys/create

Body { name: string }. Returns an ApiKey plus key: string. The full secret, shown this one time only.

Terminal window
curl https://api.sautipbx.com/api/keys/create \
-H "Authorization: Bearer sk_live_..." \
-H "Content-Type: application/json" \
-d '{ "name": "production server" }'
# → 201 Created: the full "key" is shown this one time only
# { "uuid": "...", "prefix": "sk_live_ab", "key": "sk_live_abcd..." }

An account may hold 10 active keys. Creating an eleventh returns 409:

// HTTP 409
{
"detail": "This account already has 10 active API keys, which is the limit of 10. Revoke one you no longer use, then create this one."
}

Revoked keys do not count, so revoking one frees a slot immediately.

More keys never buy more throughput: the request-rate limit is counted per account, across every key. Keys are for telling your callers apart and for revoking one of them without touching the rest.

POST /keys/revoke

Body { uuid: string }. Returns { message: string }.

Field Type Description
uuid string Stable identifier (use with revoke).
name string Your label.
prefix string First characters of the key, to tell keys apart.
is_active boolean Whether the key still works.