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

# Mailgun API key (`mailgun_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.

Private API key of Mailgun, the password of HTTP Basic authentication with the user name api. The regexp covers the older form key- followed by 32 hexadecimal digits, as gitleaks checks it. Keys created later have a different form that Mailgun does not document, and they are not covered.

- 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`):

```
^key-[0-9a-f]{32}$
```

## Examples

- `key-` (invalid example) — Prefix without the key

## Supported by tools

- `datadogsds`
- `gitguardian`
- `githubsecretscanning`
- `gitleaks`
- `pywhat`

## Sources

- doc: <https://documentation.mailgun.com/docs/mailgun/api-reference/authentication>
- other: <https://github.com/gitleaks/gitleaks/blob/master/config/gitleaks.toml>

## Quality

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

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