Developers

Built API-first.
Integrate it your way.

Widget embed, typed JavaScript SDK, REST API, signed webhooks and Slack — everything FitSignal knows, available to your stack.

Looking for the full reference? Read the docs →

01 · Widget install

Two lines. Done before your coffee.

Drop the script tag, initialize with your public key, and identify users when they log in. The widget handles eligibility, display rules and submission — nothing else to wire up. See the feature page →

INDEX.HTML
<script src="https://cdn.fitsignal.com/sdk.js"></script>
<script>
  FitSignal.init({ apiKey: "fs_pk_live_…" });
  FitSignal.identify({ email: "user@example.com" });
</script>
02 · JavaScript SDK

@fitsignal/sdk — typed, versioned, on npm.

init(options)

Boot the SDK with your public API key. Safe to call before the user is known.

identify(user)

Attach email, external ID and persona. Creates or updates the customer record.

isEligible(surveyId?)

True only if the user passes eligibility and was never surveyed before.

show(surveyId?) / hide()

Open or close the survey modal programmatically — or let triggers do it.

on(event, handler)

Subscribe to shown, dismissed, submitted for your own analytics.

reset()

Clear identity on logout so shared devices never cross streams.

03 · REST API

Everything in the dashboard, over HTTPS.

Versioned under /api/v1, authenticated with scoped keys, paginated, with rate-limit headers on every response. Full reference at /docs/api-reference.

METHODENDPOINTWHAT IT DOES
GET/v1/customersList & filter customers
POST/v1/customers/bulkUpsert up to 100 customers per request
POST/v1/surveys/:id/sendTrigger a send to specific customers
GET/v1/responsesResponses with full answer data, filterable
GET/v1/analytics/pmfCurrent score, distribution & confidence
GET/v1/analytics/trendsScore over time, weekly or monthly
04 · Webhooks

Signed events, retried like we mean it.

Every delivery is HMAC-signed and retried on failure with exponential backoff — 1 min → 5 min → 30 min → 2 h → 12 h. Endpoints that keep failing are auto-disabled and you’re told. A per-event test button and full delivery log live in Settings → Webhooks.

response.receivedpmf.threshold_crossedsurvey.completedexport.ready
PAYLOAD · response.received
{
  "event": "response.received",
  "data": {
    "pmfAnswer": "very_disappointed",
    "persona": "software-engineer",
    "surveyId": "srv_8a2…"
  },
  "signature": "sha256=9f2c41…"
}
#PRODUCT-SIGNAL
New PMF response · Acme 9:41 AM
Very disappointed · Software Engineer ★
PMF threshold crossed 🎯 Mon
Acme is above 40% for the first time — 42.1% on 96 responses.
Weekly digest Fri
12 new responses · score 52.7% (↑ 1.2) · top theme: search
05 · Slack

The signal, where your team already looks.

Paste a webhook URL in Settings → Integrations and pick your events: every response as it lands, threshold crossings worth celebrating, and a Friday digest. Webhook URLs are encrypted at rest; each notification type can be toggled independently.

Keys are free. So are your first 250 responses a month.