API Keys
Base path: https://gateway.useyona.com/a/v1/organizations/:orgId/api-keys
API keys authenticate all requests to the Yona API. Each key is scoped to an environment — sandbox keys (sk_test_*) for development, production keys (sk_live_*) for live submissions.
Create API key
POST /a/v1/organizations/:orgId/api-keys
Create a new API key. The raw key is returned only once in this response.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
mode | string | Yes | sandbox or production |
name | string | No | Human-readable name |
expiresAt | string | No | ISO date — key expiry |
rateLimit | object | No | { requestsPerMinute?, dailyQuota? } |
🚨 Store the key immediately
The key field is returned only once. It cannot be retrieved again after this response.
List API keys
GET /a/v1/organizations/:orgId/api-keys
Revoke API key
PATCH /a/v1/organizations/:orgId/api-keys/:id/revoke
Revoke an API key. This is irreversible.
Rotate API key
POST /a/v1/organizations/:orgId/api-keys/:id/rotate
Generate a new key and deprecate the old one with a grace period.
Other API key endpoints
| Method | Path | Description |
|---|---|---|
GET | /a/v1/organizations/:orgId/api-keys/:id | Get API key details |
PATCH | /a/v1/organizations/:orgId/api-keys/:id/role | Update key role |
GET | /a/v1/organizations/:orgId/api-keys/:id/permissions | Get key permissions |
Last updated on