Roll secret key
Changed onRolls (rotates) the secret API key associated with the specified project, generating a new key value while deprecating the previous one. The new key becomes immediately active. This endpoint requires the write:all scope.
If the project cannot be found, a 404 error response is returned. An optional expirationIn parameter can be provided in the request body to set when the previous key should expire.
Request
- Base URL: https://api.liveblocks.io/v2
- URL: https://api.liveblocks.io/v2/management/projects/{projectId}/api-keys/secret/roll
- Auth: none declared
Path parameters
ID of the project
Request body
Example request
{
"expirationIn": "3 days",
"newKeyExpirationIn": "30 days"
}Response
Success. Returns the rolled secret key.
Example response
{
"secretKey": {
"createdAt": "2024-09-03T12:34:56.000Z",
"value": "sk_dev_123"
}
}Changes
- info
added the new
21 daysenum value to the request property - info
added the new
21denum value to the request property - info
added the new
21daysenum value to the request property - info
added the new
3 minutesenum value to the request property - info
added the new
3menum value to the request property - info
added the new
3minenum value to the request property - info
added the new
48 hoursenum value to the request property - info
added the new
48henum value to the request property - info
added the new
48hoursenum value to the request property - info
added the new
48hrsenum value to the request property - info
added the new
5 minutesenum value to the request property - info
added the new
5menum value to the request property - info
added the new
5minenum value to the request property
- info
- info
added the new optional request property
- info