Create Api Key Via Edge Function
Authentication
Create Api Key Via Edge Function
Create API key via Supabase Edge Function
This endpoint is called by Supabase Edge Functions, which validate the user’s JWT and forward the request with user information.
Security:
- Only callable by edge functions (validated via shared secret)
- Edge function validates user’s JWT on Supabase side
- Maximum 5 API keys per user
Headers (from edge function): X-Edge-Secret: Shared secret X-User-Id: Supabase user ID (already validated) X-User-Email: User email (already validated)
Body: name: Human-readable name for the API key
Returns: CreateAPIKeyResponse with full API key (shown once only!)
POST
Create Api Key Via Edge Function
Body
application/json
Response
Successful Response