Enroll a contact (manual trigger)

Enroll a contact (manual trigger)

POST/api/v1/automations/{id}/runs

POST /automations/{id}/runs
curl -X POST 'https://www.unitpost.com/api/v1/automations/atm_123/runs' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'User-Agent: my-app/1.0' \
  -H 'Content-Type: application/json' \
  -d '{
    "email": "sam@acme.com",
    "idempotency_key": "enroll-sam-2026-11-02"
  }'
Response · 202
{
  "object": "automation_enrollment",
  "accepted": true,
  "automation_id": "automation_123",
  "contact_id": "contact_123",
  "event_id": "event_123"
}

Start one run for one contact. Only for an automation published with the manual-enrollment trigger — anything else is driven by the event it listens for, and is refused here. Send exactly one of contact_id or email; add an idempotency_key so a retry can't start a second run. Returns **202**: enrollment is asynchronous, and the automation's own policy (re-entry rules, per-contact concurrency, active-run ceiling) may still decline it, as does no_consent: every message the journey could send would be skipped for this contact by consent, so no run starts and nothing is billed (guard_trips.no_consent in the stats). Preview an enrollment says which beforehand. Poll GET on this same path to see the run. Requires the automations:publish capability.

Parameters1 field
FieldTypeDescription
idrequiredstring · path—
Request body3 fields
FieldTypeDescription
contact_idstringThe contact to enroll (`con_…`).
emailstringOr the contact to enroll, by email address.
idempotency_keystringRetries with the same key enroll once.
Response · 202 fields5 fields
FieldTypeDescription
objectrequiredstring—
acceptedrequiredboolean—
automation_idrequiredstring—
contact_idrequiredstring—
event_idrequiredstring—
202401403404409422502

Search docs and guides

Search the docs and product guides.