curl -X POST "https://prod.api.unleeshed.ai/partner/v1/api-keys" \
-H "Authorization: Bearer YOUR_SUPABASE_JWT" \
-H "Content-Type: application/json" \
-d '{
"name": "Production Server",
"scopes": ["topics:submit", "topics:read", "personas:read"]
}'
const response = await fetch('https://prod.api.unleeshed.ai/partner/v1/api-keys', {
method: 'POST',
headers: {
'Authorization': `Bearer ${supabaseJwt}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'Production Server',
scopes: ['topics:submit', 'topics:read', 'personas:read']
})
});
{
"success": true,
"data": {
"id": "key-new-123",
"name": "Production Server",
"full_key": "pk_live_abc123xxxxxxxxxxxxxxxxxxxxxxxx",
"key_prefix": "pk_live_abc12",
"scopes": ["topics:submit", "topics:read", "personas:read"],
"created_at": "2026-01-30T15:00:00Z"
}
}
API Keys
Create API Key
Create a new API key
POST
/
partner
/
v1
/
api-keys
curl -X POST "https://prod.api.unleeshed.ai/partner/v1/api-keys" \
-H "Authorization: Bearer YOUR_SUPABASE_JWT" \
-H "Content-Type: application/json" \
-d '{
"name": "Production Server",
"scopes": ["topics:submit", "topics:read", "personas:read"]
}'
const response = await fetch('https://prod.api.unleeshed.ai/partner/v1/api-keys', {
method: 'POST',
headers: {
'Authorization': `Bearer ${supabaseJwt}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'Production Server',
scopes: ['topics:submit', 'topics:read', 'personas:read']
})
});
{
"success": true,
"data": {
"id": "key-new-123",
"name": "Production Server",
"full_key": "pk_live_abc123xxxxxxxxxxxxxxxxxxxxxxxx",
"key_prefix": "pk_live_abc12",
"scopes": ["topics:submit", "topics:read", "personas:read"],
"created_at": "2026-01-30T15:00:00Z"
}
}
This endpoint requires Bearer authentication with your Supabase JWT.
Request
string
required
Descriptive name for the key (e.g., “Production Server”)
string[]
required
Array of permission scopes
string[]
Optional IP whitelist
Response
The full API key is only returned once. Store it securely!
string
Key identifier.
string
The complete API key. Only shown once!
curl -X POST "https://prod.api.unleeshed.ai/partner/v1/api-keys" \
-H "Authorization: Bearer YOUR_SUPABASE_JWT" \
-H "Content-Type: application/json" \
-d '{
"name": "Production Server",
"scopes": ["topics:submit", "topics:read", "personas:read"]
}'
const response = await fetch('https://prod.api.unleeshed.ai/partner/v1/api-keys', {
method: 'POST',
headers: {
'Authorization': `Bearer ${supabaseJwt}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'Production Server',
scopes: ['topics:submit', 'topics:read', 'personas:read']
})
});
{
"success": true,
"data": {
"id": "key-new-123",
"name": "Production Server",
"full_key": "pk_live_abc123xxxxxxxxxxxxxxxxxxxxxxxx",
"key_prefix": "pk_live_abc12",
"scopes": ["topics:submit", "topics:read", "personas:read"],
"created_at": "2026-01-30T15:00:00Z"
}
}
⌘I