Skip to main content

Overview

Outgoing webhooks let Open Wearables push events to your backend in real time, so you don’t need to poll for new data. Each time a workout is saved, sleep is recorded, or a timeseries batch is ingested, Open Wearables fires an HTTP POST request to every registered endpoint that matches the event. Webhooks are delivered via Svix, which handles retries, signature signing, and delivery history.
Self-hosting: outgoing webhooks are disabled by default. To emit events, set OUTGOING_WEBHOOKS_ENABLED=true in the backend .env and restart — no command-line flags needed, plain docker compose up. The svix-server container runs either way, and the app runs fine when it is absent (e.g. a deployment without webhooks). On managed Postgres (AWS RDS / Railway), the app’s database user must be allowed to create databases, or create a svix database up front — Svix keeps its schema there.

Things you can do

Trigger downstream processing when a workout is synced, update your UI in real time when sleep data arrives, scope an endpoint to a single user’s events, or verify payloads are genuinely from Open Wearables.

Requirements

A developer account and a Bearer token (from POST /api/v1/auth/login), plus a publicly reachable HTTPS URL for your endpoint.

Quickstart

1

Register an endpoint

Send the URL your server is listening on. This returns an endpoint object you’ll use in subsequent calls.
Response:
Save the id — you’ll need it to fetch the signing secret and inspect delivery attempts.
2

Get the signing secret

Retrieve the HMAC signing key for your endpoint to verify incoming payloads. In the developer portal, open the endpoint on the Webhooks page and use Reveal or Copy next to Signing secret. Through the API:
Response:
Store this secret securely on your server — you’ll use it to verify every incoming request.
3

Handle incoming events

Open Wearables sends a POST to your URL with a JSON body and three signature headers. Verify the signature before processing.
Install the Svix library: pip install svix / npm install svix. The Webhook.verify() call handles timestamp tolerance (rejects messages older than 5 minutes) and all signature edge cases automatically.
4

Send a test event

Trigger a realistic example payload to your endpoint to confirm end-to-end delivery before you go live.
Check delivery status at any time:

Event Types

All events follow the resource.action naming convention. Use GET /api/v1/webhooks/event-types to retrieve this list programmatically.

Session Events

Fired once when a complete session is saved or merged.

Timeseries Events

Fired per ingestion batch — one event per distinct (user, provider, series_type) combination in a sync run. Each event carries the full samples array, so consumers can store data directly from the webhook without issuing follow-up API calls. Each series type also has its own event, series.<series_type>.created, carrying only that series’ samples.
Two series changed in this release, and their events with them:Self-hosting with endpoints that filter on the old names: run scripts/data_migrations/rename_series_webhook_events.py --phase=add from the new image before it takes traffic, so those endpoints also subscribe to the new names, and --phase=remove once the deploy is done. An endpoint whose filter names only old events is left as it is, as removing them would leave it with no filter and every event: the script lists it, and its filter needs the new names set by hand.

Extension Events

Installed extensions can add event types of their own. Their names start with the extension’s name (for example my_extension.thing.created), they are listed by GET /api/v1/webhooks/event-types after the core’s, and you subscribe and filter by them like any other type. Their payloads are documented by each extension; a user’s event carries data.user_id, as the core’s do. Their types are registered with Svix when the API starts, like the core’s; if Svix was down then (the log says so), restart the API before filtering by a new extension’s types.

Payload Reference

Every payload envelope has type (the event name as a string) and data.

connection.created

connection.revoked

reason is a short cause:

workout.created

Fields like calories_kcal, distance_meters, and heart-rate fields are null when the provider did not report them.

sleep.created

sleep_stage_intervals below is shown abbreviated — three intervals out of a full night — to keep the example short. A real payload’s array covers the entire session end-to-end (typically 15-60+ merged intervals, depending on how fragmented the sleep was).
sleep_duration_seconds is the time actually asleep (excludes awake periods within the session); duration_seconds is the session’s span from start_time to end_time, awake time included. Both source.source (the third-party writer app, e.g. HealthKit/Health Connect) and sleep_stage_intervals are null/omitted when the provider or ingestion path did not report them. Likewise, a stage’s minutes in stages are null when the source did not measure that stage, and stages itself is null when no stage is reported. Unlike every other field in this example, sleep_stage_intervals above is not shown in full — see the note before the code block.
For providers that don’t flag naps, is_nap is derived by Open Wearables and can change after the webhook (see Data types). A change sends no webhook, so read the session again for the current value. Mobile SDK and Sensor Bio sessions are announced with is_nap: false.

meal.created

title and meal_type come from the provider’s food-log entry (or HealthKit/Health Connect correlation metadata) and are null when not reported. macros is null when none of its four fields were recorded for the meal; each of calories_kcal and water_ml is null independently when that nutrient wasn’t reported. nutrients holds every nutrient recorded for the meal, keyed by series type, the same as in GET /events/meals.

menstrual_cycle.created

pregnancy_snapshot is populated (as a list with one entry) when the user is tracking a pregnancy. Garmin reuses the same summary ID for daily cycle updates — Open Wearables deduplicates by external_id, so the event fires only when a new record is first inserted.

activity.created

Timeseries events (all share the same shape)

