---
title: "Rename key"
method: PATCH
path: "/keys/{key_id}"
tags: ["Keys"]
---

# Rename key

`PATCH /keys/{key_id}`

## Request

- Base URL: `https://console-api.blockvectra.com/v1`
- URL: `https://console-api.blockvectra.com/v1/keys/{key_id}`
- Auth: HTTP bearer

Only `label` can be modified; revoked keys can also be renamed.

## Path parameters

- `key_id` string, required

## Request body

- KeyLabelRequest
  - `label` string, required: 1–64 characters, without control characters.

## Response `200`

Renamed key.

- KeyView
  - `key_id` string, required
  - `label` string, required: 1–64 characters, without control characters.
  - `status` 'active' | 'disabled' | 'revoked', required
  - `cu_per_sec` integer, required: Actual per-key token bucket refill rate (CU/s), including any paid floor or higher custom limit. Effective aggregate across all chains and Data API for this key.
  - `burst_cu` integer, required: Actual per-key token bucket capacity (CU), including any paid floor or higher custom limit. Effective aggregate across all chains and Data API for this key.
  - `created_at` string, date-time, required: RFC 3339 UTC, second precision, ending in `Z` (`2026-09-26T08:00:00Z`); no fractional seconds, without `+00:00` timezone offsets.
  - `created_by` 'console' | 'operator', required: `console` for self-created by client, `operator` for created by support.
  - `revoked_at` string, date-time, required: RFC 3339 UTC, second precision, ending in `Z` (`2026-09-26T08:00:00Z`); no fractional seconds, without `+00:00` timezone offsets.
  - `replaced_by_key_id` string, nullable, required: New key created from rotation; null if never rotated.
  - `cu_cap` integer, nullable, required: Lifetime CU cap for this key; null if unlimited. Inherited by rotated new key.
  - `cu_spent` integer, required: Settled CU counted toward key cap (settled hourly; excludes unsettled usage in latest period); inherited by rotated new key.
  - `expires_at` string, date-time, required: RFC 3339 UTC, second precision, ending in `Z` (`2026-09-26T08:00:00Z`); no fractional seconds, without `+00:00` timezone offsets.

## Other responses

- `400`: Invalid label, unknown fields.
- `401`: Missing or invalid session (without distinguishing cause).
- `404`: Key does not exist or does not belong to this account.
- `413`: Request body exceeds 64 KiB limit. Exceeding this limit returns 413 (`payload_too_large`).
- `429`: Rate limit exceeded.
- `500`: Internal server error.

---

[API](https://skmtc.dev/blockvectra/apis/blockvectra-console-api.md) · [All operations](https://skmtc.dev/blockvectra/apis/blockvectra-console-api/llms.txt) · [OpenAPI document](https://skmtc.dev/blockvectra/apis/blockvectra-console-api/revisions/28c91298f433?raw)
