X-Api-Key header.
API keys are:
- Organization‑scoped — each key belongs to exactly one organization. You never need to pass an organization ID alongside the key.
- Scoped — each key declares one or more scopes (
read,write,delete) that gate which endpoints it can call.
Connecting an AI assistant (Claude, Cursor, Codex, …) instead of calling the
API directly? See the MCP guide — it can authenticate with
one of these API keys or with OAuth.
Creating an API key
API keys are created from the Hacktron dashboard. You must have the Admin or Owner role in the organization you are creating a key for.- Sign in to app.hacktron.ai and switch to the organization you want the key to belong to.
- Open Settings → API keys.
- Click Create API key.
- Give the key a descriptive name (for example
ci-pipeline,backstage-integration). - Choose the scopes the key needs — pick the minimum set your integration requires. See Scopes.
- Optionally set an expiration date.
- Click Create.
Key format
Hacktron API keys look like this:- They always start with the
hacktron_prefix. - The first 12 characters (for example
hacktron_3s9) are stored as a non‑secret prefix so you can recognise keys in your logs and in the dashboard. The full key is never stored server‑side — only a SHA‑256 hash.
Making authenticated requests
Send your API key in theX-Api-Key header on every request:
Scopes
Scopes control what an API key is allowed to do. They are declared when you create the key and cannot be changed afterwards — create a new key if you need different scopes.
Each endpoint in this reference states the scope it requires. Calling an endpoint with a key that is missing the required scope returns
403 Forbidden.
Revoking a key
You can revoke a key at any time from Settings → API keys in the dashboard. Revocation takes effect immediately — the next request with that key will fail with401 Unauthorized.
Revoked keys are kept in the dashboard audit trail (with last‑used timestamps) but can never be reactivated.
Testing your key
To verify a key is working, list scans:200 and a JSON body containing data, total, page, and limit fields.
Common failures: