Enroll a contact
Starts a Workflow run for the given contact or group. The first step executes immediately. The response includes runId and the pb_line_id pinned to the run, plus groupId when enrolled by group.
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)RequiredphoneNumberstringgroupIdstringpb_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
- Provide phoneNumber or groupId, not both; phoneNumber or groupId is required; This group lives on a different line; pb_line_id is required for this group; invalid phone number, invalid pb_line_id, or no available lines
- 403
- Contact has opted out
- 404
- Group not found for this account; flow not found or not published, or line not found
- 409
- This group's line is no longer on this account; an active run already exists for this contact in this flow