API · keys
Create API key
POST /api/v2/keys
Parameters
All resource access is checked against the selected workspace and user permissions.
| Name | Type | Contract |
|---|---|---|
| name | string · required | 1–60 characters |
| scopes | string[] · required | Nonempty supported scopes; see Authentication |
| expires_in_days | integer · optional | 1–365, default 30 |
Request
Run inboxit login first. The CLI supplies authenticated user credentials.
Example
inboxit keys create --data @request.jsonJSON body
Save this JSON as request.json for the request above. Replace example values with your own.
Example
{
"name": "Backend",
"scopes": [
"emails:send",
"emails:read"
],
"expires_in_days": 30
}Response
HTTP 201. Example values are illustrative; excerpts are marked.
Example
{
"id": "KEY_UUID",
"name": "Backend",
"prefix": "iit_…",
"scopes": [
"emails:send",
"emails:read"
],
"expires_at": "2026-11-22T12:00:00Z",
"token": "iit_ONE_TIME_SECRET"
}Behavior & errors
Ten active keys per account. Save token once; it is not recoverable from list responses. Common errors: 400 invalid input, 401 unauthenticated, 403 insufficient permission, 404 missing/inaccessible resource, 409 conflict, 429 rate/usage limit, 503 service unavailable. See Errors & retries for recovery guidance.