---
title: "Update Api Key"
method: PATCH
path: "/auth/keys/{key_id}"
tags: ["Personal API Keys"]
---

# Update Api Key

`PATCH /auth/keys/{key_id}`

## Path parameters

- `key_id` string, required

## Request body

- APIKeyUpdate
  - `name` string, nullable
  - `scopes` string[], nullable
  - `resource_filters` object, nullable
  - `client_id` string, nullable
  - `host_id` string, nullable
  - `server_id` string, nullable
  - `agent_id` string, nullable
  - `display_label` string, nullable
  - `is_active` boolean, nullable

## Response `200`

Successful Response

- APIKeyResponse
  - `id` string, required
  - `user_id` string, required
  - `name` string, required
  - `client_id` string, nullable
  - `host_id` string, nullable
  - `server_id` string, nullable
  - `agent_id` string, nullable
  - `display_label` string, nullable
  - `issued_by_user_id` string, nullable
  - `created_from_client_id` string, nullable
  - `scopes` string[], required
  - `resource_filters` object, required
  - `created_time` string, required
  - `modified_time` string, nullable
  - `expires_at` string, nullable
  - `last_used_at` string, nullable
  - `is_active` boolean, required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/agience/apis/agience-platform-api.md) · [All operations](https://skmtc.net/agience/apis/agience-platform-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/agience/agience-platform-api/revisions/187bad270c94/schema)
