---
title: "Update a key"
method: PUT
path: "/v1/key/{id}"
tags: ["Keys"]
---

# Update a key

`PUT /v1/key/{id}`

## Path parameters

- `id` string, required — The id of the key

## Request body

- object
  - `name` string — The name of the key
  - `expiresAt` '1-day' | '7-days' | '30-days' | '60-days' | '90-days' | '180-days' | '1-year' | 'never' — The expiration date of the key

## Response `200`

Update a key

- object
  - `id` string, required — The id of the key
  - `name` string, required — The name of the key
  - `workspaceId` string, required — The id of the workspace
  - `lastAccess` string — The last time the key was used
  - `expiresAt` string, required — The expiration date of the key

## Other responses

- `400` — The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).
- `401` — The client must authenticate itself to get the requested response.
- `403` — The client does not have the necessary permissions to access the resource.
- `404` — The server can't find the requested resource.
- `405` — The request could not be completed due to a conflict mainly due to unique constraints.
- `409` — The request could not be completed due to a conflict mainly due to unique constraints.
- `413` — The request body size is too large to be processed by the server.
- `429` — You have made too many requests in a short period of time.
- `500` — The server has encountered a situation it doesn't know how to handle.
- `504` — The server is taking a long time to respond to requests due to load problems.

---

[API](https://skmtc.dev/formizee/apis/formizee-api.md) · [All operations](https://skmtc.dev/formizee/apis/formizee-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/formizee/formizee-api/revisions/50633cdf6960/schema)
