Skip to content
AI · Secret guide

Leaked Retell AI API Key: what to do in the first hour

High severityDetected onlyLast verified · 5 min read

A Retell AI API key lets whoever holds it call the Retell API for voice agents: start outbound phone calls, read call records and transcripts, and change the agents your account runs. Calls are billed by the minute, and an agent that places calls can be used to reach real people in your name. That makes a leaked key a cost problem and a reputation problem at the same time. Delete the key first, then review the calls and agents it could reach.

Check your GitHub account for leaked secrets — free

Provider
Retell AI
Severity
High
Impact
SaaS account access and billing
Checked live by LeakWatch
No

What a Retell AI API Key looks like

Retell AI API keys start with key_, followed by a string of lowercase hexadecimal characters:

key_…XXXX   Retell AI API key (masked)

The key_ prefix is shared by many services, so the name next to it matters. Look for a RETELL_API_KEY variable, a configuration entry that mentions Retell, or a request that sends the key to the Retell API. A value with the key_ prefix in an unrelated file is not necessarily a Retell key, so check the context before you act on it. Note that Retell also issues identifiers for agents and other objects, which use different prefixes and are not secrets in the same way.

Keys are sent as a bearer token in the Authorization header of each request. A key can be created with full access, or with restricted permissions for each part of the API, such as calls, agents or phone numbers. The scope of a leaked key therefore depends on how it was set up, and that is the first thing to check.

How Retell AI API Keys get leaked

  • Environment files. A .env file with the key, committed to a repository that was public at some point or shared with contractors.
  • Serverless and deployment settings. A function or container configuration that writes the key into the image or the source tree.
  • Scripts that place calls. A campaign script with the key typed in, copied to a shared drive or sent to a colleague.
  • Build logs. A deployment step that prints its environment, or an error message that shows the request headers.
  • Support requests. A key pasted into a ticket or a forum post to ask why an agent does not respond.

What to do in the first hour

  1. Delete the key. Open the API keys section of your Retell AI settings, find the key that leaked and delete it. If the key is set as the webhook key, you may need to designate a different key first, since a third-party source says the webhook key cannot be deleted while it holds that role.
  2. Review calls. Check the call history for the period since the key may have been exposed. Look for outbound calls you did not place, calls to unknown numbers, and calls at unusual hours.
  3. Check the agents. Review the agents and their settings. A changed prompt or a new voice on an agent is a sign that the key was used to edit it.
  4. Check the phone numbers. Confirm that the phone numbers connected to your account still belong to your team, and remove any you do not recognize.
  5. Create a replacement with restricted permissions, so that it can only do what the integration needs. Store it in your secret manager or in the deployment’s environment variables.
  6. Clean the code. Remove the value from the files and the history, and point the integration at the environment variable. See I accidentally pushed an API key to GitHub.

Not sure what else leaked from the same project? Run a free scan.

Not sure what else leaked? Run a free scan.

Revoke it at Retell AI

The API keys are listed under System Settings in the Retell AI dashboard. Open the API keys page, locate the key by its name, and use the trash icon to delete it after you confirm. Retell’s documentation on managing API keys is at docs.retellai.com, which also advises deleting a compromised key straight away and creating a new one. The webhook key limitation described above comes from a third-party detector page, not from Retell’s own documentation, so confirm it in the dashboard before you rely on it. The exact labels may have changed since this guide was written.

How LeakWatch detects it

The rule is called “Retell AI API Key”. It looks for the word retell close to an assignment such as an equals sign or a colon, and then a value that begins with key_ followed by twenty-eight lowercase hexadecimal characters. The word must appear before the value and within a short distance of it. A key_ value with no Retell name nearby is not reported. The severity is high, with the impact class for SaaS services. This type is not checked live: LeakWatch does not call the Retell API with the key it finds.

LeakWatch detects this format but does not check it live: it can tell you the key is exposed, not whether it still works. Assume it does until you have revoked it.

FAQ

Can someone make calls with my agents using a leaked key?

Yes, if the key has permission to start calls. Check the call history and the phone numbers, and remove any call activity you did not start. Limit the replacement key to the calls it actually needs.

Is an agent identifier a secret?

Not in the same way. An identifier tells the API which agent to use, but it does not authenticate a request on its own. The key is the credential to protect.

Should the new key have full access?

Only if the integration needs every part of the API. Restricting the key to calls or to reading transcripts keeps a future leak from changing agents or numbers.

Get alerted next time a secret leaks — create a free account

LeakWatch is not affiliated with Retell AI.