Revoke and replace an API key
Identify an API key by name and prefix, replace it in the safe order for the incident, then revoke it and verify that the old secret is refused.
Last reviewed
Revoking one API key invalidates that credential without changing the account password, browser sessions, or unrelated keys. Choose the replacement order according to whether continuity or immediate containment matters more.

Steps
- Open Profile → API keys, search by the client’s descriptive name or visible
dos_····prefix, and expand the row. Compare Permission, Protocols, Reach, Created, Expires, and Last used before acting. - Stop the client or scheduled job that uses the key. For a non-WordPress key, select Duplicate settings, create a narrowly scoped replacement, copy the one-time secret, update the client, and prove both an allowed and denied operation before revoking the old key. A
wp_siterow has no Duplicate settings action; reconnect that site through its WordPress plugin instead. - For a suspected leak, skip the overlap: revoke the exposed key first and accept temporary downtime. A replacement can use Read only, Upload only, or Full access, selected protocol surfaces, workspace or folder reach, IP ranges, active hours, and expiry.
- Select Revoke on the exact row. In Revoke name?, review
Anything still using it stops working immediately. This can't be undone.and choose Revoke. The control permanently deletes the row, while cached authorization can outlive the UI receipt briefly. - Confirm Key revoked and
Anything still using them will be refused from now on.Dosya initiates invalidation for the API-key cache and any tied S3 access-key cache. Another worker isolate or edge cache can continue using a cached authorization until its entry expires. - Send harmless requests with the retired secret until authentication is refused, allowing up to five minutes for the longest API-key cache. Keep the old client stopped during that window, then resume only with the tested replacement.
A Free account can hold three API keys; the absolute user cap is 20. Keys cannot be edited after creation. Revoking a wp_site key also disconnects that WordPress site because the key is its only credential.

Expected result
The old row disappears from API keys, cache invalidation begins, and the retired secret is rejected within five minutes. A routine replacement retains only the copied restrictions and passes its boundary test; an emergency rotation keeps the old client stopped until rejection is verified.
Revoke failed leaves the outcome uncertain. Reload the list: if the row remains, stop the client and retry; if it is absent, test the old secret rather than creating duplicate replacements.
The replacement cannot be created. Remove an unused key or upgrade when Dosya reports The free plan allows 3 API keys. Delete one or upgrade for more. The global refusal is Maximum of 20 API keys reached.
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.