Spanr API Reference
JSON over HTTPS. Org-scoped. Auth via Bearer tokens — JWT for dashboard sessions, API keys for server integrations. Every endpoint below is rate-limited per token.
Base URL
Getting started
- Sign up for a Spanr account and start a 14-day trial.
- Upgrade to the Company plan to unlock API access.
- Mint an API key under Settings → API Access. You'll see the full secret once — store it in your secret manager.
- Send the key on every request as
Authorization: Bearer ak_live_….
curl -X POST https://api.spanr.uk/auth/login \
-H "Content-Type: application/json" \
-d '{"email":"you@example.com","password":"…"}'Authentication
Every endpoint (except /auth/*) requires a Bearer token. JWT access tokens expire after 15 minutes — refresh with POST /auth/refresh. API keys do not expire (revoke from settings).
Rate limits
60 req/min per API key for read endpoints. 10 req/min for AI endpoints. On 429, the response includes Retry-After in seconds. Burst is allowed within short windows.
curl -X POST https://api.spanr.uk/quotes/generate \
-H "Authorization: Bearer ak_live_…" \
-H "Content-Type: application/json" \
-d '{"description":"Replace 16-way consumer unit","tradeType":"ELECTRICAL"}'Endpoints
Authentication
JWT for the dashboard, API keys for server-to-server.
/auth/register/auth/login/auth/refresh/auth/meJobs
Create, update, and progress jobs through the lifecycle.
/jobs/jobs/jobs/:id/jobs/:id/jobs/:id/status/jobs/:id/notesQuotes
AI-powered quote generation with manual override.
/quotes/generate/quotes/generate/stream/quotes/quotes/quotes/:id/quotes/:id/send/quotes/:id/convertInvoices
Stripe payment links + branded PDFs.
/invoices/invoices/invoices/:id/invoices/:id/invoices/:id/sendCustomers
Org-scoped customer CRM.
/customers/customers/customers/:id/customers/:idCertificates
EICRs, MWCs, CP12s, and gate service records — all with branded PDFs.
/certificates/electrical/eicrs/:id/pdf/electrical/mwcs/:id/pdf/gas/cp12s/:id/pdf/gate/service-records/:id/pdfScheduling
Smart AI route suggestions — falls back to deterministic ordering when AI is offline.
/ai/smart-schedule/jobs?scheduledFrom&scheduledToAI
Job summaries, customer snapshots, follow-up drafts, materials suggestions.
/ai/health/ai/features/ai/job-summary/ai/customer-summary/ai/follow-up/ai/materials/ai/transcribeAPI keys
Mint and revoke programmatic access tokens (Company plan).
/api-keys/api-keys/api-keys/:idWebhooks (Stripe)
Stripe events update subscription state in real time.
/webhooks/stripeWebhooks
Stripe events drive subscription state changes. Stripe webhooks must be configured with the live signing secret (we verify every payload).
# Stripe sends signed events to this endpoint.
# Configure under Stripe Dashboard → Developers → Webhooks
# Endpoint URL: https://api.spanr.uk/webhooks/stripe
# Select events:
# - customer.subscription.created
# - customer.subscription.updated
# - customer.subscription.deleted
# - invoice.payment_failedSDKs (coming soon)
Native TypeScript and Python clients ship Q3 2026. Until then, the JSON HTTP API is stable — every successful response is parseable, errors return { statusCode, error, message }.
Changelog
Streaming quotes
Added /quotes/generate/stream (SSE) — progressive line items + confidence score.
Voice-to-quote
Added /ai/transcribe — multipart Whisper transcription with trade inference.
Job & customer AI summaries
New /ai/job-summary, /ai/customer-summary, /ai/follow-up, /ai/materials.
Plan-gated features
/ai/features endpoint returns per-plan availability for every AI feature.
Building something on Spanr?
Email the API team — we love seeing what people build.