List API keys
GET
/api-keys
const url = 'https://example.com/api-keys';const options = { method: 'GET', headers: {cookie: 'bottle.session_token=<bottle.session_token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/api-keys \ --cookie bottle.session_token=<bottle.session_token>Revoked keys are left out. The key itself is never returned: only the prefix, which is what identifies a row in this list.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”Keys
Media typeapplication/json
object
items
required
Array<object>
object
id
required
UUID v7
string format: uuid
name
required
string
prefix
required
string
scopes
required
Array<string>
createdAt
required
string format: date-time
lastUsedAt
required
string | null format: date-time
expiresAt
required
string | null format: date-time
Example
{ "items": [ { "id": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "name": "Xero sync", "prefix": "btl_7f3a9c21", "scopes": [ "tenant:read" ] } ]}Not signed in
Media typeapplication/json
object
error
required
string
message
required
string
Example
{ "error": "not_found", "message": "Customer not found"}Not allowed to manage keys, or asking for a key to do it
Media typeapplication/json
object
error
required
string
message
required
string
Example
{ "error": "not_found", "message": "Customer not found"}