Authentication
The Capturia API is authenticated via Bearer key, server-side. One critical rule: never expose a key in a browser.
Key format
All keys issued since 2026-05 follow the cap_ format. The legacy format cap_ is accepted until 2027-05-03 (a dashboard banner flags legacy keys).
| Format | Regex | Example |
|---|---|---|
| Current format | cap_ | cap_ |
| Legacy format (deprecated 2027-05-03) | cap_ | cap_ |
Authorization header
All requests to / must include a Bearer header. No querystring or cookie fallback.
Authorization: Bearer cap_live_<your-key>Missing header
No Authorization header in the request. Status: 401 missing_.
Invalid key
Unknown key, malformed, revoked, or unrecognized hash. Generic status 401 invalid_ (so no part of the key leaks which is at fault). The key's state, at the top of its page in your dashboard, tells whether it was revoked.
Expired key
The key passed its expiration date. Status 401 expired_. The old key of a roll expires 12 hours after it. Generate a new key via the dashboard.
Scopes and presets
A key holds scopes (technical permissions). For convenience, the UI offers 5 presets grouping scopes by use case.
| Preset | Use case | Included scopes |
|---|---|---|
| Lead capture | Push leads from an external funnel (Make, Zapier, code) | leads:capture |
| Read only | BI, reporting, external dashboards | *:read |
| Read + write | External CRM sync (HubSpot, Salesforce) | *:read *:write leads:capture events:ingest conversations:import |
| Full integration | No-code platforms, native integrations | * |
| Custom | Minimal permissions, tailored selection | free |
Individual scopes
contacts:read: Read contactscontacts:write: Create/update contactscontacts:delete: Permanently delete contacts (only someone allowed to delete prospects can grant it)pipeline:read: Read pipelinepipeline:write: Update pipelineconversations:read: Read conversationsconversations:import: Import conversations held elsewhere, analyzed by the AI (recording notice attested by the account's management)bookings:read: Read appointmentsbookings:write: Book/cancel appointmentsquotes:read: Read quotesquotes:write: Create/update quotespayments:read: Read payments, receipts and credit notes (only someone who can see the account's transactions can grant it)tags:read: Read tagstags:write: Create/update tagsautomations:read: Read automationsautomations:trigger: Trigger automationsemail:send: Send emailemail:read: Read email conversationswebhooks:manage: Manage webhooksleads:capture: Capture external leads (CASL gated)events:ingest: Push inbound eventscampaigns:launch: SMS follow-ups: enroll or remove a contact; launch a campaign through an AI assistant (two-step confirmation)
CASL / Law 25 terms
The leads:capture scope is gated behind an attestation you accept when creating the key, or in the key's Permissions tab when you add it to an existing key. This attestation formally commits you: every lead pushed via this endpoint has given explicit consent to receive commercial SMS messages. Capturia keeps a timestamped record (IP, browser, version). When a new version of the terms takes effect, lead capture answers 403 terms_ until you accept it in that same tab; the key keeps its secret and your integration needs no change. A purchase that sends its order's text-message consent (POST / with sms_ set to true) attests it the same way: it requires this scope and up-to-date terms, otherwise 403 insufficient_ or 403 terms_, and nothing is recorded.
Plan and features
Every request is also validated against the account's plan. If access is not included in your plan, the request is rejected with 403 feature_ — even if the key is valid and holds the required scope. The public API and the AI assistant connector are two distinct accesses, each validated against its own plan feature (the error's details. field names the missing one). The rejection comes from the plan, not the key: generating a new key or changing its scopes won't help. Contact your Capturia advisor to talk it over. A feature still being launched (details. = online_, for example) is rejected with the same code until Capturia opens it for the account; the message says so, and your Capturia advisor is the one who has it opened.
Suspended account
When the Capturia team suspends or revokes access to an account, every request made with its keys is rejected with 403 account_, whatever the key and its scopes. The keys are not revoked: they work again as soon as the suspension is lifted, with nothing to change on your side. Generating a new key won't help. Contact the Capturia team to learn more.
Brute force and invalid keys
10 consecutive attempts with an invalid key from the same IP in 5 minutes → IP block for 5 minutes (429 too_ with Retry-). This policy protects keys against enumeration.
Security best practices
Never in the frontend. The API is server-to-server. A key exposed in a browser is an immediate leak.
Store as an environment variable (never committed to the repo).
One key per integration — don't use the same key for Zapier and your custom code. If a key leaks, you can revoke one integration without breaking others.
Regular rotation — use the Roll flow to renew without interruption (12h overlap).
No public CORS — you cannot call the API from a browser, this is intentional.