API Keys
Create key
Generate a new API key for the authenticated account.
POST /v1/keysAuthentication: Required.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | No | Key name (defaults to "default") |
CLI
skytale keys create --name productioncurl
curl -X POST https://api.skytale.sh/v1/keys \ -H "Authorization: Bearer sk_live_a1b2c3d4..." \ -H "Content-Type: application/json" \ -d '{"name": "production"}'Response 200
{ "id": "7c9e6679-7425-40de-944b-e07fc1f90ae7", "key_prefix": "sk_live_a1b2", "name": "production", "key": "sk_live_a1b2c3d4e5f6g7h8i9j0..."}List keys
List all active (non-revoked) API keys for the authenticated account.
GET /v1/keysAuthentication: Required.
CLI
skytale keys listcurl
curl https://api.skytale.sh/v1/keys \ -H "Authorization: Bearer sk_live_a1b2c3d4..."Response 200
{ "keys": [ { "id": "7c9e6679-7425-40de-944b-e07fc1f90ae7", "key_prefix": "sk_live_a1b2", "name": "production", "last_used_at": "2026-02-26T12:00:00Z", "created_at": "2026-02-20T10:30:00Z" }, { "id": "550e8400-e29b-41d4-a716-446655440000", "key_prefix": "sk_live_x9y8", "name": "default", "last_used_at": null, "created_at": "2026-02-20T10:00:00Z" } ]}Keys are ordered by created_at descending (newest first). The last_used_at field is null if the key has never been used.
Revoke key
Revoke an API key. The key immediately stops working. This is a soft delete — the key record is retained with a revoked_at timestamp.
DELETE /v1/keys/:idAuthentication: Required. You can only revoke keys belonging to your account.
CLI
skytale keys revoke 7c9e6679-7425-40de-944b-e07fc1f90ae7curl
curl -X DELETE https://api.skytale.sh/v1/keys/7c9e6679-7425-40de-944b-e07fc1f90ae7 \ -H "Authorization: Bearer sk_live_a1b2c3d4..."Response 204
No content.
Errors
| Status | Error | Cause |
|---|---|---|
404 | Not found | Key does not exist, belongs to another account, or is already revoked |