v1
latestOpenAPI 3.1.02026-07-13250151.3 KBapi-keys
Create a new API key for a workspace the user owns/admins; returns the secret key exactly once.
Cookie session only — never inspects Authorization header; pm_live_ Bearer NOT accepted. Caller must be admin or owner of workspaceId (workspace_members.role). Requested scopes are capped to deriveScopesFromRole(role); exceeding them is a 403. Billing-gated on the api_keys metric (403 with plan_limit_reached body). The secret 'key' (format pm_live_<64 hex chars>) is returned ONLY in this 201 response and can never be retrieved again — afterward only keyPrefix is exposed.
post/api/v1/api-keys
Request body
Response
Key created; secret 'key' returned once.
object required