Rotate an automation API key
Replace an automation credential without downtime, test the new secret, and revoke the old key so every later request uses the intended access.
Last reviewed
Rotate an API key by overlapping the old and new credentials only long enough to test the replacement. Dosya keys cannot be edited, and the full dos_… secret is shown only once, so save it directly into the automation’s encrypted credential field.

Steps
- Open Profile → API keys, expand the key used by the automation, and record its Permission, Protocols, Reach, expiry, IP allowlist, and active hours.
- Choose Duplicate settings and give the replacement a distinct name. Review the prefilled permission, protocols, reach, IP ranges and active hours. Usage limits start blank and expiry starts at Never expires; re-enter the intended limits and expiry before creating the replacement. Narrow access if the automation needs less.
- Copy the newly issued key from the is ready dialog before closing it; Dosya cannot reveal that secret again.
- Replace the credential in Zapier, n8n, or the calling system, then run one read or upload that matches the key scope and confirm the run succeeds.
- Return to the key list and compare Last used; confirm the replacement handled the test rather than a cached result.
- Expand the old row, choose Revoke, approve the irreversible deletion, and run the same automation once more to prove only the new key works.
A revoked key is refused immediately after its cache entry is cleared; the interface confirms Key revoked and says anything still using it will be refused. A free account may hold 3 keys and every account has a hard maximum of 20, so revoke an unused key first if creation reports a cap. Revoking a wp_site key also disconnects that WordPress site; rotate those credentials through the site connection flow instead.
Expected result
The replacement row has the intended restrictions, the production automation succeeds with its newly stored secret, and requests that still present the retired key receive an authentication refusal. Keep the new secret in the automation’s credential store, not in a task note or run log.
Related guides
Was this helpful?
Loading helpfulness results…
Voting saves a necessary ballot cookie for up to 180 days so you can change your answer.
Questions and replies
Ask about the steps in this guide. Questions are reviewed before publication.
Keep account details, credentials and private files out of public questions. Use private support for those.
Loading questions…
Sign in to your Dosya account to ask a question.