List API keys
GET
/api/v1/api-keys
Authentication
Bearer Token API Key (cookie: better-auth.session_token)
Responses
200
API key list
application/jsonkeys
object[]
REQUIRED
Array of:
id
string
REQUIRED
key_prefix
string
REQUIRED
name
string
REQUIRED
type
string
REQUIRED
Enum:
live, publishableproject_id
string | null
REQUIRED
allowed_domains
string | null
REQUIRED
JSON-encoded domain allowlist for publishable keys.
last_used_at
string | null
REQUIRED
created_at
string
REQUIRED
curl -X GET 'https://littledemo.com/api/v1/api-keys' \ -H 'Authorization: Bearer YOUR_API_TOKEN'
const response = await fetch('https://littledemo.com/api/v1/api-keys', { method: 'GET', headers: { "Authorization": "Bearer YOUR_API_TOKEN" }});const data = await response.json();console.log(data);
import requestsheaders = { 'Authorization': 'Bearer YOUR_API_TOKEN'}response = requests.get('https://littledemo.com/api/v1/api-keys', headers=headers)print(response.json())
200
Response
{ "keys": [ { "id": "<string>", "key_prefix": "<string>", "name": "<string>", "type": "live", "project_id": "<string>", "allowed_domains": "[\"example.com\",\"docs.example.com\"]", "last_used_at": "<string>", "created_at": "<string>" } ]}
API Playground
Try this endpoint
GET
/api/v1/api-keys