extractr docs
Management

Rename an API key or change its scopes

PATCH
/manage/keys/{id}

Updates the key in place — the secret is unaffected, so narrowing scopes takes effect immediately without a rotation.

Authorization

BearerAuth
AuthorizationBearer <token>

Clerk session token (dashboard/management routes). In local dev mode use the X-Dev-User header instead.

In: header

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X PATCH "https://example.com/manage/keys/key_9f2c4b1a" \  -H "Content-Type: application/json" \  -d '{}'
{  "id": "key_9f2c4b1a",  "name": "Production",  "prefix": "ext_live_a1b",  "createdAt": "2019-08-24T14:15:22Z",  "lastUsedAt": "2019-08-24T14:15:22Z",  "revoked": true,  "scopes": [    "instagram",    "dice"  ]}
{  "error": {    "code": "invalid_api_key",    "message": "The provided API key is invalid or has been revoked."  }}
{  "error": {    "code": "invalid_api_key",    "message": "The provided API key is invalid or has been revoked."  }}
{  "error": {    "code": "invalid_api_key",    "message": "The provided API key is invalid or has been revoked."  }}