api_keys scope.curl --location --request POST 'https://gvazyknvkqdeuzmrnuwu.supabase.co/functions/v1/api-keys' \
--header 'X-API-Key: <api-key>' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "Production Integration",
"description": "Main ERP integration key",
"scopes": [
"read",
"write",
"transactions",
"accounts",
"statements",
"reports"
],
"expires_in_days": 365
}'{
"success": true,
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Production Integration",
"description": "Main ERP integration key",
"key_prefix": "elly_abc1234",
"api_key": "elly_abc1234_defghijklmnopqrstuvwxyzabcdefgh",
"scopes": [
"read",
"write",
"transactions",
"accounts",
"statements",
"reports"
],
"expires_at": "2026-01-15T10:30:00Z",
"created_at": "2025-01-15T10:30:00Z"
}
}