Skip to main content
POST
TypeScript

Authorizations

Authorization
string
header
required

Only available to a signed-in whop.com session. API keys, access tokens, and OAuth tokens are not accepted.

Scopes

developer:manage_api_key

Headers

Idempotency-Key
string

A unique key that makes this request safe to retry. See Idempotent requests.

Maximum string length: 255
Example:

"d9105228-4a08-46b1-8b91-42fed586d383"

Api-Version-Date
string

Pins the request to a dated API version.

Example:

"2026-11-25"

Path Parameters

id
string
required

API key ID, prefixed apik_.

Response

api key rotated

api_version_date
enum<string>
required

Dated API version used when requests authenticated with this key omit the Api-Version-Date header.

Available options:
2025-01-01,
2026-06-08,
2026-06-09,
2026-06-20,
2026-07-01,
2026-07-08,
2026-07-08-1,
2026-07-18,
2026-07-20,
2026-07-22,
2026-07-23,
2026-07-25,
2026-07-26,
2026-07-27,
2026-07-29,
2026-07-29-1,
2026-07-31,
2026-08-03,
2026-08-05,
2026-08-05-1,
2026-08-10,
2026-08-12,
2026-08-13,
2026-08-14,
2026-08-21,
2026-08-21-1,
2026-08-25,
2026-08-25-1,
2026-08-25-2,
2026-08-31,
2026-09-02,
2026-09-02-1,
2026-09-02-2,
2026-09-04,
2026-09-06,
2026-09-09,
2026-09-09-1,
2026-09-11,
2026-09-11-1,
2026-09-13,
2026-09-15,
2026-09-22,
2026-09-22-1,
2026-09-22-2,
2026-09-22-3,
2026-09-22-4,
2026-09-23,
2026-09-24,
2026-09-24-1,
2026-09-25,
2026-09-28,
2026-09-29,
2026-10-05,
2026-10-05-1,
2026-10-06,
2026-10-06-1,
2026-10-06-2,
2026-10-07,
2026-10-07-1,
2026-10-07-2,
2026-10-08,
2026-10-09,
2026-10-09-1,
2026-10-09-2,
2026-10-13,
2026-10-13-1,
2026-10-14,
2026-10-14-1,
2026-10-15,
2026-10-15-1,
2026-10-24,
2026-10-27,
2026-10-27-1,
2026-10-27-2,
2026-10-27-3,
2026-10-28,
2026-10-28-1,
2026-10-29,
2026-10-29-1,
2026-10-29-2,
2026-10-29-3,
2026-10-29-4,
2026-10-29-5,
2026-10-29-8,
2026-10-30,
2026-11-02,
2026-11-02-1,
2026-11-03,
2026-11-03-1,
2026-11-04,
2026-11-04-1,
2026-11-05,
2026-11-05-1,
2026-11-06,
2026-11-07,
2026-11-10,
2026-11-10-1,
2026-11-11,
2026-11-12,
2026-11-13,
2026-11-13-1,
2026-11-14,
2026-11-14-1,
2026-11-16,
2026-11-16-1,
2026-11-16-2,
2026-11-17,
2026-11-17-1,
2026-11-17-2,
2026-11-17-3,
2026-11-19,
2026-11-19-1,
2026-11-19-2,
2026-11-20,
2026-11-22,
2026-11-22-1,
2026-11-23,
2026-11-23-1,
2026-11-23-2,
2026-11-23-3,
2026-11-25
Example:

"2026-11-25"

created_at
string
required

When the API key was created, as an ISO 8601 timestamp.

Example:

"2026-01-01T12:00:00.000Z"

expires_at
string | null
required

When the API key stops working, as an ISO 8601 timestamp. null means it never expires.

Example:

"2026-01-01T12:00:00.000Z"

id
string
required

API key ID, prefixed apik_.

Example:

"apik_xxxxxxxxxxxxxx"

ip_allowlist
string[] | null
required

IPv4/IPv6 CIDR ranges allowed to use this key. null or empty means requests are accepted from any IP.

is_default_for_resource
boolean
required

Whether this is the resource's default API key. Default keys cannot be updated or deleted, only rotated.

Example:

false

last_used_at
string | null
required

When the API key last authenticated a request, as an ISO 8601 timestamp. Recorded at most once an hour, so it can trail the latest request by up to an hour. null means the key has not been used since this field was introduced.

Example:

null

name
string | null
required

Human-readable name identifying the API key, or null when none was set.

Example:

"Shine Time Booking (admin role)"

obfuscated_secret_key
string
required

Masked version of the secret key, so the key can be recognized without revealing the full secret.

Example:

"apik_xxxx....xxxx"

system_role
enum<string> | null
required

System role the key inherits its permissions from, or null when it uses an explicit permissions policy. Only account API keys can use a system role.

Available options:
owner,
admin,
moderator,
sales_manager,
advertiser,
null
Example:

"admin"

updated_at
string
required

When the API key was last updated, as an ISO 8601 timestamp.

Example:

"2026-01-01T12:00:00.000Z"

grants
object[]
secret_key
string

The full secret used to authenticate requests. Returned only once, on create and rotate responses — store it immediately.

Example:

"apik_xxxxxxxxxxxxxx_C0000_C_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"