Each timeseries event carries the full sample array so your backend can act on the data immediately — no follow-up API call needed.
Each entry in samples matches the schema returned by GET /api/v1/users/{user_id}/timeseries, so consumers work with a single schema regardless of whether data comes from a webhook or the pull API.
Series events carry readings only. A provider’s day value (Garmin’s daily step total, Oura’s nightly SpO2, a readiness temperature) is not a sample any more and is not sent as one: read it from GET /api/v1/users/{user_id}/timeseries?resolution=1day, where every source’s days are, the provider’s own value where it sent one. Day values stored before this release are copied there by a backfill that runs after the upgrade; until it has reached them, they are still in raw. is_daily_total is therefore false or null on every sample a webhook carries; sum the samples of an additive series (steps, energy, distance, flights) as they come.
window_seconds is the width of a sample reported over a window rather than at an instant: a Garmin 15-minute epoch is 900, a HealthKit record from 08:00 to 08:05 is 300. null means an instant reading.
Large batches (exceeding 2 500 samples) are automatically split into consecutive chunk events to stay within Svix’s 1 MB payload limit. Each chunk event includes chunk_index (0-based) and total_chunks so you can detect and reassemble split deliveries. The sample_count field always reflects the total number of samples across all chunks.
The pull API (GET /api/v1/users/{user_id}/timeseries) remains available for backfill, reconciliation, or recovery after missed deliveries.

Filtering Events

Filter by event type

Pass filter_types when creating or updating an endpoint to receive only the events you care about.
Omit the field entirely to receive all event types. To later remove the event type filter from an existing endpoint (receive all event types again), send a PATCH with "filter_types": []:
The empty list is what clears the filter. Sending "filter_types": null — or leaving the field out — keeps the current filter, so a client that serialises unset fields as null will not wipe an endpoint’s event types by accident. Note that user_id works the other way round: there null is what removes the filter.

Filter by user

Pass user_id to scope an endpoint to events for a single user. All other users’ events are silently dropped before delivery.
To later remove the user filter (receive all users again), send a PATCH with "user_id": null:
Combine both filters to receive e.g. only workout.created events for a specific user — pass both filter_types and user_id in the same request.

Signature Verification

Every delivery includes three headers that let you confirm the payload was sent by Open Wearables and hasn’t been tampered with:
Install: pip install svix
Always verify signatures before processing the payload. This prevents replay attacks and ensures events cannot be forged by third parties.

Idempotency

The svix-id header is stable across retries — the same logical event always carries the same ID. This holds for extension events too: each gets its ID when it is queued, so a send that has to be repeated does not reach you again under a new one, and no event is dropped as a repeat of a different one. Store received IDs and skip duplicates to make your handler idempotent. An extension event’s event ID is <event_type>-<key>, where the key is the one the extension gave the event. When that key has characters other than letters, digits, -, _ and ., or the ID would be longer than 256 characters, the event ID is the SHA-256 hex digest of <event_type>-<key> instead. An event the extension sends again with the same key is not delivered again; an event without a key gets a random ID.

Managing Endpoints

List all endpoints

Update an endpoint

All fields are optional — send only what you want to change.

Delete an endpoint

Returns 204 No Content on success.

Delivery and Retries

Open Wearables (via Svix) retries failed deliveries automatically with exponential back-off. A delivery is considered failed when your endpoint returns a non-2xx status code or does not respond within the timeout.
Svix retries each failed message at increasing intervals. If all retries are exhausted the message is marked as failed in delivery history — you can inspect it and manually trigger a resend from the Svix dashboard, as long as its payload is still retained (see below).
Svix stores each message payload for 7 days by default, then deletes it. The message itself stays in delivery history, without the payload. Self-hosters can change this with OUTGOING_WEBHOOK_PAYLOAD_RETENTION_DAYS in the backend .env (5-90 days). The setting applies to messages sent after the change.Keep the retention above the automatic retry window, which is about 28 hours and can stretch to roughly 3 days when your endpoint returns Retry-After. Once a payload is gone, Svix drops any pending retry without recording an attempt, and the message can no longer be resent.
  • Respond with a 2xx status code as quickly as possible (before doing any heavy processing).
  • Offload slow work to a background queue — process the event asynchronously.
  • Return 2xx even for events you choose to ignore (otherwise they’ll be retried).
Data ingestion is never blocked by webhook failures — if delivery infrastructure is temporarily unavailable, data continues to be stored and events are queued for retry.
When you delete a user (DELETE /api/v1/users/{user_id}), Open Wearables deletes the payloads of all their webhook messages from Svix in a background task, about a minute after the user is removed. The messages stay in delivery history without the payload, and their event IDs can still contain the user ID.The cleanup is best-effort. The one-minute delay lets webhooks already queued for that user reach Svix first, so they are cleaned up too, but a webhook queued for longer than that (for example when the worker is backlogged) is not covered. If the cleanup task cannot be queued at all, the user is still deleted and a warning is logged. In both cases the remaining payloads are removed when their payload retention period ends.

Debugging

View delivery history for an endpoint

Each attempt includes the HTTP status code returned by your server and the timestamp of the attempt.

View all sent messages

Send a test event

Send a realistic example payload for any event type to an endpoint without waiting for real data (an extension’s type gets {"type": ..., "data": {}}):
Omit the body to default to workout.created.