Polling vs. webhooks
There are two ways to learn about changes in Thea.
| Webhooks | Polling with updated_since |
|
|---|---|---|
| Latency | Seconds | Your polling interval |
| Rate-limit cost | None | One request per page, per interval |
| Needs a public HTTPS endpoint | Yes | No |
| Can miss changes | Yes, if your endpoint is down for over 24 hours | No |
Recommended: both
Section titled “Recommended: both”- Subscribe to webhooks for the events your product reacts to, and fetch the resource when one arrives.
- Run a periodic sync with
updated_since(hourly or nightly) to reconcile anything a webhook didn’t deliver, for example after an outage on your side.
Because both paths fetch the current resource and upsert by id, it doesn’t
matter which one sees a change first.
Polling only
Section titled “Polling only”If you can’t receive webhooks (for example, inside a hospital network with no inbound access), poll:
- For each connected practice,
GET /cases?updated_since=<last checkpoint>with its practice key every 1–5 minutes. - Fetch
GET /cases/{case_id}/messagesonly for cases whoseupdated_atchanged.
At a one-minute interval, that’s well inside the rate limits for most practices. See Pagination for a sync loop.

