account

Create API key (self, step-up)

Label, expiry and explicit renter/host scopes. Secret revealed once; only hash stored. No admin scopes or key-based MFA bypass.

post/api/v1/account/api-keys

Request

  • Base URL: https://amplerun-api.spiry.org
  • URL: https://amplerun-api.spiry.org/api/v1/account/api-keys
  • Auth: HTTP bearer

Headers

Idempotency-Keystring uuid required
Example:3f0e2a55-8c1b-4d2e-9a6f-0b7c1d2e3f40

UUID scoped to authenticated principal, route and canonical request hash.

Request body

labelstring required
expires_atstring date-time
scopesstring[] required

Example request

{
  "expires_at": "2026-09-25T12:00:00Z"
}

Response

API key created; secret returned exactly once.

key_idstring uuid required
labelstring required
prefixstring required

First 12 characters of the key, for recognising it.

scopesstring[] required
expires_atstring date-time required
revoked_atstring date-time required
created_atstring date-time required
secretstring required

The API key. Store it now; it is not shown again.

Example response

{
  "key_id": "3f0e2a55-8c1b-4d2e-9a6f-0b7c1d2e3f40",
  "expires_at": "2026-09-25T12:00:00Z",
  "revoked_at": "2026-09-25T12:00:00Z",
  "created_at": "2026-09-25T12:00:00Z"
}

Changes

No recorded changes to this operation across all 1 revision of this API.