Payezydevelopers
Sandbox

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

  • Organizationplatform (active)
  • Permissionplatform:customer_keys

Parameters

ParameterWhat it does
orgIdpath, uuidrequiredThe 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, uuidrequiredA customer organization linked to your platform.
keyIdpath, uuidrequiredAn API key id from the key list.

Request body

FieldWhat it does
overlap_hoursintegerNo description in the spec yet.

Default 24

Response 201

The replacement key

FieldWhat it does
idstring (uuid)requiredNo description in the spec yet.
public_idstringrequiredNo description in the spec yet.
modeenumrequiredNo description in the spec yet.

One of test live

namestringrequiredNo description in the spec yet.
scopesstring[]requiredNo description in the spec yet.
allowliststring[]requiredNo description in the spec yet.
expires_atstring (date-time)requiredNo 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)requiredNo 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.
secretstringrequiredShown once. Store it now.

Errors to handle

CodeWhat it means and what to do
invalid_overlap422overlap must be between 0 and 72 hours

Every error is a Problem document. Branch on code; quote request_id to support.