SecureSpells Partner API
Introduction
The SecureSpells Partner API lets agencies, consultancies, and platforms automate runtime privacy & compliance audits of customer websites. Audits use headless browser execution (consent simulations, network interception, tracker evidence) — not static HTML keyword scans — so you can offer legal-grade artifacts and recurring monitoring to your clients.
Authentication
Send exactly one partner credential per request:
X-API-Key— Preferred for server-to-server integrations.- Public keys (
spk_test_*,spk_live_*) identify the integration and may be scope-limited; they are safe to embed in backends only (never in mobile or browser clients). - Secret keys (
ssk_test_*,ssk_live_*) authenticate as the partner and carry your full API privileges for the matching environment. Store secrets in a vault; rotate if leaked.
Session cookie authentication is supported for dashboard tooling but machine integrations should use X-API-Key with a secret key.
Environments
| Environment | Keys | Credits |
|---|---|---|
test |
*_test_* keys (or session test flows) |
Does not consume prepaid partner credits; uses the provisioned sandbox domain slot. |
live |
*_live_* keys |
Consumes credits and allocates 30-day domain slots for production client domains. |
The environment field on POST /audits must match the key’s environment when a key is present, or the API returns 400.
Webhooks
Audits are asynchronous. A successful POST /audits returns 202 Accepted with a job_id. Your worker processes the site; you should not rely on synchronous HTTP for the final report.
- Register test and live HTTPS endpoints; configure the
callback_urlon the audit request (and/or your default webhook) to receive signedaudit.*events (audit.created,audit.started,audit.completed,audit.failed). - Poll
GET /audits/{job_id}orGET /audits/{job_id}/resultsonly as a backstop; webhooks are the primary completion channel.
Rate limiting & domain slots
- Standard rate limits apply on partner endpoints (especially read-heavy routes) to protect platform stability. Excessive traffic returns HTTP 429.
- 30-day domain slot: one credit typically monitors one client domain for 30 days on the live path; rescan and cooldown rules depend on your base subscription tier.
- Rescan cooldown:
POST /domains/{domain_slot_id}/rescanmay return 429 withnext_rescan_available_atuntil the cooldown window elapses.
For human workflows (billing, key management), use the Partner Dashboard — those routes are omitted from this document.