> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-home-button.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# 키 생성

> 새 API Key를 생성합니다.



## OpenAPI

````yaml /ko/products/cloud/api-reference/cloud-openapi.json post /v1/organizations/{organizationId}/keys
openapi: 3.0.1
info:
  contact:
    email: support@clickhouse.com
    name: ClickHouse Support
    url: >-
      https://clickhouse.com/docs/en/cloud/manage/openapi?referrer=openapi-299828
  title: OpenAPI spec for ClickHouse Cloud
  version: '1.0'
servers:
  - url: https://api.clickhouse.cloud
security:
  - basicAuth: []
tags:
  - name: Organization
  - name: User management
  - name: Billing
  - name: Service
  - name: Backup
  - name: OpenAPI
  - name: Prometheus
  - name: ClickPipes
paths:
  /v1/organizations/{organizationId}/keys:
    post:
      tags:
        - OpenAPI
      summary: 키 생성
      description: 새 API Key를 생성합니다.
      parameters:
        - description: 키를 소유할 조직의 ID.
          in: path
          name: organizationId
          required: true
          schema:
            format: uuid
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApiKeyPostRequest'
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  requestId:
                    description: 각 요청에 할당되는 고유 ID. UUIDv4
                    format: uuid
                    type: string
                  result:
                    $ref: '#/components/schemas/ApiKeyPostResponse'
                  status:
                    description: HTTP 상태 코드.
                    example: 200
                    type: number
                type: object
          description: 성공 응답
        '400':
          content:
            application/json:
              schema:
                properties:
                  error:
                    description: 오류에 대한 상세 설명.
                    type: string
                  status:
                    description: HTTP 상태 코드.
                    example: 400
                    type: number
                type: object
          description: 클라이언트 오류로 간주되는 문제로 인해 서버가 요청을 처리할 수 없거나 처리하지 않습니다.
components:
  schemas:
    ApiKeyPostRequest:
      properties:
        expireAt:
          description: >-
            키가 만료되는 timestamp입니다. 값이 없거나 `null`이거나 비어 있으면 키는 만료되지 않습니다. ISO-8601
            형식입니다.
          format: date-time
          nullable: true
          type: string
        hashData:
          $ref: '#/components/schemas/ApiKeyHashData'
        ipAccessList:
          description: 이 키를 사용해 API에 액세스할 수 있는 IP 주소 목록
          items:
            $ref: '#/components/schemas/IpAccessListEntry'
          type: array
        name:
          description: 키 이름입니다.
          type: string
        roles:
          description: 키에 할당된 역할 목록입니다. 최소 1개의 요소를 포함합니다.
          items:
            enum:
              - admin
              - developer
              - query_endpoints
            type: string
          type: array
        state:
          description: '키의 초기 상태입니다: ''enabled'', ''disabled''. 제공되지 않으면 새 키는 ''enabled'' 상태가 됩니다.'
          enum:
            - enabled
            - disabled
          type: string
    ApiKeyPostResponse:
      properties:
        key:
          $ref: '#/components/schemas/ApiKey'
        keyId:
          description: 생성된 키 ID입니다. 요청에 'hashData'가 없는 경우에만 제공됩니다.
          type: string
        keySecret:
          description: 생성된 키 시크릿입니다. 요청에 'hashData'가 없는 경우에만 제공됩니다.
          type: string
    ApiKeyHashData:
      properties:
        keyIdHash:
          description: '키 ID의 해시입니다. '
          type: string
        keyIdSuffix:
          description: >-
            키 ID의 마지막 4자리입니다. 알고리즘: echo -n "yourpassword" | sha256sum | tr -d
            '-' | xxd -r -p | base64
          type: string
        keySecretHash:
          description: >-
            키 시크릿의 해시입니다. 알고리즘: echo -n "yourpassword" | sha256sum | tr -d '-' |
            xxd -r -p | base64
          type: string
    IpAccessListEntry:
      properties:
        description:
          description: 액세스를 허용할 IPv4 주소 또는 IPv4 CIDR에 대한 선택적 설명
          type: string
        source:
          description: IP 또는 CIDR
          type: string
    ApiKey:
      properties:
        createdAt:
          description: 키가 생성된 시각입니다. ISO-8601 형식입니다.
          format: date-time
          type: string
        expireAt:
          description: 키가 만료되는 시각입니다. 값이 없거나 `null`이거나 비어 있으면 키는 만료되지 않습니다. ISO-8601 형식입니다.
          format: date-time
          nullable: true
          type: string
        id:
          description: 고유한 API Key ID입니다.
          format: uuid
          type: string
        ipAccessList:
          description: 이 키를 사용해 API에 액세스할 수 있도록 허용된 IP 주소 목록
          items:
            $ref: '#/components/schemas/IpAccessListEntry'
          type: array
        keySuffix:
          description: 키의 마지막 4자입니다.
          type: string
        name:
          description: 키 이름입니다.
          type: string
        roles:
          description: 키에 할당된 역할 목록입니다. 최소 1개의 요소를 포함합니다.
          items:
            enum:
              - admin
              - developer
              - query_endpoints
            type: string
          type: array
        state:
          description: '키 상태입니다: ''enabled'', ''disabled''.'
          enum:
            - enabled
            - disabled
          type: string
        usedAt:
          description: 키가 마지막으로 사용된 시각입니다. 값이 없으면 키는 한 번도 사용되지 않은 것입니다. ISO-8601 형식입니다.
          format: date-time
          type: string
  securitySchemes:
    basicAuth:
      description: >-
        ClickHouse Cloud 콘솔에서 발급받은 키 ID와 키 시크릿을 사용하십시오:
        https://clickhouse.com/docs/cloud/manage/openapi
      scheme: basic
      type: http

````