The Hacktron REST API authenticates every request with an organization‑scoped API key sent in theDocumentation Index
Fetch the complete documentation index at: https://docs.hacktron.ai/llms.txt
Use this file to discover all available pages before exploring further.
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.
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:
X-Organization-Id or any other header — the organization is resolved from the key.
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.| Scope | Grants access to |
|---|---|
read | All GET endpoints: list and read scans, findings, and cost estimations. |
write | Mutating endpoints: trigger scans, create cost estimations, update findings, add comments. Implies read for the same resources. |
delete | Reserved for future use. |
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:
| Status | Meaning |
|---|---|
401 | Missing, malformed, revoked, or expired API key. |
403 | Key is valid but is missing the required scope. |
429 | You have hit the rate limit for this key. See Rate limits. |