APIKeyService
API Keys
Rotate an API key
Rotates an API key and returns a new token. All previous tokens for this key are invalidated.
post/v1/workspaces/{workspaceId}/api_keys/{id}:rotate
Path parameters
workspaceIdstring required
Example:workspace_01HXKD2E5NQM3T9AYWCF133E3Q
The workspace the API key belongs to (path).
idstring required
Example:apikey_01HXKD2E5NQM3T9AYWCFCSPNQY
The API key to rotate. A new token is issued and any existing token is invalidated.
Request body
Example request
{
"workspaceId": "workspace_01HXKD2E5NQM3T9AYWCF133E3Q",
"id": "apikey_01HXKD2E5NQM3T9AYWCFCSPNQY"
}Response
OK
Example response
{
"metadata": {
"accountId": "account_01HXKD2E5NQM3T9AYWCFTJHJVF",
"profileId": "profile_01HXKD2E5NQM3T9AYWCFS0AP08"
},
"info": {
"createdBy": {
"metadata": {
"accountId": "account_01HXKD2E5NQM3T9AYWCFTJHJVF",
"profileId": "profile_01HXKD2E5NQM3T9AYWCFS0AP08"
}
}
}
}