API keys
Create key
Creates new API key.
post/v1/organizations/{organizationId}/keys
Request
- Base URLhttps://api.clickhouse.cloud
- AuthHTTP basic
Path parameters
organizationId, string uuid required
ID of the organization that will own the key.
Request body
Api Key Post Request required
name, string required
Name of the key.
expireAt, string date-time nullable
Timestamp the key expires. If not present, null or is empty the key never expires. ISO-8601.
state, 'enabled' | 'disabled'
Initial state of the key: 'enabled', 'disabled'. If not provided the new key will be 'enabled'.
hashData, Api Key Hash Data
roles, string[]
DEPRECATED. Use assignedRoleIds instead. List of roles assigned to the key. Contains at least 1 element.
assignedRoleIds, string[]
Array of role UUIDs to assign to the API key
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 Post Response
Example response
{
"status": 200,
"result": {
"key": {
"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.