---
title: "Update API key"
method: PATCH
path: "/v1/api-keys/{keyId}"
tags: ["API Keys"]
---

# Update API key

`PATCH /v1/api-keys/{keyId}`

Updates API key attributes. Use null to clear optional fields.

## Path parameters

- `keyId` string, required — API key identifier.

## Headers

- `x-project-id` string — Selects the active project for this request. Required for session/dashboard callers. Ignored when authenticating with an API key, whose scope is fixed to the key's project.

## Request body

- object — Update API key request body.
  - `name` string — Updated key name.
  - `description` string, nullable — Updated description. Use null to clear.
  - `walletScope` 'all' | 'selected' — Updated wallet access mode. Provide this when changing wallet bindings, or by itself to reset the key to all wallets.
  - `allowedIps` string[], nullable — Updated IPv4/IPv6 address or CIDR allowlist. Use null to clear.
  - `expiresAt` string, date-time, nullable — Updated expiration. Use null to clear.
  - `permissions` string[], nullable — Updated explicit permission set. Use null to revert to role defaults.
  - `signingWalletId` string, nullable — Updated default signing wallet binding. Use null to clear all wallet bindings.
  - `signingWalletIds` string[], nullable — Updated list of wallet IDs bound to this key. Use null to clear all wallet bindings.
  - `walletBindings` object[], nullable — Updated wallet-level permission bindings. Use null to clear all wallet bindings.
    - `walletId` string, required
    - `permissions` string[]

## Response `200`

API key updated

- object — Standard success response envelope.
  - `data` object, required — Generic success response payload.
    - `success` boolean, required — Operation success flag.
  - `meta` object, required — Response metadata.
    - `requestId` string, required — Request identifier for tracing.
    - `timestamp` string, date-time, required — ISO 8601 timestamp.

## Other responses

- `400` — Error
- `401` — Error
- `403` — Error
- `404` — Error
- `500` — Error

---

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