events:ingest. A key with that scope cannot read your data,
so a leak of it does not expose your project. This recipe creates such a key, checks it, and
revokes it.
The caller needs permission to manage keys, and a key can only give scopes that the caller holds.
See API keys for the rules.
Create the key
The secret appears once, in the response. Put it straight into your secret store. Do not print it, log it, or paste it into a prompt.- CLI
- MCP
- REST API
--yes. Read the secret from new-key.json
with jq -r .key, move it to your secret store, and delete the file.expires_at is optional. Use it for keys that you only need for a while.
Check what the key can do
Keys are listed bykey_prefix, never by secret. A key with only events:ingest is refused when
it reads data:
403. To send telemetry with this key, see the
Ingestion API.
Now list the keys of the project:
- CLI
- MCP
- REST API
Revoke the key
Revoking is permanent. A revoked key stops working within a minute, and it leaves the list.- CLI
- MCP
- REST API
Next steps
API keys API
Every scope and the rules for giving them.
Ingestion API
Send telemetry with an ingest-only key.