API keys
Update key
Updates API key properties.
patch/v1/organizations/{organizationId}/keys/{keyId}
Request
- Base URLhttps://api.clickhouse.cloud
- AuthHTTP basic
Path parameters
organizationId, string uuid required
ID of the organization that owns the key.
keyId, string uuid required
ID of the key to update.
Request body
Api Key Patch Request required
name, string
Name of the key
roles, string[]
DEPRECATED. Use assignedRoleIds instead. List of roles assigned to the key.
assignedRoleIds, string[]
Array of role UUIDs to assign to the API key
expireAt, string date-time nullable
Timestamp the key expires. If null or is empty the key never expires. ISO-8601.
state, 'enabled' | 'disabled'
State of the key: 'enabled', 'disabled'.
ipAccessList, Ip Access List Entry[]
List of IP addresses allowed to access the API using this key
Example request
{
"expireAt": "2027-03-26T00:00:00Z"
}Response
Successful response
object required
status, number
HTTP status code.
requestId, string uuid
Unique id assigned to every request. UUIDv4
result, Api Key
Example response
{
"status": 200,
"result": {
"createdAt": "2026-03-26T20:51:16Z",
"expireAt": "2027-03-26T00:00:00Z",
"usedAt": "2026-03-26T21:04:52Z"
}
}Changes
No recorded changes to this operation across all 35 revisions of this API.