Skip to main content
POST
cURL

Authorizations

Authorization
string
header
required

A logged-in user session bearer token (WorkOS AuthKit access token from signup/login).

Path Parameters

orgId
string<uuid>
required

UUID of the developer organization.

keyId
string<uuid>
required

UUID of the API key to regenerate.

Response

Key regenerated. The new raw secret (key) is returned only in this response and the previous secret stops working immediately. key_prefix changes to match the new secret. (Body captured verbatim from the live sandbox.)

An API key. The secret is returned only once at create/regenerate (see DeveloperApiKeyWithSecret).

id
string<uuid>

Unique identifier for this resource.

org_id
string<uuid>

UUID identifier.

name
string

Human-readable display name.

key_prefix
string

Key prefix.

environment
enum<string>

One of: test, live.

Available options:
test,
live
scopes
string[]

Permission scopes granted to this key; empty means unscoped (full access within the account).

last_used_at
string<date-time>

RFC 3339 timestamp.

last_used_ip
string

IP address of the most recent request made with this key; null if never used.

expires_at
string<date-time>

RFC 3339 timestamp of when this value expires.

revoked_at
string<date-time> | null

RFC 3339 timestamp of when the key was revoked; null while the key is active.

created_by
string<uuid>

UUID identifier.

created_at
string<date-time>

RFC 3339 timestamp of when the resource was created.

key
string

The raw secret key — shown only once.