/api/v1/keys/{hash}Update an API key
Needs a provisioning key (403 otherwise). disabled: true revokes the key permanently; disabled: false on a revoked key is 400. limit: null removes the cap; an omitted limit_reset keeps the existing cap's period. include_byok_in_limit is accepted for compatibility and has no effect.
認証: AuthorizationヘッダーにBearer形式のAPIキー
パスパラメータ
hashstring必須The key id (
hashin key objects).
リクエストボディ
namestring | null1 to 80 characters after trimming.
disabledboolean | nullTrue revokes permanently.
limitnumber | nullSpend cap, USD; explicit null removes the cap.
limit_resetenuminclude_byok_in_limitboolean | nullAccepted for compatibility; ignored.
レスポンス
200The updated key.
レスポンス
dataobject必須data
hashstringThe key id (never the secret hash).
namestringlabelstringKey prefix and last characters.
disabledbooleanTrue once revoked.
is_provisioningbooleanidentity_idstring | nulllimitnumber | nullSpend cap, USD; null when uncapped.
limit_remainingnumber | nullCap less this window's spend and reservations, USD; null when uncapped or unreadable in time.
limit_resetenum | nullusagenullAlways null; see GET /api/v1/usage.
created_atstringupdated_atstring
400Invalid name, limit or period, or an attempt to re-enable a revoked key.
レスポンス
errorstring必須Human-readable message.
codestringStable machine reason, when the route defines one (for example
pro_required).actionstringStable remediation action, when the route defines one.
detailsobjectCustomer-safe string facts the caller needs to act (for example a suggested identifier).
401Missing, unknown or revoked API key.
レスポンス
errorstring必須Human-readable message.
codestringStable machine reason, when the route defines one (for example
pro_required).actionstringStable remediation action, when the route defines one.
detailsobjectCustomer-safe string facts the caller needs to act (for example a suggested identifier).
403The key is valid but may not perform this action (for example an inference key on a provisioning-key route, or a feature outside your plan).
レスポンス
errorstring必須Human-readable message.
codestringStable machine reason, when the route defines one (for example
pro_required).actionstringStable remediation action, when the route defines one.
detailsobjectCustomer-safe string facts the caller needs to act (for example a suggested identifier).
404No key with this id in your organization.
レスポンス
errorstring必須Human-readable message.
codestringStable machine reason, when the route defines one (for example
pro_required).actionstringStable remediation action, when the route defines one.
detailsobjectCustomer-safe string facts the caller needs to act (for example a suggested identifier).
422The body or query failed validation.
レスポンス
detailarray<object>必須detail
typestringlocarray<string | integer>msgstring
リクエスト
curl -X PATCH https://api.experientiallabs.ai/api/v1/keys/0b9d4f6e-2a1c-4e8b-9f37-5c6d2e1a8b40 \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "billing-sync-v2",
"limit": 100,
"limit_reset": "weekly"
}'レスポンス
{
"data": {
"hash": "0b9d4f6e-2a1c-4e8b-9f37-5c6d2e1a8b40",
"name": "billing-sync-v2",
"label": "xpl_live_8f2c…a91d",
"disabled": false,
"is_provisioning": false,
"identity_id": "7a3e1c90-4b2d-4f6a-9e18-2d5c0b7f3a61",
"limit": 100,
"limit_remaining": 91.4,
"limit_reset": "weekly",
"usage": null,
"created_at": "2026-11-02T09:14:22.501Z",
"updated_at": "2026-11-02T09:14:22.501Z"
}
}https://api.experientiallabs.ai/api/v1/keys/0b9d4f6e-2a1c-4e8b-9f37-5c6d2e1a8b40