Recompute a dynamic segment's membership
Recomputes the segment’s membership from its rule and answers with the segment, so member_count and last_refreshed_at come back as the transaction committed them. IT IS DESTRUCTIVE DESPITE THE NAME: the whole materialised membership is deleted and re-inserted in one transaction. A rule you narrowed a moment ago shrinks the audience anything targeting it is about to send to. Only a dynamic segment can be refreshed; a static one is 400 not_dynamic. USE A FRESH Idempotency-Key ON EVERY CALL. A replayed key returns the stored response without re-running anything, so a second refresh on the same key answers with the first call’s counts and recomputes nothing.
Authorizations
A secret API key. Publishable keys cannot reach this API. A key may carry an expiry, and an expired key is refused exactly like an unknown one, with a 401 that names no reason; check the key's expires_at in the dashboard rather than inferring it from a response. When a merchant rolls a key's secret they choose a grace window of up to 3 days, and for its duration BOTH the new secret and the one it replaced authenticate, so an integration moves over on its own deploy schedule instead of at the instant the button is pressed. Move before the window closes: after it, the old secret is refused. Nothing else about this contract moves with a roll. The key keeps its id and its scopes, so the only thing an integration updates is the credential itself.
Headers
A unique key per logical write. Replaying a request with the same key returns the first response byte for byte instead of applying the write twice.
Path Parameters
Body
Takes no parameters, and an empty body is expected. The response is the segment as the refresh committed it, so member_count and last_refreshed_at are the numbers to read. USE A FRESH Idempotency-Key ON EVERY CALL. A replayed key returns the stored response without re-running anything.
Response
Success
