Create a new API key
Endpoint
Section titled “Endpoint”POST /v1/api-keys
Authentication
Section titled “Authentication”No authentication required.
Request Body
Section titled “Request Body”{ "name": "My Production API Key", "description": "Used for production integrations", "type": "live"}cURL Example
Section titled “cURL Example”curl -X POST "https://api.sapiom.ai/v1/api-keys" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json"Response
Section titled “Response”{ "apiKey": null, "plainKey": "sk_live_ABC123def456GHI789jkl012MNO345pqr678STU901vwx234YZA567bcd890"}Error Responses
Section titled “Error Responses”| Status | Code | Description |
|---|---|---|
| 400 | - | Invalid request data |
| 401 | - | Unauthorized - invalid or missing JWT token |
| 403 | - | Forbidden - insufficient permissions |
See Error Codes for full reference.