Talk with Archie
API reference › Connect Keys
API reference › Connect Keys

Update API Key Metadata

PATCH/api/v1/connect-keys/{key_id}
Update an API key, writing its name and permissions to WorkOS and the other fields to Archie.

The response is the key's merged shape after the update.

Body shape — every field optional, send only what you want changed::

{ "name": "new label", "permissions": ["topics:read"], "workspace_id": "<uuid> | null", "rate_limit_per_minute": 60 | null, "description": "text" | null }

Split semantics:

  • name / permissions go to the WorkOS Management API. WorkOS doesn't expose a PATCH on api_keys today, so a name-only update writes a no-op into the WorkOS call (logs a TODO); permissions changes are flagged as "needs WorkOS PATCH support" and rejected with 501. (Phase 8.b adds rotation as the workaround.)
  • workspace_id / rate_limit_per_minute / description are mirror-only writes. workspace_id validated against the caller's org; rate_limit_per_minute >= 0.

On success, drops the per-key rate-limit cache so the next request re-reads from the mirror (avoids the up-to-5-minute stale window until the next validate_workos_api_key cache miss).

Path parameters
key_idstringRequired
Identifier of the API key, as returned in the id field when it was created.
Returns

Successful Response

Errors
StatusWhen
422Validation Error
curl https://uk.heyarchie.com/api/v1/connect-keys/<key_id> \
  -X PATCH \
  -H "Authorization: Bearer sk_..."
import requests

headers = {"Authorization": "Bearer sk_..."}

r = requests.patch("https://uk.heyarchie.com/api/v1/connect-keys/<key_id>", headers=headers)
print(r.json())
const r = await fetch("https://uk.heyarchie.com/api/v1/connect-keys/<key_id>", {
  method: "PATCH",
  headers: { "Authorization": "Bearer sk_..." },
});
const data = await r.json();
console.log(data);
Response
{
  "detail": [
    {
      "loc": [
        null
      ],
      "msg": "<string>",
      "type": "<string>"
    }
  ]
}

Every response also carries X-Request-ID. Quote it if you write to us about a call.