Skip to main content
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"]
  }'
{
  "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"
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.unleeshed.ai/llms.txt

Use this file to discover all available pages before exploring further.

This endpoint requires Bearer authentication with your Supabase JWT.

Request

name
string
required
Descriptive name for the key (e.g., “Production Server”)
scopes
string[]
required
Array of permission scopes
allowed_ips
string[]
Optional IP whitelist

Response

The full API key is only returned once. Store it securely!
id
string
Key identifier.
full_key
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"]
  }'
{
  "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"
  }
}