portal
Reroll portal key
Reroll an API key owned by the authenticated portal session's end user, issuing a new key while preserving its configuration.
This is the portal-scoped variant of keys.rerollKey. It authenticates only with a portal session cookie and may only reroll keys owned by the session's external identity; any other key returns 404.
post/v2/portal.rerollKey
Request body
Example request
{
"keyId": "key_2cGKbMxRyIzhCxo1Idjz8q",
"expiration": 86400000
}Response
Key rerolled successfully. The new plaintext key is returned exactly once.
Example response
{
"meta": {
"requestId": "req_123"
},
"data": {
"keyId": "key_2cGKbMxRyIzhCxo1Idjz8q",
"key": "prod_2cGKbMxRjIzhCxo1IdjH3arELti7Sdyc8w6XYbvtcyuBowPT"
}
}