Skip to main content
POST
Create an API key

Authorizations

slog-api-key
string
header
required

API key obtained from the Slog dashboard or returned by the signup/invite-redeem flows. Pass as the slog-api-key header.

Body

application/json
name
string
required

Human-readable label for the key.

Minimum string length: 1
Example:

"CI/CD key"

expiresAt
string<date-time> | null

Optional expiry time. Omit or pass null for a non-expiring key.

Example:

"2027-01-01T00:00:00.000Z"

Response

API key created. Store the key value — it will not be shown again.

id
string

Unique API key ID (UPID).

Example:

"apik_01jqapikey001"

name
string
Example:

"Default"

prefix
string

First 10 characters of the raw key, safe to display.

Example:

"sk_a1b2c3"

userId
string

ID of the user this key belongs to.

Example:

"user_01jquser0001"

workspaceId
string
Example:

"ws_01jqws000001"

createdAt
string<date-time>
Example:

"2026-05-01T10:00:00.000Z"

lastUsedAt
string<date-time> | null
Example:

"2026-05-20T08:00:00.000Z"

expiresAt
string<date-time> | null
Example:

null

key
string

Full raw API key value — shown only at creation time.

Example:

"sk_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6"