Start a workflow for a contact
enroll_in_workflowEnroll a contact in a Blujay workflow to begin its text sequence using a contact ID and workflow ID; only manually started workflows are eligible.
Instructions
Enroll one contact in a Blujay workflow, which starts its sequence of texts to them. This sends a real text to a real person; there is no test mode. Look the contact up first with find_contacts (or create them with save_contact) to get their contact_id, and get the workflow_id from list_workflows. Only workflows that start manually can be enrolled; a tag-triggered workflow starts when you tag the contact with save_contact. A contact who opted out is never enrolled, and a contact already in an unfinished run of the workflow isn't enrolled twice. request_id makes retries safe: the same request_id never enrolls the contact twice. Leave it out and this server reuses one for the same workflow and contact for 10 minutes; pass a new one only when the user really wants the contact enrolled again.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"workflow_id": "<workflow_id>",
"contact_id": "<contact_id>"
},
"name": "enroll_in_workflow"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| metadata | No | Optional notes stored with the enrollment, such as its source. Up to 20 keys. Workflow steps can't read it and it doesn't change what's sent. | |
| contact_id | Yes | From find_contacts or save_contact. | |
| request_id | No | Your ID for this enrollment, such as a signup or order ID. Sending it again returns the first result instead of enrolling twice. | |
| workflow_id | Yes | From list_workflows. |