API key revoked

api_key_revoked HTTP 401

The key was revoked. If it was revoked as part of a rotation you were given a replacement and a grace period, and that period has now ended — deploy the new key. GET /v1/me on a still-valid key reports revokes_at during a grace period, which is the signal to act before seeing this error.

How to react to this in code

Switch on the code member — api_key_revoked — which is stable. Do not parse the type URI: it points here, and where "here" is may change.