How Webhooks Work
Provider sends data
When a user syncs their device (e.g., Garmin watch), the provider sends a webhook to Open Wearables with new data.
Open Wearables processes data
Open Wearables receives the webhook, validates it, fetches the full data, and stores it in the database.
Your webhook is triggered
Open Wearables forwards a notification to your configured webhook endpoint with details about what data was updated.
Supported Provider Webhooks
Garmin
Garmin webhooks are automatically configured when you connect a user. No additional setup required.
- Activities (with metadata)
- Sleep sessions
- Daily summaries
- Heart rate variability
- Stress details
- Body composition
- Blood pressure
- And 10+ other data types
- Same data types as PUSH
- Used for larger payloads
- User updates data sharing permissions on Garmin Connect
- Connection scope is automatically updated
- User removes app from Garmin Connect
- Connection is marked as revoked
Strava
Activity Webhooks:- New activities created
- Activities updated
- Activities deleted
Whoop
Real-time Updates:- Recovery scores
- Sleep analysis
- Strain measurements
Webhook Payload Format
When Open Wearables forwards a webhook to your application, it sends:Event type (currently only
data.updated)When the webhook was generated (ISO 8601)
Open Wearables user ID
Source provider:
garmin, whoop, strava, etc.Types of data that were updated:
workout, sleep, daily_summary, heart_rate, etc.Additional context about the update (varies by provider)
Configuring Your Webhook Endpoint
Register your endpoint
Configure your webhook URL in the Open Wearables dashboard:
- Go to Settings → Webhooks
- Enter your endpoint URL (must be HTTPS)
- Select which events to receive
- Save your webhook configuration
Webhook Security
Signature Verification
Each webhook includes anX-OpenWearables-Signature header with an HMAC signature. Verify this to ensure the webhook came from Open Wearables:
Best Practices
- Use HTTPS: Webhook URLs must use HTTPS in production
- Verify signatures: Always validate the
X-OpenWearables-Signatureheader - Respond quickly: Return 200 status within 5 seconds
- Process asynchronously: Queue webhook processing to avoid timeouts
- Handle idempotency: Same data may trigger multiple webhooks
- Log failures: Keep audit logs for debugging
Webhook Response Requirements
Your endpoint must respond with a 2xx status code within 5 seconds. If Open Wearables doesn’t receive a successful response, it will retry with exponential backoff.
Retry Policy
If your endpoint fails or times out:- Immediate retry after 1 second
- Second retry after 5 seconds
- Third retry after 25 seconds
- Fourth retry after 2 minutes
- Fifth retry after 10 minutes
- Disabled after 5 consecutive failures
Processing Webhook Data
After receiving a webhook, fetch the new data:Webhook Events Reference
| Event | Description | Data Types |
|---|---|---|
data.updated | New data received from provider | workout, sleep, daily_summary, heart_rate, body_composition |
connection.revoked | User disconnected wearable | N/A |
connection.error | Provider sync error | N/A |
Testing Webhooks
Local Development
Use a tool like ngrok to expose your local server:Testing Tools
- Dashboard: Use “Send Test Webhook” button
- curl: Manually send test payloads
- Postman: Create webhook collections for testing
Monitoring Webhooks
The Open Wearables dashboard provides:- Delivery logs: See all webhook attempts and responses
- Failure alerts: Get notified when webhooks fail
- Retry history: View retry attempts and timing
- Performance metrics: Track webhook latency and success rates
Troubleshooting
Webhooks not received
- Verify your endpoint URL is correct and accessible from the internet
- Check that your server is responding within 5 seconds
- Ensure your endpoint accepts POST requests
- Verify SSL certificate is valid
Duplicate webhooks
- Implement idempotency using the
trace_idin metadata - Store processed webhook IDs to avoid duplicate processing
Missing data in webhook
- Webhooks are notifications, not full data payloads
- Always query the API to get the actual data
- Account for small delays between webhook and data availability
Next Steps
Authentication
Learn about API keys and SDK tokens
API Reference
Complete API endpoint documentation
