Developer Documentation · REST API v1 & CI/CD

NormStack API, GitHub Action & Webhook Reference

Integrate deterministic 4-pillar compliance auditing into CI/CD pipelines, Slack alerts, agency client portals, and internal security tooling in under 2 minutes.

1. Authentication & Rate Limits

Public scanning endpoints work without authentication (rate-limited per IP). Pass your workspace API key in the X-API-Key header to attribute scans to your account and unlock higher limits (up to 10 pages per crawl on paid tiers).

X-API-Key: nsk_live_your_workspace_key

2. Single-URL Instant Compliance Audit

POST https://normstack.io/api/v1/scan — Returns overall score (0–100), Grade (A+ to F), pillar scores, regulatory citations, remediation code snippets, live SVG badge URL, and shareable report URL. Pass "fresh": true to bypass the 5-minute edge deduplication cache.

curl -X POST https://normstack.io/api/v1/scan \
  -H "Content-Type: application/json" \
  -H "X-API-Key: nsk_live_..." \
  -d '{"url":"https://yourdomain.com","fresh":true}'

3. Multi-Page Site-Wide Crawl Audit

POST https://normstack.io/api/v1/crawl — Automatically discovers key routes via sitemap.xml and internal navigation (/pricing, /checkout, /login, /privacy), audits up to 10 pages concurrently, and deduplicates systemic cross-page violations.

curl -X POST https://normstack.io/api/v1/crawl \
  -H "Content-Type: application/json" \
  -H "X-API-Key: nsk_live_..." \
  -d '{"url":"https://yourdomain.com","maxPages":5}'

4. Audit Evidence Ledger JSON Export

GET https://normstack.io/api/v1/reports/:scanId — Returns the immutable JSON compliance ledger and regression diff suitable for VPAT procurement packages, SOC 2 auditors, or regulatory documentation.

5. GitHub Actions PR Compliance Gate

Fail any Pull Request automatically when a staging or preview URL drops below your compliance threshold or introduces Critical WCAG/EAA/EU AI Act violations.

name: NormStack Compliance Gate
on: [pull_request]
jobs:
  compliance:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Audit Preview Deployment
        run: |
          node cli/normstack-audit.mjs \
            --url https://preview.yourdomain.com \
            --api-url https://normstack.io \
            --min-score 85 \
            --fail-on critical

6. Slack / Discord / Custom Webhook Alert Payload

Whenever scheduled monitoring detects a score drop or new Critical/High violation, NormStack dispatches an HTTP POST JSON payload compatible with Slack Incoming Webhooks, Discord Webhooks, and custom automation endpoints:

{
  "event": "compliance.alert",
  "text": "Compliance Regression Detected on yourdomain.com (92 -> 74)",
  "site": { "id": "sit_...", "domain": "yourdomain.com", "url": "https://yourdomain.com" },
  "scan": { "id": "scn_...", "score": 74, "grade": "C", "critical": 1, "high": 2, "reportUrl": "https://normstack.io/report/scn_..." }
}

7. Live Embeddable Verification Badge (SVG)

Embed real-time compliance status in your website footer, Trust Center, or GitHub README:

NormStack Live Verification Badge
<a href="https://normstack.io/site/yourdomain.com">
  <img src="https://normstack.io/api/badge/yourdomain.com.svg" alt="NormStack Verified Compliance" height="28">
</a>