API referenceAPI keys
Update key metadata
PATCH
/api-keys/{id}Only name and expiresAt are patchable — a key’s role is fixed at creation. Send expiresAt: null to clear an expiry; omit it to leave it untouched.
Requires an API key with one of these roles: admin.
Authorization
bearerAuth AuthorizationBearer <token>
An API key created in Settings → API Keys.
In: header
Path Parameters
id*string
Format
uuidRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X PATCH "https://example.com/api-keys/497f6eca-6276-4993-bfeb-53cbbbba6f08" \ -H "Content-Type: application/json" \ -d '{}'{ "data": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "role": "admin", "keyPrefix": "string", "status": "active", "expiresAt": "2019-08-24T14:15:22Z", "createdAt": "2019-08-24T14:15:22Z", "lastUsedAt": "2019-08-24T14:15:22Z", "requestCount": 0, "rateLimit": 0 }, "meta": { "requestId": "string", "timestamp": "string" }}