Create an API key for a service account
Create a new API key for a specific service account.
Creates a new API key associated with the specified service account and returns the full authentication token. Important: The full token is only shown once during creation. Store it securely.
Context:
- The user must have access to the service account
- System accounts are not visible to API users due to RLS restrictions
- All accessible service accounts are organization accounts
- Uses ‘organization_service_account’ identity type
Related Endpoints:
- GET /service-accounts//api-keys - List API keys for a service account
- GET /service-accounts/ - Get service account details
Authorizations
API key authentication. Include your API key in the X-API-Key header as: X-API-Key YOUR_API_KEY
Example:
JWT Bearer token authentication. Include your access token in the Authorization header as: Bearer YOUR_ACCESS_TOKEN
Example:
Path Parameters
UUID of the service account to create an API key for
Body
Response
API key created successfully
Response model for API key creation including the full token.
Full authentication token. This is the only time the full token is shown. Store it securely as it cannot be retrieved later.
"saf_org_550e8400_abc123def456ghi789jkl012mno345pqr678stu901vwx234yz"