Update API key

PATCH/v1/keys/{hash}

Update an existing API key owned by the authenticated user.

Use the hash returned by GET /v1/key, GET /v1/keys, or POST /v1/keys. The raw API key string is not accepted as the path identifier.

Authentication

Authorization Bearer

Use either a Token360 API key (sk-token360-...) or a signed-in user JWT.

Path Parameters

hashstringrequired

API key hash identifier.

Request Body

namestring

New API key name. Blank values are ignored.

disabledboolean

true disables the key. false enables it only when it has not expired.

limitnumber | null

Accepted but ignored.

limit_resetstring | null

Accepted but ignored.

Response

dataobject

Updated API key details.

data.hashstring

Hash identifier used by management endpoints.

data.namestring

API key name.

data.labelstring

Human-readable label. Matches name.

data.disabledboolean

True when the key status is not ACTIVE or expires_at is in the past.

data.workspace_idstring

Workspace code for the key.

data.creator_user_idstring | null

Owner user ID.

data.created_atstring

Create timestamp in UTC ISO-8601 format.

data.updated_atstring | null

Last update timestamp.

data.expires_atstring | null

UTC expiration timestamp, or null.

data.usagenumber

Total Token360 credit usage in USD.

data.usage_dailynumber

Daily usage. Currently 0.

data.usage_weeklynumber

Weekly usage. Currently 0.

data.usage_monthlynumber

Monthly usage. Currently 0.

data.limitnumber | null

Spending limit. Currently null.

data.limit_remainingnumber | null

Remaining spending limit. Currently null.

data.limit_resetstring | null

Limit reset interval. Currently null.

data.is_free_tierboolean

Currently false.

data.is_management_keyboolean

Currently true for these management responses.

data.is_provisioning_keyboolean

Currently false.

data.rate_limitobject

Per-minute request limit metadata.

Request

Shell
1curl -X PATCH https://api.token360.ai/v1/keys/f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943 \
2  -H "Authorization: Bearer sk-token360-inf-..." \
3  -H "Content-Type: application/json" \
4  -d '{
5    "name": "Updated API Key Name",
6    "disabled": false
7  }'

Response

JSON
1{
2  "data": {
3    "hash": "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943",
4    "name": "Updated API Key Name",
5    "label": "Updated API Key Name",
6    "disabled": false,
7    "workspace_id": "DEFAULT",
8    "creator_user_id": "42",
9    "created_at": "2026-06-04T00:00:00Z",
10    "updated_at": "2026-06-04T01:00:00Z",
11    "expires_at": null,
12    "usage": 12.34,
13    "usage_daily": 0,
14    "usage_weekly": 0,
15    "usage_monthly": 0,
16    "limit": null,
17    "limit_remaining": null,
18    "limit_reset": null,
19    "is_free_tier": false,
20    "is_management_key": true,
21    "is_provisioning_key": false,
22    "rate_limit": {
23      "interval": "minute",
24      "note": "Token-360 per-minute request limit",
25      "requests": 1000
26    }
27  }
28}
Was this page helpful?