revoke_leaked_key
revoke_leaked_key

Report and revoke a leaked PostHog API key or token

Public, unauthenticated endpoint for self-service revocation of a leaked PostHog personal API key, project secret API key, legacy feature flags secure API key, or OAuth access/refresh token. If the token matches a real credential, it is revoked immediately and the owner is notified by email. This includes an expired OAuth access token: the paired refresh token it protects may still be live. A legacy feature flags secure API key is matched through its migrated project secret API key row; it cannot be rotated automatically, so its project admins get an email to rotate it.

This endpoint only checks the region it is running on. "found": false does not guarantee the token is safe. If you're not sure which region issued it, check both: https://app.posthog.com/api/revoke_leaked_key and https://eu.posthog.com/api/revoke_leaked_key.

post/api/revoke_leaked_key/

Request

  • Base URL: https://us.posthog.com
  • URL: https://us.posthog.com/api/revoke_leaked_key/
  • Auth: none required

Request body

tokenstring required

The leaked PostHog personal API key, project secret API key, legacy feature flags secure API key, or OAuth access/refresh token to revoke.

Response

Lookup result.

foundboolean required

Whether a matching PostHog key or token was found. It was revoked, or, for team_secret_token, its project admins were told to rotate it.

Changes

No recorded changes to this operation across all 1 revision of this API.