Skip to content
Messaging · Secret guide

Leaked Customer.io API Key: what to do in the first hour

Medium severityDetected onlyLast verified · 4 min read

A Customer.io API key authenticates calls that send data to, or read data from, a Customer.io workspace. Depending on the key type, it can create or update people and their attributes, send events that trigger campaigns, or, for the broader keys, send messages and read customer data. The main danger is twofold: customer personal data exposed, and messages sent to your audience under your name. Delete the key first, then investigate.

Check your GitHub account for leaked secrets — free

Provider
Customer.io
Severity
Medium
Impact
SaaS account access and billing
Checked live by LeakWatch
No

What a Customer.io API key looks like

Customer.io has several kinds of credentials, and the leak may involve more than one:

CUSTOMERIO_SITE_ID=XXXX…   Track API site ID (an identifier)
CUSTOMERIO_API_KEY=XXXX…   Track API key (secret, 20 to 32 letters and digits)
Authorization: Bearer XXXXXXXX…            App API key (secret)
  • Track API credentials are a site ID plus an API key, used with basic authentication to send people and events.
  • App API keys are bearer tokens for the broader App API, which can send transactional messages and read workspace data.
  • Other write keys exist for the data pipelines features.

The values are plain alphanumeric strings with no prefix, so the string alone is not recognizable. Look for variable names like CUSTOMERIO_API_KEY, CUSTOMER_IO_TOKEN or customerio_key, SDK initialisation calls, and requests to Customer.io hosts. The site ID is an identifier, not a secret on its own, but it travels with the key.

How Customer.io API keys get leaked

  • Backend initialisation. A server file that creates the Customer.io client with the key written inline.
  • Committed environment files. CUSTOMERIO_API_KEY in a .env file, a compose file or a framework configuration.
  • Frontend bundles and mobile apps. A key used for tracking placed in client code, where anyone can read it. Use the key types meant for that purpose and keep the secret ones on the server.
  • Marketing and data scripts. Import jobs or notebooks that push customers into Customer.io, committed with their credentials.
  • CI pipelines and logs. A deploy step that echoes its environment, or a test configuration in a public repository.

What to do in the first hour

  1. Find the credential set. In the vendor’s console, open the account settings page that lists API credentials, which shows when each set was created and last used. Match the leaked value by name and last-used time.
  2. Create a replacement, then delete the old one. The vendor requires at least one set of Track credentials per workspace, and the default set cannot be deleted before another exists. Create the new set, deploy it, then delete the exposed one.
  3. Deploy the new key to the application or secret store and check that events are still received.
  4. Check the data. Look at the people and activity log for records or attributes you did not create, sudden imports, or events with odd names. For App API keys, assume customer data could have been read and decide whether a notification duty applies to you.
  5. Check outgoing messages. Review recent campaigns, broadcasts and transactional sends for content you did not write, and look at delivery, bounce and complaint figures.
  6. Review integrations and webhooks. Look for reporting webhooks or destinations you do not recognize that could forward data outside.
  7. Clean up the code and search for other secrets next to the key. See I accidentally pushed an API key to GitHub.

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

Not sure what else leaked? Run a free scan.

Revoke it at Customer.io

Credentials are managed in the account settings, in the area for API credentials, in your account. The documentation on managing credentials at the vendor documentation explains that sets can be renamed and deleted, and that deleting requires typing the name of the set to confirm. A person has not confirmed the exact menu wording for this guide, and the interface can change, so look for the section where API credentials are listed, and prefer the create-new-then-delete-old sequence rather than hunting for a regenerate button. Every integration that used the old value must be updated.

How LeakWatch detects it

The rule is called Customer.io API Key. It needs the word customer followed by an optional separator and io (so customerio, customer_io and customer.io all count), then up to 20 letters, digits, spaces, dots, dashes or underscores, an optional api key, key or token label, a : or = sign, optional quotes, and then a value of 20 to 32 letters and digits. Plain prose such as “customer row id: …” does not match, since the word io must follow customer. Values outside that length, or a key with no Customer.io wording close by, are not reported. The severity is medium. This type is not checked live: LeakWatch does not send any request to Customer.io with the key it found.

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

Is the site ID secret?

Not by itself, it identifies the workspace. But with the API key it gives access, so rotate the key and treat the pair as exposed.

Can the leaked key read my customer list?

Track credentials are mainly for writing people and events, while App API keys can read workspace data. Check which kind leaked, and review activity for both.

Do I need to tell my customers?

That depends on your law and on whether personal data could have been read. Document what the key could access and ask your data protection contact or lawyer.

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

LeakWatch is not affiliated with Customer.io.