For the complete documentation index, see llms.txt. This page is also available as Markdown.

Update API Key

Change an API key's description, or disable and re-enable it.

Change an API key's description, or disable and re-enable it.

Important: Use the API Keys page in the console to rename, disable or re-enable a key. This endpoint is documented here for completeness, but it is not currently a reliable way to do it — see Known issues.

HTTP Request

PUT {API_URL}/keys/{key_id}

where API_URL = https://api.nebulablock.com/api/v1.

Path Parameters

Parameter
Requirement
Type
Description

key_id

Required

integer

The ID of the key, from List API Keys

Body Parameters

At least one of description or status must be present, otherwise the request fails with 400.

Parameter
Requirement
Type
Description

description

Optional

string

A new description for the key

status

Optional

integer

1 to enable the key, 0 to disable it

Note: Disabling a key stops it authenticating immediately, and re-enabling restores it. The API Keys page in the console is the most reliable way to toggle a key. Keys cannot be regenerated in place — create a new key and delete the old one instead.

Response Attributes

data dict

The updated key: id, key, name, description, status, and created_at.

status string

success or failed.

message string

A description of the result.

Example

Request

Known issues

Two problems in the current implementation make this endpoint unreliable. Prefer the console until they are resolved:

  • Disabling does not take effect. status: 0 is treated as absent, so the request is accepted but the key keeps authenticating. Only status: 1 is acted on.

  • A successful update can still return 500. The update is committed, then the response is built from a value the service does not return, so the call fails after the change has already been written. Treat a 500 here as "possibly applied" and re-read the key with List API Keys rather than retrying blindly.

See also

Last updated