Create API Key
Create an API key for an authenticated user. Requires a verified SSH key pair and an active organization.Endpoint
Request
| Field | Type | Required | Description |
|---|---|---|---|
email | string | Yes | User’s email address |
ssh_public_key | string | Yes | Verified SSH public key |
label | string | Yes | Label for the API key (min 5 characters) |
org_name | string | No | Organization to create the key for. Defaults to user’s first org. |
Response
Success (200)
| Field | Description |
|---|---|
api_key | The full API key — store it securely, it cannot be retrieved again |
api_key_id | The key’s unique identifier |
org_id | The organization the key belongs to |
org_name | The organization name |
Errors
| Status | Error | Cause |
|---|---|---|
| 400 | Invalid request | Validation failed (email, key format, label too short) |
| 400 | User has no organizations | User needs to complete signup first |
| 401 | Invalid or unverified SSH key | SSH key not verified or not found |
| 402 | Billing could not be verified | Temporary issue — retry later |
| 404 | Organization not found | Specified org_name doesn’t exist or user doesn’t have access |
Permissions
API keys created via Shell Auth are granted:- View Clusters — read access to VMs
- Create Clusters — create and manage VMs