Skip to content
Docs/API

APIs

Sapient Works has two public APIs. They’re deliberately shaped for different callers, and each one rejects the other’s key.

Bug reporting API →

Drop the @sapient/browser SDK into your site and runtime errors, unhandled rejections, and user-submitted bug reports and feature requests flow to your support seat. Errors are fingerprinted and grouped, so a flood becomes one issue rather than ten thousand.

  • Authenticated with a publishable key (dfpk_…) that’s safe to ship in client code
  • Bound to the website origins you list
  • POST /ingest/v1/events, /ingest/v1/feature-requests

Contacts API →

Push people into your factory’s CRM from a signup handler, a lead form, or a nightly sync. Upsert-by-email means retries are free and never create duplicates.

  • Authenticated with a secret key (dfsk_…) that belongs on your server only
  • Sends no CORS headers and refuses browser calls outright
  • POST /api/v1/contacts, GET /api/v1/contacts/{id}, GET /api/v1/contacts?email=
  • API keys — which key you need, how to store it, how to revoke it.
  • Errors and limits — the error shape, rate limits, and how to retry without making things worse.

Base URL for both: https://api.sapient.works.