API Keys
POST
/api-keysOpen in the API playground →
Info
Generate API keys for integrations. Only system administrators can create API keys.
Request
Authorizationstringheaderrequired
Bearer <token> - System Admin JWT
Body Parameters
namestringbodyrequired
Friendly name for the API key
scopesarraybody
Permission scopes for the key (e.g., ["payments:read", "balance:read"])
expires_atstringbody
Expiration date (ISO 8601). Leave empty for no expiration.
Response
api_keystring
The generated API key (shown only once)
namestring
Key name
scopesarray
Assigned permission scopes
created_atstring
Creation timestamp
expires_atstring
Expiration timestamp (if set)
Examples
Request
cURL
curl -X POST "https://demo.api.vultlocal.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"
}'
Response
201 Created
{
"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"
}
403 Forbidden
{
"success": false,
"error": "Not authorized to create API keys",
"code": "FORBIDDEN"
}
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
Warning
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
Errors
| Status | Code | Description |
|---|---|---|
| 400 | INVALID_REQUEST | Invalid request format |
| 403 | FORBIDDEN | Not authorized to create API keys |
| 500 | INTERNAL_ERROR | Server error |