Create API key
create_api_keyRequires the admin scope or higher. Creates an API key. The plaintext key appears only in this result and cannot be retrieved again. expires_at makes a short-lived key. create_ingest_key, which needs only the write scope, mints a single-monitor tracing key.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Label for the key, e.g. "github-actions". | |
| scope | No | What the new key may do. "read" is every GET; "write" (the default) is everything except managing API keys, so a key at that tier cannot mint itself a replacement; "admin" is everything. A scope above the creating key's is refused, and the refusal names the ceiling. "ingest" only sends pings and telemetry (traces, metrics, logs) and cannot call the REST API, for a key kept in a dotfile or an exporter's config. | |
| check_id | No | Only with scope "ingest": binds the key to this one monitor (UUID from list_monitors), so it sends telemetry for that monitor alone. An exporter that cannot name its monitor, such as Codex, needs it. | |
| expires_at | No | Optional RFC 3339 expiry, e.g. "2026-12-31T00:00:00Z". Omitted: 90 days. Either way it is capped at the creating key's own expiry. |