api-keys

Create a new API key. The full plaintext secret is returned ONLY in this response.

post/api-keys

Request

  • The document declares no server URL.
  • Auth: none declared

Request body

namestring required

Human-readable name for the API key

expiresAtstring date-time

Optional expiration date for the API key (ISO 8601). If omitted, the key never expires.

Example request

{
  "name": "CI bot",
  "expiresAt": "2026-12-31T23:59:59.000Z"
}

Response

Successfully created API key

idstring uuid required

Unique identifier of the API key

namestring required

Human-readable name for the API key

prefixPreviewstring required

Public preview of the API key — the literal prefix plus the first characters of the secret. The full secret is shown only once at creation time.

expiresAtstring date-time nullable required

Expiration date of the API key, or null if it never expires

revokedAtstring date-time nullable required

Revocation timestamp, or null if the key is still active. Revoked keys remain in the list as an audit trail.

createdByUserIdstring uuid nullable required

ID of the user who created the key. May be null if that user has been deleted.

createdAtstring date-time required

When the key was created

secretstring required

The full plaintext API key. This is the only response that will ever contain it — store it securely and immediately. It cannot be retrieved later.

Example response

{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "name": "CI bot",
  "prefixPreview": "ayk_live_abc123def456...",
  "expiresAt": "2026-12-31T23:59:59.000Z",
  "revokedAt": "2026-05-01T10:00:00.000Z",
  "createdByUserId": "550e8400-e29b-41d4-a716-446655440001",
  "createdAt": "2026-04-27T10:30:00.000Z",
  "secret": "ayk_live_abc123def456ghi789..."
}

Changes

No recorded changes to this operation across all 51 revisions of this API.