---
title: "Update an API key"
method: PUT
path: "/v1/keys/{keyID}"
tags: ["API Keys"]
---

# Update an API key

`PUT /v1/keys/{keyID}`

Updates an API key's name, workspaces, or enabled status.

## Path parameters

- `keyID` string, required

## Request body

- UpdateKeyRequest
  - `name` string — New name for the API key
  - `workspaces` string[] — New array of workspace names
  - `enabled` boolean — Enable or disable the API key

## Response `200`

Key updated

- object
  - `message` string

## Other responses

- `401` — Missing authentication
- `404` — Key not found
- `409` — Conflict - workspace does not exist

---

[API](https://skmtc.dev/liara-cloud/apis/ai-api-keys.md) · [All operations](https://skmtc.dev/liara-cloud/apis/ai-api-keys/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/liara-cloud/ai-api-keys/revisions/bba2d0674527/schema)
