---
id: "posthog_personal_api_key"
kind: "datatype"
status: "draft"
is_pii: false
categories: ["secrets"]
langs: ["common"]
quality: 70
url: "https://registry.apicrafter.io/datatype/posthog_personal_api_key"
---

# PostHog personal API key (`posthog_personal_api_key`)

> **Draft.** Draft records have not been reviewed yet and may be incomplete or wrong; do not treat them as authoritative for legal or compliance decisions.

Personal API key of PostHog, which gives access to the private API endpoints of a user's projects. PostHog documents the prefix phx_. Project tokens (phc_) are meant to be public and are not this datatype. The vendor does not document the length or the characters after the prefix; the regexp accepts letters and digits.

- Parent datatype: `api_key`
- Personal data (PII): no
- Categories: Secrets and credentials (passwords, keys, tokens) (secrets)
- Countries: global
- Languages: Common to most languages (common)
- Classification: identifier

## Detection

Regular expression (Python `re`):

```
^phx_[A-Za-z0-9]+$
```

## Examples

- `phx_` (invalid example) — Prefix without the secret

## Supported by tools

- `datadogsds`
- `gitguardian`
- `githubsecretscanning`

## Sources

- doc: <https://posthog.com/docs/api>

## Quality

Score 70/100. Missing: examples, mapping (Wikidata, Schema.org, ...), translation.

JSON: <https://registry.apicrafter.io/api/v1/datatypes/posthog_personal_api_key.json> · Edit: <https://github.com/apicrafter/metacrafter-registry/edit/main/data/datatypes/any/secrets/posthog_personal_api_key.yaml>
