Create API Key
Changed onCreates an API key for an account or app. The response is the only place the full secret_key is returned — store it immediately. Requires a user session; API keys cannot manage API keys.
Request
- Base URL: https://api.whop.com/api/v1
- URL: https://api.whop.com/api/v1/api_keys
- Auth: HTTP bearer
Headers
A unique key that makes this request safe to retry. See Idempotent requests.
Request body
Example request
{
"api_version_date": "2026-10-13-1",
"expires_at": "2026-01-01T12:00:00.000Z",
"ip_allowlist": [
"203.0.113.0/24"
],
"name": "Shine Time Booking (production)",
"permissions": {
"statements": [
{
"actions": [
"company:basic:read"
],
"grant": true,
"resources": [
"biz_xxxxxxxxxxxxxx"
]
}
],
"system_role": "admin"
},
"resource_id": "biz_xxxxxxxxxxxxxx",
"resource_type": "account"
}Response
api key created
Example response
{
"api_version_date": "2026-10-13-1",
"created_at": "2026-01-01T12:00:00.000Z",
"expires_at": "2026-01-01T12:00:00.000Z",
"grants": [
{
"actions": [
{
"action": "ai_prompt:create"
}
],
"resource_id": "biz_xxxxxxxxxxxxxx",
"resource_type": "account"
}
],
"id": "apik_xxxxxxxxxxxxxx",
"ip_allowlist": [
"203.0.113.0/24"
],
"name": "Shine Time Booking (admin role)",
"obfuscated_secret_key": "apik_xxxx....xxxx",
"secret_key": "apik_xxxxxxxxxxxxxx_C0000_C_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"system_role": "admin",
"updated_at": "2026-01-01T12:00:00.000Z"
}Changes
- warning
added the new
2026-10-13enum value to theresponse property for the response status - warning
added the new
2026-10-13-1enum value to theresponse property for the response status - info
added the new
2026-10-13enum value to the request property - info
added the new
2026-10-13-1enum value to the request property
- warning
- warning
added the new
2026-10-09enum value to theresponse property for the response status - warning
added the new
2026-10-09-1enum value to theresponse property for the response status - warning
added the new
2026-10-09-2enum value to theresponse property for the response status - info
added the new
2026-10-09enum value to the request property - info
added the new
2026-10-09-1enum value to the request property - info
added the new
2026-10-09-2enum value to the request property
- warning