Security headers API
The security headers API gives a site’s grade, every test behind it and the lines that fix each failing test for the server the site runs on. It grades exactly as the free security headers checker does, by Mozilla HTTP Observatory’s published scoring, because both use the same code.
curl -s "https://api.xovris.ai/v1/tools/security-headers?host=xovris.ai" \ -H "authorization: Bearer $XOVRIS_TOKEN"Your key and your allowance
Section titled “Your key and your allowance”Any Xovris API token is the key, including one from a Free workspace. A Free workspace checks 100 sites a day; any paid plan checks 2,000. Every answer carries
RateLimit-Limit, RateLimit-Remaining and RateLimit-Reset. Past the day’s checks the answer is 429 with
Retry-After set to the seconds until midnight UTC, and a sentence saying when checks start again.
A check the scanner left unfinished is given back, never counted. A private, local or reserved name is refused with
400 before anything is counted.
What comes back
Section titled “What comes back”{ "host": "shop.northmerefreight.com", "grade": "B", "score": 70, "scannedAt": "2026-10-02T09:14:00.000Z", "observatoryGrade": "B", "tests": [ { "name": "content-security-policy", "title": "Content Security Policy (CSP)", "pass": false, "result": "csp-not-implemented", "scoreModifier": -25, "link": "https://developer.mozilla.org/en-US/observatory/docs/tests_and_scoring" } ], "fix": { "server": "nginx", "failing": ["content-security-policy"], "lines": "add_header Content-Security-Policy \"default-src 'self'; ...\" always;" }}grade and score are worked out from the tests; observatoryGrade is the grade Observatory itself gave the same
site. fix.server is the server the site most likely runs on, read from its Server header; fix.lines are
the lines for that server.
Use it from CI
Section titled “Use it from CI”This workflow grades the live site after every successful deploy and every morning, prints the grade, and fails the job with the exact lines to add when the score falls below the floor you set – and where the site runs behind Cloudflare, Xovris sets those headers at the edge itself once your DNS is connected, only where the site sends none of its own. Xovris also makes the token and writes it as the repository secret XOVRIS_TOKEN itself through the Xovris GitHub App, sealed and never shown. Do it yourself instead: store your token as the repository secret XOVRIS_TOKEN and set SITE to your domain.
name: Security headerson: deployment_status: schedule: - cron: '0 6 * * *'jobs: grade: if: ${{ github.event_name == 'schedule' || github.event.deployment_status.state == 'success' }} runs-on: ubuntu-latest steps: - name: Grade the live site's headers env: XOVRIS_TOKEN: ${{ secrets.XOVRIS_TOKEN }} SITE: yourdomain.com MIN_SCORE: '70' run: | r=$(curl -sf "https://api.xovris.ai/v1/tools/security-headers?host=$SITE" -H "authorization: Bearer $XOVRIS_TOKEN") echo "$r" | jq -r '"Grade \(.grade) (\(.score)) for \(.host)"' if [ "$(echo "$r" | jq '.score')" -lt "$MIN_SCORE" ]; then echo "$r" | jq -r '"Add these lines for \(.fix.server):\n\(.fix.lines)"' exit 1 fiMoving from the securityheaders.com API
Section titled “Moving from the securityheaders.com API”Three things change: the address, the key’s header and where the grade is in the answer. The q parameter is accepted
as it is, so a script that builds ?q= keeps working.
| securityheaders.com API | Xovris |
|---|---|
https://api.securityheaders.com/?q=… |
/v1/tools/security-headers?q=… (or ?host=…) |
x-api-key: <key> |
authorization: Bearer <Xovris API token> |
summary.grade |
grade, with score beside it |
hide=on, followRedirects=on |
not used: drop them |
Before:
curl -s "https://api.securityheaders.com/?q=yourdomain.com&hide=on&followRedirects=on" \ -H "x-api-key: $SECURITYHEADERS_KEY" | jq -r .summary.gradeAfter:
curl -s "https://api.xovris.ai/v1/tools/security-headers?host=xovris.ai" \ -H "authorization: Bearer $XOVRIS_TOKEN" | jq -r .gradeWhat you gain: every test with its score and its link, the lines that fix each failing one for your server, and a key you already hold on every plan.
Your data is never used to train our AI. How your data is kept
A problem is called fixed only once it works again. How each fix is checked
XOVRIS LTD, registered in England and Wales, company number 17499910. Registered office: 66 Paul Street, London EC2A 4NA.