How do I rotate my Pinwheel API keys?
You can rotate your Pinwheel API keys with zero downtime by creating a new key before revoking the old one. At a high level:
Create a new API key, either from the Developers tab in your Pinwheel Dashboard or programmatically via the Admin API.
Update your secret store with the new key and secret — copy or download the secret right away, since it's only shown once at creation (the exception is Sandbox keys, whose secrets stay visible since that data isn't sensitive).
Update your app(s) to use the new key's secret.
Revoke the old key, again from the Dashboard or the Admin API. This is immediate and irreversible, so make sure your apps are fully switched over first — and keep at least one active key at all times, or your app will lose access to the API.
A couple of things worth knowing: each workspace can have up to 10 active keys, you can optionally set an expiration date when creating a key, and what you're able to do depends on your Dashboard role — Owners and Administrators can create and revoke keys, while Developers can only view them. You'll also get an email notification whenever a key is created or revoked, so it's worth whitelisting no-reply@getpinwheel.com to make sure those don't get caught in spam.
If you'd rather automate rotation, the Admin API supports the same create/query/revoke actions you'd use in the Dashboard.