Enroll one contact into a flow
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
Admits one contact and answers with the RUN that was created, which is what you poll afterwards. IT TAKES THE SAME PATH THE TRIGGERS TAKE, so the flow's re-enrollment policy, the store's daily enrollment ceiling and the one-live-run-per-contact guard all apply. This is not a way around a policy the merchant set: an ineligible contact is 409 not_eligible, and a flow that is not live is 409 invalid_transition. ENROLLING A WHOLE SEGMENT IS NOT PUBLISHED and segment_id is refused by name. One call quietly enrolling an unbounded audience into a sending program is the largest blast radius on this API behind a body with no confirmation step, and the underlying operation answers 202 with a queued count, which an idempotency replay would report as a completion that may since have failed. Give the flow a segment_entry trigger instead. trigger_event_id is refused too: it records the behavioural event that CAUSED an enrollment, so a caller-supplied one would let a key write a run indistinguishable from one a real customer's own behaviour produced. This enrollment carries no event, which is the honest record of what happened.
The marketing contact to admit. It must already exist in this store; resolve or create one through POST /api/v1/marketing-contacts/resolve, which needs write_marketing_contacts.
Response
Created
