Management
Roll public key
Changed onRolls (rotates) the public 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 public key is not currently enabled for the project, a 403 error response is returned. 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.
post/management/projects/{projectId}/api-keys/public/roll
Request
- Base URL: https://api.liveblocks.io/v2
- URL: https://api.liveblocks.io/v2/management/projects/{projectId}/api-keys/public/roll
- Auth: none declared
Path parameters
projectIdstring required
ID of the project
Example:683d49ed6b4d1cec5a597b13
Request body
Example request
{
"expirationIn": "1 hour"
}Response
Success. Returns the rolled public key.
Example response
{
"publicKey": {
"activated": true,
"createdAt": "2024-09-03T12:34:56.000Z",
"value": "pk_dev_123"
}
}Changes
- info
api operation id
post-management-project-public-key-rollremoved and replaced withroll-project-public-api-key
- info
- info
endpoint added
- info