> For the complete documentation index, see [llms.txt](https://docs.tryterra.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tryterra.co/help-center/help-topics/webhook/payload-content-and-provider-quirks/webhook-snapshot-vs-api-samples.md).

# Why is a sample array empty in the webhook but present when I call the API?

A webhook is a snapshot of what Terra held when it was sent, while an API read with samples rebuilds the sample arrays from everything stored for the record's time window.

**A webhook is a snapshot of what Terra held when it was sent, while an API read with samples rebuilds the sample arrays from everything stored for the record's time window.** If samples reached Terra separately from the record, or after the webhook went out, the webhook can show an empty array while the API returns the full series.

This happens, for example, when heart rate was recorded separately from the workout on the device, or when a provider makes detail such as laps available after the summary.

To correct what you stored, re-read the record over the API for a window that covers the whole session:

```
GET /v2/activity?user_id=...&start_date=2026-07-08&end_date=2026-07-09&with_samples=true&to_webhook=false
```

`end_date` is exclusive, so use the day after the session. Sample arrays are only returned when samples are included, so check the **Include Samples** setting under **Samples** on the Connections page, or set `with_samples=true` as above.

See [requesting historical data](https://docs.tryterra.co/unified-api/managing-user-health-data/requesting-historical-data).
