Customer API — reference
Read your company’s cryptographic posture from a program: CycloneDX inventory, compliance per framework, what to fix first and signed reports.
Available on the Business plan. It is read-only: through the API you cannot start a scan, change a domain or touch billing.
The credential
A key belongs to the company, not to the person who created it, so it keeps working when that person leaves. Who created it is recorded.
The company owner creates it in Settings → API keys: a name, its permissions (scopes; all four come ticked) and, optionally, an expiry. With no expiry, it does not expire.
The secret is shown once, when the key is created. We store its SHA-256 hash and the prefix in clear; the secret is stored nowhere and cannot be shown again, to you or to support. If it is lost, revoke it and create another.
export PQSCORE_API_KEY='pqs_live_a1b2c3d4.AbCdEf…'
curl -s https://pqscore.io/api/v1/x/me -H "X-API-Key: $PQSCORE_API_KEY"The header is X-API-Key, not Authorization: Bearer. A key sent in Authorization returns 401, and so does a browser session token sent in X-API-Key: the two paths never mix.
Revoking is done on the same screen, is immediate and cannot be undone. The key stays in the list with its revocation date and its last use (last_used_at, with one-minute resolution), so you can see which key existed and when it was last used.
Permissions (scopes)
Four, and each route states which one it needs. A key without the route’s scope gets 403, not 401: the credential is good; the permission is not.
| Scope | What it opens |
|---|---|
domains:read | your company’s domains |
scans:read | scans, changes, findings, compliance and remediation |
cbom:read | the CycloneDX CBOM and the materials inventory |
reports:read | the list of reports and the signed PDF download |
Limits
1,000 requests per hour per key on the Business plan. Over that, 429 with Retry-After in seconds, which is what a cron knows how to read.
Per key and not per IP: an IP can be a whole NAT, and a key is exactly one client.
Routes
Everything hangs from https://pqscore.io/api/v1/x/. No route takes the company identifier: the key carries the company, so there is no parameter that could point at another one.
GET/meno scope
Does my credential work?
The first curl to run. Returns the key (prefix, name, scopes, dates) and the company (id, name, plan, lang).
company.lang (en | es) is the language to write to this company in. Routes that accept lang answer in English unless asked otherwise, so a client that wants to speak the company’s language reads this field and passes it on.
GET/domainsdomains:read
Your domains
Each domain with its relationship (own, yours, or third_party, a supplier’s), whether it is monitored and when it was added. Paginated.
curl -s "https://pqscore.io/api/v1/x/domains?limit=100&offset=0" -H "X-API-Key: $PQSCORE_API_KEY"GET/scansscans:read
Your scans, with PQScore and date
The same scans as the Scans tab in the web app, newest first and paginated. Each one carries its origin:
| origin | What it is |
|---|---|
company | your company ordered it |
monitor | PQScore monitoring of one of your domains |
member | a member of your company ran it from the scanner on one of your domains |
A domain counts if it is in your company today, own or third party: when you remove it, its monitor and member scans stop appearing; company ones stay. An anonymous scan from the public scanner, one from the crawler, or what another company ordered on a domain you share never appears. No row carries the email of whoever ran it.
Since 22 November 2026. Before, only company appeared: if you counted rows, you will now see more.
GET/scans/{scan_id}scans:read
One scan
{
"id": "…", "domain": "example.org", "status": "complete",
"pqscore": 61, "risk_level": "medium", "agility_level": 2,
"pqc_kex": true, "pqc_signature": false,
"migration_readiness": 44, "scoring_config_version": "2.1.0",
"industry": "Public administration", "country": "Spain", "source": "user",
"created_at": "…", "completed_at": "…", "failure_reason": null,
"origin": "monitor", "score_unverifiable_reason": null,
"breakdown": {"key_exchange": {"penalty": 3.0, "max": 30, "pqc_safe": true, "measured": true}}
}It opens the same scans as the list; any other identifier gives 404, never 403. The same goes for /changes and /cbom.
The PQScore is the only headline number. migration_readiness (MRS) measures something else —the ability to migrate, not exposure— so it travels in its own field and never inside the PQScore.
breakdown is the composition of the PQScore: the score is linear (100 − Σ penalty, and the max values add up to 100), so the breakdown is arithmetically exact. What we do not publish is how many points fixing something would add.
A complete scan with pqscore: null is Not verifiable: the key exchange or the certificate signature could not be observed. It carries the reason in score_unverifiable_reason (dns_unresolvable, tls_no_result, tls_timeout or tls_absent). It is not a 0 and not a failure; with a number, the reason is null. A dimension with measured: false was not measured from our vantage point and does not subtract.
GET/scans/{scan_id}/changesscans:read
What changed since the previous scan
Check comparable first. comparable: false comes with 200 and its motivo (first scan, a scan that did not conclude, a pair without an identifiable inventory): there is nothing to compare, and that is not an error.
Points (impacto). If one of the two scans has no number, impacto and delta_pqscore are null and each side carries its score_unverifiable_reason: there are no points to count. With both numbers, impacto.por_check gives what each check moved; one with measured: false on either side comes with no_medido: true and no delta, and never counts as recovered or lost. These are points between two past scans, not a promise of what fixing something would add.
The diff is per site, not per material: renewing a certificate on the same host:port is a rotation, not one asset appearing and another disappearing.
GET/scans/{scan_id}/cbomcbom:read
The CBOM in CycloneDX 1.6
curl -s https://pqscore.io/api/v1/x/scans/$SCAN_ID/cbom -H "X-API-Key: $PQSCORE_API_KEY" -o cbom.jsonContent-Type: application/vnd.cyclonedx+json; version=1.6. It validates against the official CycloneDX 1.6 schema.
- One component per material, not per observed row: the same certificate or the same
x25519on several sites is one component with severalevidence.occurrences, and itsbom-refis stable across scans. - A
bom-refstarting withasset:is an asset without a stable identity: we could not fingerprint its material and it changes every scan, so it is no use for diffing two BOMs. - Our own data goes in
properties[]prefixedpqscore:(is_pqc,is_quantum_vulnerable,qubit_tier,surface,site_key…), never inside the standard’s fields. metadata.toolscarries the methodology version the scan was scored with.
GET/findingsscans:read
Findings by check
Grouped by check across all your domains, by severity, each with its recommendation, the regulations it touches and the affected domains. Each finding’s number is what that check subtracts today, not a promise of what fixing it would gain.
lang: en | es. relationship: own (your assets) | third_party (your suppliers’). A value outside the list returns 422.
curl -s "https://pqscore.io/api/v1/x/findings?lang=en&relationship=own" -H "X-API-Key: $PQSCORE_API_KEY"GET/compliancescans:read
Compliance per framework
Aggregated over your domains by weakest link, and which domain fails which control. Same lang and relationship. Useful as evidence for an audit or compliance file: generate it on the day the file is signed and attach it.
GET/remediationscans:read
What to fix first
Actions ordered by the points they subtract today, grouped by material: one certificate on twelve sites is one action, not twelve.
GET/materialscbom:read
Unique materials
Each material with how many sites it is on (limit from 1 to 2,000, 200 by default). Assets whose material could not be fingerprinted come out in an explicit unidentified group and are never dropped. It is not a score.
GET/reportsreports:read
Your saved reports
Includes the ones in progress and the ones that failed, with their error. signed, kid and sha256 travel here so the signature can be checked without downloading the PDF. Generating a new report is done from the browser. Paginated.
GET/reports/{report_id}reports:read
The signed PDF
curl -s https://pqscore.io/api/v1/x/reports/$REPORT_ID -H "X-API-Key: $PQSCORE_API_KEY" -o report.pdfThe PDF, streamed: byte for byte the same file you download from the browser, with the same Ed25519 signature. ?redirect=1 asks for a 307 redirect to a short-lived signed URL (a curl without -L would stop at the redirect); if that is not available, it returns the PDF anyway.
409 means the report exists but is not ready yet; 404, that it does not exist. That way a cron can tell “come back in a minute” from “this does not exist”.
Pagination
/domains, /scans and /reports are paginated with limit (1 to 1,000, 100 by default) and offset:
{"total": 2451, "count": 100, "limit": 100, "offset": 0, "next_offset": 100}count is the rows on this page and total, all of them. next_offset is null when you are done. The order is total and stable, so paging never skips or repeats rows. An out-of-range limit returns 422 instead of being silently trimmed.
offset=0
while [ "$offset" != "null" ]; do
page=$(curl -s "https://pqscore.io/api/v1/x/domains?limit=200&offset=$offset" -H "X-API-Key: $PQSCORE_API_KEY")
echo "$page" | jq -r '.domains[].domain'
offset=$(echo "$page" | jq -r '.next_offset')
doneErrors
| Code | What happened |
|---|---|
| 401 | no key, or a key that does not exist, has expired, was revoked or belongs to a deleted company |
| 403 | the key is good but lacks the route’s scope |
| 404 | the resource does not exist or is not your company’s |
| 409 | the report exists but is not ready |
| 422 | a parameter out of range or with a value not in the list |
| 429 | you went over the key’s hourly limit (Retry-After) |
The 404 is deliberately ambiguous: another company’s scan or report gives 404, not 403. If the X-API-Key header arrives, the header wins: a bad key is 401 even if the same client has a valid session.
What this API does not do
- It does not write: it does not start scans, add domains or generate reports.
- It does not promise PQScore deltas: you will never see “fix this and gain 8 points”.
- It does not sign the CBOM: reports are signed; the CBOM, not yet.
- There are no webhooks: you have to ask.
- There is no company-wide CBOM in a single call: go domain by domain.