---
title: "Update Key"
method: PATCH
path: "/console/v1/keys/{id}"
tags: ["Keys"]
---

# Update Key

`PATCH /console/v1/keys/{id}`

## Path parameters

- `id` string, required

## Request body

- KeyUpdateContractDto
  - `description` string
  - `scopes` string[]
  - `environments` string[]
  - `targetAppID` string, nullable
  - `secondaryTargetAppIDs` string[], nullable

## Response `200`

Key updated successfully

- object
  - `message` string, required — A simple string explaining the result of the operation.
  - `data` object, required — A single result.
    - `key` string, nullable, required
    - `type` 'SERVER' | 'CLIENT' | 'CONSOLE' | 'SCIM' | 'ORG', required
    - `description` string, required
    - `scopes` string[], required
    - `environments` string[]
    - `primaryTargetApp` string, nullable
    - `secondaryTargetApps` string[], nullable
    - `status` 'active' | 'deactivated', required
    - `lastUsed` string, nullable

## Other responses

- `403` — Insufficient permissions.
- `404` — Key not found.

---

[API](https://skmtc.net/statsig/apis/console-api.md) · [All operations](https://skmtc.net/statsig/apis/console-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/statsig/console-api/versions/3189f450c93b/schema)
