Capturia measures its ads and site traffic with the Meta pixel and Google Analytics. You can decline at any time. Learn more

FR

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_live_<64 hex> format. The legacy format cap_<64 hex> is accepted until 2027-05-03 (a dashboard banner flags legacy keys).

FormatRegexExample
Current formatcap_live_[0-9a-f]{64}cap_live_a1b2c3d4e5f6...0123456789abcdef
Legacy format (deprecated 2027-05-03)cap_[0-9a-f]{64}cap_a1b2c3d4e5f6...0123456789abcdef

Authorization header

All requests to /v1/* 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_api_key.

Invalid key

Unknown key, malformed, revoked, or unrecognized hash. Generic status 401 invalid_api_key (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_api_key. 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.

PresetUse caseIncluded scopes
Lead capturePush leads from an external funnel (Make, Zapier, code)leads:capture
Read onlyBI, reporting, external dashboards*:read
Read + writeExternal CRM sync (HubSpot, Salesforce)*:read *:write leads:capture events:ingest conversations:import
Full integrationNo-code platforms, native integrations*
CustomMinimal permissions, tailored selectionfree selection

Individual scopes

  • contacts:read: Read contacts
  • contacts:write: Create/update contacts
  • contacts:delete: Permanently delete contacts (only someone allowed to delete prospects can grant it)
  • pipeline:read: Read pipeline
  • pipeline:write: Update pipeline
  • conversations:read: Read conversations
  • conversations:import: Import conversations held elsewhere, analyzed by the AI (recording notice attested by the account's management)
  • bookings:read: Read appointments
  • bookings:write: Book/cancel appointments
  • quotes:read: Read quotes
  • quotes:write: Create/update quotes
  • payments:read: Read payments, receipts and credit notes (only someone who can see the account's transactions can grant it)
  • tags:read: Read tags
  • tags:write: Create/update tags
  • automations:read: Read automations
  • automations:trigger: Trigger automations
  • email:send: Send email
  • email:read: Read email conversations
  • webhooks:manage: Manage webhooks
  • leads:capture: Capture external leads (CASL gated)
  • events:ingest: Push inbound events
  • campaigns: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_acceptance_required 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 /v1/purchases with sms_consent set to true) attests it the same way: it requires this scope and up-to-date terms, otherwise 403 insufficient_scope or 403 terms_acceptance_required, 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_not_available — 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.feature 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.feature = online_sales, 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_suspended, 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_many_attempts with Retry-After: 300). 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.