API reference / Customer keys and view-as
Roll a customer API key
POST/v1/platforms/{orgId}/customers/{customerId}/api-keys/{keyId}/roll
Mint a replacement for a key this platform created (platform:customer_keys). The current secret keeps working for the overlap, at most 72 hours. A key the customer created themselves is not_found.
Before you call it
- Organization
platform (active) - Permission
platform:customer_keys
Parameters
| Parameter | What it does |
|---|---|
orgIdpath, uuidrequired | The organization the call acts on. For platform calls, your platform's id; for customer calls, the customer's organization id. Get them from getMe or the customer list. |
customerIdpath, uuidrequired | A customer organization linked to your platform. |
keyIdpath, uuidrequired | An API key id from the key list. |
Request body
| Field | What it does |
|---|---|
overlap_hoursinteger | No description in the spec yet. Default |
Response 201
The replacement key
| Field | What it does |
|---|---|
idstring (uuid)required | No description in the spec yet. |
public_idstringrequired | No description in the spec yet. |
modeenumrequired | No description in the spec yet. One of |
namestringrequired | No description in the spec yet. |
scopesstring[]required | No description in the spec yet. |
allowliststring[]required | No description in the spec yet. |
expires_atstring (date-time)required | No description in the spec yet. |
overlap_untilstring (date-time) | No description in the spec yet. |
revoked_atstring (date-time) | No description in the spec yet. |
last_used_atstring (date-time) | No description in the spec yet. |
created_atstring (date-time)required | No description in the spec yet. |
minted_by_platform_idstring (uuid) | Set when a platform minted this key for the customer. Absent for keys created on the Developer page. |
secretstringrequired | Shown once. Store it now. |
Errors to handle
| Code | What it means and what to do |
|---|---|
invalid_overlap422 | overlap must be between 0 and 72 hours |
Every error is a Problem document. Branch on code; quote request_id to support.