Upgrading to v0.5.7.0
Service keys + /v1/keys lifecycle endpoints
Service keys + /v1/keys lifecycle endpoints
This is a non-breaking release. Existing sk_test_… and sk_live_… API keys keep working unchanged. Follow the steps below only if you want to adopt the new agent-native key management surface.
Skip this guide if:
Adopt service keys if:
sk_svc_live_… or sk_svc_test_…) is shown exactly once. Save it to your secrets manager as SAPERLY_SERVICE_KEY.The response includes plaintext_key exactly once. Save it before the response leaves memory.
Replace process.env.SAPERLY_API_KEY with process.env.SAPERLY_SERVICE_KEY in the code paths that mint, rotate, or revoke credentials. Keep your regular API key for everything else. Service keys cannot place calls, send SMS, or mutate lines.
If you validate API responses against a schema, add legacy_full to the allowed values for permissions on key responses. It is read-only (you can’t set it on POST or PATCH), but it is returned for keys minted before this release.
Step 4’s read itself writes an audit_read event that will appear on the next read. The audit log audits its own readers.
There is nothing to roll back. Service keys are opt-in. To stop using them, leave the existing service key in place (it costs nothing) and stop calling /v1/keys. To fully remove, revoke the service key from the portal.