API keys

Create key

Creates new API key.

post/v1/organizations/{organizationId}/keys

Request

  • Base URL: https://api.clickhouse.cloud
  • URL: https://api.clickhouse.cloud/v1/organizations/{organizationId}/keys
  • Auth: HTTP basic

Path parameters

organizationIdstring uuid required

ID of the organization that will own the key.

Request body

namestring required

Name of the key.

expireAtstring 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'.

rolesstring[]

DEPRECATED. Use assignedRoleIds instead. List of roles assigned to the key. Contains at least 1 element.

assignedRoleIdsstring[]

Array of role UUIDs to assign to the API key

Response

Successful response

statusnumber

HTTP status code.

requestIdstring uuid

Unique id assigned to every request. UUIDv4

Example response

{
  "status": 200
}

Changes

No recorded changes to this operation across all 1 revision of this API.