Enroll a contact
Starts a Workflow run for the given contact. The first step executes immediately. The response includes runId and the pb_line_id pinned to the run.
Because the first step runs before the response is written, the returned status is the state after that step. A run that begins with a wait comes back SLEEPING, and one that begins by asking a question comes back WAITING_REPLY — ACTIVE is the exception, not the rule. Statuses are uppercase: ACTIVE, SLEEPING, WAITING_REPLY, COMPLETED, CANCELLED, FAILED.
Request body
flowIdstring (UUID)RequiredphoneNumberstringRequiredpb_line_idstring (UUID)variablesobject{{first_name}}, {{last_name}}, {{email}}, {{company}}, {{phone}}, {{reply}} (the contact's last reply during a wait step), and {{custom.<key>}}. An optional fallback is written as {{first_name|there}}. Unknown tokens with no fallback render as an empty string.At send time each token is filled in this order:
variablessent on the enroll request- the connected CRM contact (HighLevel, HubSpot, or Close), looked up live by the contact's phone number
- the Project Blue contact record, only for accounts with no connected CRM
{{custom.<key>}} reads from variables first, then from the CRM using the CRM's own field identifier. HighLevel uses the custom field key without the contact. prefix (the part GHL shows in {{contact.<key>}}). HubSpot uses the contact property internal name. Close uses the custom field name, case insensitive, on the contact or its lead. Accounts with no CRM get custom values from variables only.
Status codes
- 400
- Invalid phone number, invalid pb_line_id, or no available lines
- 403
- Contact has opted out
- 404
- Flow not found or not published, or line not found
- 409
- An active run already exists for this contact in this flow