Generate API keys for integrations. Only system administrators can create API keys.
Request
Bearer <token> - System Admin JWT
Body Parameters
Friendly name for the API key
Permission scopes for the key (e.g., ["payments:read", "balance:read"])
Expiration date (ISO 8601). Leave empty for no expiration.
Response
The generated API key (shown only once)
Assigned permission scopes
Expiration timestamp (if set)
Examples
curl -X POST "https://olive-gateway-a6ba.onrender.com/api/v1/admin/api-keys" \
-H "Authorization: Bearer ADMIN_JWT" \
-H "Content-Type: application/json" \
-d '{
"name": "Partner Integration",
"scopes": ["payments:read", "balance:read"],
"expires_at": "2026-01-01T00:00:00Z"
}'
{
"api_key": "olive_live_xxxxxxxxxxxxx",
"name": "Partner Integration",
"scopes": ["payments:read", "balance:read"],
"created_at": "2025-01-15T10:00:00Z",
"expires_at": "2026-01-01T00:00:00Z"
}
Available Scopes
| Scope | Description |
|---|
payments:read | Read payment data |
payments:write | Create payments |
balance:read | Read wallet balances |
subscribers:read | Read subscriber data |
subscribers:write | Modify subscribers |
compliance:read | Read compliance data |
admin:full | Full admin access |
Security
The API key is only shown once at creation. Store it securely immediately.
- API keys should be rotated periodically
- Use the minimum required scopes
- Set expiration dates for temporary integrations
| Status | Code | Description |
|---|
| 400 | INVALID_REQUEST | Invalid request format |
| 403 | FORBIDDEN | Not authorized to create API keys |
| 500 | INTERNAL_ERROR | Server error |