When a user's data changes for a subscribed data type, the Google Health API sends an HTTPS POST request to the subscriber endpoint URL.
To register a subscriber endpoint, check supported data types, and configure automatic or manual user subscriptions, see Webhook subscriptions.
Notification format
The notification payload contains details about the data change, including the
user ID, data type, and time intervals, which you can use to query the updated
data. Push notification request bodies are always delivered as a JSON array
([...]) containing 1 to 99 notification objects, even when a delivery
contains a single notification.
When a webhook notification is triggered, the Google Health API sends an HTTPS POST request to your subscriber endpoint with the following format:
Upsert (time-series data)
POST https://your-endpoint-uri
Authorization: Bearer example-secret-token
GOOGLE-HEALTH-API-SIGNATURE: signature-value
Content-Type: application/json
[
{
"data": {
"version": "1",
"clientProvidedSubscriptionName": "subscription-name",
"healthUserId": "health-user-id",
"operation": "UPSERT",
"dataType": "steps",
"intervals": [
{
"physicalTimeInterval": {
"startTime": "2026-03-08T01:29:00Z",
"endTime": "2026-03-08T01:34:00Z"
},
"civilDateTimeInterval": {
"startDateTime": {
"date": {
"year": 2026,
"month": 3,
"day": 7
},
"time": {
"hours": 17,
"minutes": 29
}
},
"endDateTime": {
"date": {
"year": 2026,
"month": 3,
"day": 7
},
"time": {
"hours": 17,
"minutes": 34
}
}
},
"civilIso8601TimeInterval": {
"startTime": "2026-03-07T17:29:00",
"endTime": "2026-03-07T17:34:00"
}
}
]
}
}
]Delete (time-series data)
POST https://your-endpoint-uri
Authorization: Bearer example-secret-token
GOOGLE-HEALTH-API-SIGNATURE: signature-value
Content-Type: application/json
[
{
"data": {
"version": "1",
"clientProvidedSubscriptionName": "subscription-name",
"healthUserId": "health-user-id",
"operation": "DELETE",
"dataType": "steps",
"intervals": [
{
"physicalTimeInterval": {
"startTime": "2026-08-12T12:00:00Z",
"endTime": "2026-08-12T12:30:00Z"
},
"civilIso8601TimeInterval": {
"startTime": "2026-08-12T12:00:00",
"endTime": "2026-08-12T12:30:00"
}
}
]
}
}
]Delete (identifiable data)
POST https://your-endpoint-uri
Authorization: Bearer example-secret-token
GOOGLE-HEALTH-API-SIGNATURE: signature-value
Content-Type: application/json
[
{
"data": {
"version": "1",
"clientProvidedSubscriptionName": "subscription-name",
"healthUserId": "health-user-id",
"operation": "DELETE",
"dataType": "sleep",
"intervals": [
{
"physicalTimeInterval": {
"startTime": "2026-08-12T22:00:00Z",
"endTime": "2026-08-13T06:00:00Z"
},
"civilIso8601TimeInterval": {
"startTime": "2026-08-12T22:00:00",
"endTime": "2026-08-13T06:00:00"
}
}
],
"recordId": "9875412"
}
}
]Batch (multiple users and data types)
POST https://your-endpoint-uri
Authorization: Bearer example-secret-token
GOOGLE-HEALTH-API-SIGNATURE: signature-value
Content-Type: application/json
[
{
"data": {
"version": "1",
"clientProvidedSubscriptionName": "auto-project-number-subscriber-id-WEBHOOK_DATA_TYPE_STEPS",
"healthUserId": "health-user-id-1",
"operation": "UPSERT",
"dataType": "steps",
"intervals": [
{
"physicalTimeInterval": {
"startTime": "2026-03-08T01:29:00Z",
"endTime": "2026-03-08T01:34:00Z"
},
"civilDateTimeInterval": {
"startDateTime": {
"date": {
"year": 2026,
"month": 3,
"day": 7
},
"time": {
"hours": 17,
"minutes": 29
}
},
"endDateTime": {
"date": {
"year": 2026,
"month": 3,
"day": 7
},
"time": {
"hours": 17,
"minutes": 34
}
}
},
"civilIso8601TimeInterval": {
"startTime": "2026-03-07T17:29:00",
"endTime": "2026-03-07T17:34:00"
}
}
]
}
},
{
"data": {
"version": "1",
"clientProvidedSubscriptionName": "auto-project-number-subscriber-id-WEBHOOK_DATA_TYPE_WEIGHT",
"healthUserId": "health-user-id-1",
"operation": "UPSERT",
"dataType": "weight",
"intervals": [
{
"physicalTimeInterval": {
"startTime": "2026-03-07T15:14:00Z",
"endTime": "2026-03-07T15:16:00Z"
},
"civilDateTimeInterval": {
"startDateTime": {
"date": {
"year": 2026,
"month": 3,
"day": 7
},
"time": {
"hours": 7,
"minutes": 14
}
},
"endDateTime": {
"date": {
"year": 2026,
"month": 3,
"day": 7
},
"time": {
"hours": 7,
"minutes": 16
}
}
},
"civilIso8601TimeInterval": {
"startTime": "2026-03-07T07:14:00",
"endTime": "2026-03-07T07:16:00"
}
}
]
}
},
{
"data": {
"version": "1",
"clientProvidedSubscriptionName": "auto-project-number-subscriber-id-WEBHOOK_DATA_TYPE_STEPS",
"healthUserId": "health-user-id-2",
"operation": "UPSERT",
"dataType": "steps",
"intervals": [
{
"civilDateTimeInterval": {
"startDateTime": {
"date": {
"year": 2026,
"month": 8,
"day": 20
},
"time": {
"hours": 0,
"minutes": 0
}
},
"endDateTime": {
"date": {
"year": 2026,
"month": 8,
"day": 21
},
"time": {
"hours": 0,
"minutes": 0
}
}
},
"civilIso8601TimeInterval": {
"startTime": "2026-08-20T00:00:00",
"endTime": "2026-08-21T00:00:00"
}
}
]
}
},
{
"data": {
"version": "1",
"clientProvidedSubscriptionName": "subscription-name",
"healthUserId": "health-user-id-2",
"operation": "UPSERT",
"dataType": "sleep",
"intervals": [
{
"physicalTimeInterval": {
"startTime": "2026-08-12T22:00:00Z",
"endTime": "2026-08-13T06:00:00Z"
},
"civilDateTimeInterval": {
"startDateTime": {
"date": {
"year": 2026,
"month": 8,
"day": 12
},
"time": {
"hours": 22,
"minutes": 0
}
},
"endDateTime": {
"date": {
"year": 2026,
"month": 8,
"day": 13
},
"time": {
"hours": 6,
"minutes": 0
}
}
},
"civilIso8601TimeInterval": {
"startTime": "2026-08-12T22:00:00",
"endTime": "2026-08-13T06:00:00"
}
}
],
"recordId": "9875412"
}
}
]The operation field indicates the type of change that triggered the
notification:
UPSERT: Sent for any data addition or modification.DELETE: Sent when a user explicitly deletes data (such as deletingdataPointsusing the Fitbit app or performing a batch delete using the API). Webhook notifications are not sent for system-level deletion events, such as a user revoking application permissions or deleting their Fitbit account.
We recommend making your notification handling logic idempotent, especially for
UPSERT operations, as retries can cause duplicate notifications to be sent.
The clientProvidedSubscriptionName field is a unique identifier:
- For subscriptions with a
MANUALpolicy, this field contains the persistent, developer-provided subscription name specified when the subscription is created. This provides a stable ID for managing manual subscriptions. - For subscriptions created with an
AUTOMATICpolicy, the Google Health API automatically generates and assigns an identifier in the format:auto-<project-number>-<subscriber-id>-<WEBHOOK_DATA_TYPE_TOKEN>, where:<project-number>is the developer's Google Cloud project number (for example,362978535920).<subscriber-id>is the subscriber's registration ID / subscriber name (for example,google-health-sync).<WEBHOOK_DATA_TYPE_TOKEN>is the token representing the specific data type. See Vocabulary of webhook data type tokens for all possible tokens.
Including clientProvidedSubscriptionName for both manual and
automatic policies ensures a consistent notification payload format across all
subscription types.
User ID mapping
The healthUserId is a Google Health API identifier for the user whose
data has changed. If your application supports multiple users, you can receive
notifications for any user who has granted your application consent. When
you receive a notification, use healthUserId to identify which user's
data has changed, so you can use their OAuth credentials to query their data.
To map a user's OAuth credentials to their healthUserId, use the
getIdentity endpoint. Call
this endpoint with a user's credentials during user onboarding to retrieve
their healthUserId, and store this mapping. This mapping doesn't change over
time, so it can be cached indefinitely. For an example, see
Get user ID. This lets you select the correct
user credentials when querying data based on the healthUserId in a
notification.
Time intervals
The intervals array contains one or more objects representing the time
intervals for the modified data:
| Field | Type | Required | Description |
|---|---|---|---|
physicalTimeInterval |
object |
No | The UTC physical time interval of the modified data (YYYY-MM-DDTHH:MM:SSZ format). Populated for intraday metrics; omitted for daily rollups and full-day activities. |
civilDateTimeInterval |
object |
Yes | The civil (local) calendar date and time interval of the modified data, without UTC or timezone offsets. |
civilIso8601TimeInterval |
object |
Yes | The civil (local) time interval represented as an ISO 8601 string (YYYY-MM-DDTHH:MM:SS format) without UTC or timezone offsets. |
For full-day activities and daily aggregates, the physicalTimeInterval
field is intentionally omitted from the notification payload. This is because
full-day events are bucketed by their nominal civil date, and physical time
durations can be inaccurate when crossing timezones. When processing full-day
events, you should rely on the civilDateTimeInterval or
civilIso8601TimeInterval fields as a best practice. For details on how to
query these data points using civil time filters, see
Filter data by an interval civil start time.
The following is an example notification payload for a full-day activity where
the physicalTimeInterval field is omitted:
[
{
"data": {
"version": "1",
"clientProvidedSubscriptionName": "auto-503461148219-lindasubscriber-WEBHOOK_DATA_TYPE_STEPS",
"healthUserId": "343864966078399341",
"operation": "UPSERT",
"dataType": "steps",
"intervals": [
{
"civilDateTimeInterval": {
"startDateTime": {
"date": {
"year": 2026,
"month": 7,
"day": 14
},
"time": {}
},
"endDateTime": {
"date": {
"year": 2026,
"month": 7,
"day": 15
},
"time": {}
}
},
"civilIso8601TimeInterval": {
"startTime": "2026-07-14T00:00:00",
"endTime": "2026-07-15T00:00:00"
}
}
]
}
}
]Vocabulary of webhook data type tokens
When using an AUTOMATIC policy, the generated clientProvidedSubscriptionName
contains one of the following capitalized WEBHOOK_DATA_TYPE_* suffix tokens
depending on the data type:
| Webhook Data Type Token | Corresponding Data Type |
|---|---|
WEBHOOK_DATA_TYPE_ACTIVE_MINUTES |
active-minutes |
WEBHOOK_DATA_TYPE_ACTIVE_ZONE_MINUTES |
active-zone-minutes |
WEBHOOK_DATA_TYPE_ACTIVITY_LEVEL |
activity-level |
WEBHOOK_DATA_TYPE_ALTITUDE |
altitude |
WEBHOOK_DATA_TYPE_BLOOD_GLUCOSE |
blood-glucose |
WEBHOOK_DATA_TYPE_BODY_FAT |
body-fat |
WEBHOOK_DATA_TYPE_CALORIES_IN_HEART_RATE_ZONE |
calories-in-heart-rate-zone |
WEBHOOK_DATA_TYPE_DAILY_HEART_RATE_VARIABILITY |
daily-heart-rate-variability |
WEBHOOK_DATA_TYPE_DAILY_HEART_RATE_ZONES |
daily-heart-rate-zones |
WEBHOOK_DATA_TYPE_DAILY_OXYGEN_SATURATION |
daily-oxygen-saturation |
WEBHOOK_DATA_TYPE_DAILY_RESPIRATORY_RATE |
daily-respiratory-rate |
WEBHOOK_DATA_TYPE_DAILY_RESTING_HEART_RATE |
daily-resting-heart-rate |
WEBHOOK_DATA_TYPE_DAILY_SLEEP_TEMPERATURE_DERIVATIONS |
daily-sleep-temperature-derivations |
WEBHOOK_DATA_TYPE_DISTANCE |
distance |
WEBHOOK_DATA_TYPE_EXERCISE |
exercise |
WEBHOOK_DATA_TYPE_FLOORS |
floors |
WEBHOOK_DATA_TYPE_HEART_RATE |
heart-rate |
WEBHOOK_DATA_TYPE_HEART_RATE_VARIABILITY |
heart-rate-variability |
WEBHOOK_DATA_TYPE_HEIGHT |
height |
WEBHOOK_DATA_TYPE_HYDRATION_LOG |
hydration-log |
WEBHOOK_DATA_TYPE_NUTRITION_LOG |
nutrition-log |
WEBHOOK_DATA_TYPE_RESPIRATORY_RATE_SLEEP_SUMMARY |
respiratory-rate-sleep-summary |
WEBHOOK_DATA_TYPE_RUN_VO2_MAX |
run-vo2-max |
WEBHOOK_DATA_TYPE_SEDENTARY_PERIOD |
sedentary-period |
WEBHOOK_DATA_TYPE_SLEEP |
sleep |
WEBHOOK_DATA_TYPE_STEPS |
steps |
WEBHOOK_DATA_TYPE_TIME_IN_HEART_RATE_ZONE |
time-in-heart-rate-zone |
WEBHOOK_DATA_TYPE_WEIGHT |
weight |
WEBHOOK_DATA_TYPE_USER_DELETED |
user-deleted (system event) |
WEBHOOK_DATA_TYPE_USER_REVOKED_ACCESS |
user-revoked-access (system event) |
Aggregation of updates
To minimize network traffic, the Google Health API batches messages together.
Every push delivery sends its payload as a JSON array ([...]) of 1 to 99
notification objects, which are automatically pushed as they become available.
A single batch can include updates for multiple users across multiple subscribed data types. For an example payload, see the Batch (multiple users and data types) example in the Notification format section.
Respond to a notification
Your server must validate the Authorization header, handle the synchronous
endpoint verification handshake, and
acknowledge data change notifications immediately (for example, with an HTTP
204 No Content status code). To avoid timeouts, process the notification
payload asynchronously after sending the response.
The Google Health API handles each notification batch based on your endpoint's HTTP response:
| HTTP response | Delivery behavior |
|---|---|
Below 400 (for example, 200, 202, 204) |
Acknowledges delivery of the notification batch. |
408, 429, 5xx, request timeout, or unreachable endpoint |
Retries delivery with exponential backoff. For queue retention and recovery details, see Subscriber status and recovery. |
Other 4xx (for example, 400, 401, 403, 404) |
Permanently discards the notification batch without retry. |
Node.js (Express) Example:
app.post('/webhook-receiver', (req, res) => {
if (req.headers.authorization !== EXPECTED_SECRET) {
return res.status(401).send();
}
if (req.body && !Array.isArray(req.body) && req.body.type === 'verification') {
return res.status(200).send();
}
// 1. Immediately acknowledge the notification batch
res.status(204).send();
// 2. Group and coalesce batched notifications by (healthUserId, dataType)
// into a single [minStart, maxEnd) window before reconciling asynchronously
const notifications = Array.isArray(req.body) ? req.body : [];
setImmediate(async () => {
const windows = new Map();
for (const notification of notifications) {
const { healthUserId, dataType, intervals = [] } = notification.data || {};
if (!healthUserId || !dataType) {
continue;
}
const key = `${healthUserId}:${dataType}`;
for (const interval of intervals) {
const civil = interval.civilIso8601TimeInterval;
if (!civil || !civil.startTime || !civil.endTime) {
continue;
}
const current = windows.get(key);
if (!current) {
windows.set(key, {
healthUserId,
dataType,
minStart: civil.startTime,
maxEnd: civil.endTime,
});
} else {
if (civil.startTime < current.minStart) {
current.minStart = civil.startTime;
}
if (civil.endTime > current.maxEnd) {
current.maxEnd = civil.endTime;
}
}
}
}
for (const { healthUserId, dataType, minStart, maxEnd } of windows.values()) {
const filterType = dataType.replace(/-/g, '_');
const timeField = dataType === 'sleep'
? `${filterType}.interval.civil_end_time`
: dataType === 'weight'
? `${filterType}.sample_time.civil_time`
: `${filterType}.interval.civil_start_time`;
const filter = `${timeField} >= "${minStart}" AND ${timeField} < "${maxEnd}"`;
console.log(
`Reconcile ${dataType} for user ${healthUserId}: [${minStart}, ${maxEnd})`
);
// Call GET /v4/users/${healthUserId}/dataTypes/${dataType}/dataPoints:reconcile
// with query parameter `filter=${encodeURIComponent(filter)}`.
}
});
});
Group notifications in each batch by (healthUserId, dataType) and coalesce
their intervals into a single [minStart, maxEnd) window before calling the
reconcile
endpoint with a filter for that time range. Coalescing avoids
issuing redundant API requests for batched deliveries, and reconcile
automatically deduplicates overlapping intervals from connected devices. For
details and examples, see
Get a reconciled view of interval data.
There are three common strategies for updating your database after receiving a data change notification:
- Queuing (recommended): Place the incoming notifications into a message queue and process them off the queue based on system resources.
- Immediate retrieval: Direct your backend to immediately call the Google Health API to fetch the updated data and commit it to your database.
- Lazy updates: Mark the user's local database records as dirty and only fetch the updated data from the Google Health API when the user next visits your application.
The queueing strategy lets you process data promptly while remaining resilient to a flood of notifications (for example, if a service outage causes a backlog of notifications to be delivered all at once). While you can choose to process these queues on a long-interval batch schedule (for example, every 3 hours) to save resources, the drawback is that users typically expect to see their data updated promptly.
Best practices
Follow these best practices to ensure reliable and efficient handling of data updates:
- Subscribe to webhooks and call the Google Health API when you receive a notification, rather than polling endpoints.
- Create one subscriber per data type, especially for high-volume data types
such as
steps, to isolate notification queues across data types. All of your subscribers can share the sameendpointUriwebhook URL. - The Google Health API delivers webhook notifications on a best-effort basis, which means some notifications might be delayed or dropped. If a screen or user journey requires data freshness, call the Google Health API directly at those times even without a webhook notification. For example, when a user pulls to refresh your app, query the Google Health API for the relevant data types.
- When you receive webhook notifications, place them into a queue and process them separately based on your system's resources. Keep your webhook endpoint lightweight by acknowledging the request immediately.
- Track the timestamp when you receive notifications, and query from the last time you received a notification to the current time. This ensures you have the latest data in case a notification is missed. You can use the timestamps in the notification to verify the time period when the data changed.
Signature verification
To ensure the authenticity of Webhooks notifications, the raw JSON payload of
every outgoing webhook notification is signed with a private key using Tink's
PublicKeySign,
providing the Base64-encoded signature in the GOOGLE-HEALTH-API-SIGNATURE HTTP
header in the request. These signing keys are automatically rotated every 30
days, and the corresponding official public keyset is distributed as a JSON
file at the permanent URL
https://www.gstatic.com/googlehealthapi/webhooks/webhooks_public_keyset.json.
How to verify the signature
Using Tink (Recommended): Developers can verify the signature using Tink's
PublicKeyVerify
primitive. Fetch the public keyset from the permanent URL, instantiate the
PublicKeyVerify primitive with the keyset, and verify the decoded
GOOGLE-HEALTH-API-SIGNATURE header against the raw webhook JSON payload.
Manual Verification (Without Tink): If developers choose not to use Tink, they can manually verify the signature by following these steps:
- Base64-decodes the
GOOGLE-HEALTH-API-SIGNATUREheader to separate the 5-byte Tink prefix (which contains a 1-byte version prefix and a 4-byte keyId) from the actual DER-encoded signature. - Fetch the JSON keyset from https://www.gstatic.com/googlehealthapi/webhooks/webhooks_public_keyset.json.
- Locate the key matching the parsed keyId and Base64-decode its value field, which contains a serialized EcdsaPublicKey Protocol Buffer.
- Extract the big-endian x and y coordinates (Protobuf tags 3 and 4) from this binary payload.
- Instantiate a standard ECDSA P-256 public key in a built-in cryptography library using the extracted x and y coordinates.
- Verify the raw webhook JSON payload against the extracted DER signature using the SHA-256 algorithm.