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.

Historical four-step API-key rotation map. It labels the entry Settings and implies copied limits. The current flow uses Profile → API keys; Duplicate settings starts usage limits blank and expiry at Never expires.
This historical map uses Settings and implies that usage limits are copied. Follow the current steps below: open **Profile → API keys**, then explicitly restore usage limits and expiry after **Duplicate settings**. The final step still revokes the old key and verifies the replacement. Open full-size screenshot.

Steps

  1. Open Profile → API keys, expand the key used by the automation, and record its Permission, Protocols, Reach, expiry, IP allowlist, and active hours.
  2. 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.
  3. Copy the newly issued key from the is ready dialog before closing it; Dosya cannot reveal that secret again.
  4. 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.
  5. Return to the key list and compare Last used; confirm the replacement handled the test rather than a cached result.
  6. 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.

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.

    Check the outcome before you retry

    Use these shared checks when a task needs a second look.