🎉 Try the public beta of the new docs site at algolia.com/doc-beta! 🎉
Guides / Security / API keys

How to restore an API key

You may accidentally delete one or more of your API keys. This can happen when you delete a user, because doing so causes their associated API keys to disappear.

You can restore either deleted or expired keys, but Algolia only keeps the last 1,000 deleted keys.

When you restore a deleted API key, Algolia automatically resets its validity limit to 0 (unlimited).

Using the API

You can restore a key with the restoreApiKey method.

1
$client->restoreApiKey("myAPIKey");

Using the Algolia dashboard

You can also restore API keys in your Algolia dashboard with the following steps:

  1. Go to your dashboard’s API keys section.
  2. Click the All API Keys tab.
  3. Click the Restore API Key button, insert your API key, then click Restore.
Did you find this page helpful?