Create API key
Issues a new API key for the organization. The plaintext value is returned once, at creation, and is never retrievable again.
Authentication
AuthorizationBearer
WorkOS session JWT or an organization API key, sent as Authorization: Bearer <token>.
Request
This endpoint expects an object.
name
permissions
canImpersonate
Response
The created API key, including its plaintext value.
id
name
permissions
canImpersonate
lastUsedAt
createdAt
value
The plaintext key, returned only at creation.
Errors
400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error