> ## Documentation Index
> Fetch the complete documentation index at: https://docs.llmgenerator.com/llms.txt
> Use this file to discover all available pages before exploring further.

# API 키 수정

> API 키 메타데이터를 수정하는 엔드포인트입니다.

## PUT /api-keys/{keyId}

기존 API 키의 이름과 설명을 수정합니다.

### 경로 매개변수

<ParamField path="keyId" type="string" required>
  수정할 API 키 ID입니다.
</ParamField>

### 요청 본문

<ParamField body="name" type="string">
  새 키 이름입니다(1\~100자).
</ParamField>

<ParamField body="description" type="string">
  새 설명입니다(최대 500자).
</ParamField>

<ParamField body="permissions" type="array">
  API 키에 부여할 새 권한 목록입니다.
</ParamField>

### 응답

<ResponseField name="success" type="boolean">
  수정 성공 여부입니다.
</ResponseField>

<ResponseField name="message" type="string">
  상태 메시지입니다.
</ResponseField>

<ResponseField name="apiKey" type="object">
  수정된 API 키 정보입니다.

  <Expandable title="apiKey 속성">
    <ResponseField name="id" type="string">
      API 키 고유 식별자입니다.
    </ResponseField>

    <ResponseField name="name" type="string">
      갱신된 이름입니다.
    </ResponseField>

    <ResponseField name="description" type="string">
      갱신된 설명입니다.
    </ResponseField>

    <ResponseField name="updatedAt" type="string">
      수정 시각(ISO 8601)입니다.
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X PUT https://api.llmgenerator.com/api/v1/api-keys/llm_1706123456_abc123def456 \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "name": "Updated Production Key",
      "description": "Updated description"
    }'
  ```

  ```javascript Node.js theme={null}
  const response = await fetch(
    'https://api.llmgenerator.com/api/v1/api-keys/llm_1706123456_abc123def456',
    {
      method: 'PUT',
      headers: {
        'Authorization': 'Bearer YOUR_API_KEY',
        'Content-Type': 'application/json'
      },
      body: JSON.stringify({
        name: 'Updated Production Key'
      })
    }
  );
  ```
</RequestExample>

<ResponseExample>
  ```json Success (200) theme={null}
  {
    "success": true,
    "message": "API key updated successfully",
    "apiKey": {
      "id": "llm_1706123456_abc123def456",
      "name": "Updated Production Key",
      "description": "Updated description",
      "permissions": [],
      "updatedAt": "2026-01-27T10:00:00.000Z"
    }
  }
  ```

  ```json Not Found (404) theme={null}
  {
    "message": "API key not found"
  }
  ```
</ResponseExample>
