curl --request POST \
--url https://api.plura.ai/v1/lead/sendtoworkflow \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"workflow_id": "98249779-79ae-462f-a0cf-7ce5129cc093",
"record": {
"phone": "17145551234",
"first_name": "John",
"last_name": "Smith",
"email": "johnsmith@mail.com",
"company": "Acme Corp"
}
}
'{
"status": "success",
"lead_id": "307fc241-8398-4740-8122-cf6a59f3b86e",
"workflow_assigned": true,
"message": "Lead successfully added to workflow"
}{
"status": "failed",
"message": "Could not find or create lead, please try again!"
}{
"status": "failed",
"message": "Human-readable error description"
}{
"status": "failed",
"message": "Human-readable error description"
}Send to Workflow
Enroll a lead into an automated journey. If the lead isn’t on file yet, it’s created from record and enrolled. If it’s already on file, it’s enrolled as-is.
POST never modifies an existing lead. When a lead matching lead_id or record.phone already exists, every other field in record is ignored and the journey runs with the data already on file. To update the lead before enrolling it, use Update & Send to Workflow (PATCH).
Note: Provide either record or lead_id, never both. When you send record, the lead is matched by phone.
Finding your Journey ID: Extract it from your workspace URL: app.plura.ai/[workspace]/journey/[JOURNEY-ID]/flow/[flow-id]. The Journey ID is the UUID after /journey/. Use the Journey ID, not the Flow ID.
POST vs. PATCH
| Lead not on file | Lead already on file | |
|---|---|---|
POST | Created from record, then enrolled | Enrolled with the data on file. record is ignored. |
PATCH | Created from record, then enrolled | Fields you send are updated, then enrolled |
curl --request POST \
--url https://api.plura.ai/v1/lead/sendtoworkflow \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"workflow_id": "98249779-79ae-462f-a0cf-7ce5129cc093",
"record": {
"phone": "17145551234",
"first_name": "John",
"last_name": "Smith",
"email": "johnsmith@mail.com",
"company": "Acme Corp"
}
}
'{
"status": "success",
"lead_id": "307fc241-8398-4740-8122-cf6a59f3b86e",
"workflow_assigned": true,
"message": "Lead successfully added to workflow"
}{
"status": "failed",
"message": "Could not find or create lead, please try again!"
}{
"status": "failed",
"message": "Human-readable error description"
}{
"status": "failed",
"message": "Human-readable error description"
}Authorizations
API key from Settings → API Keys in your workspace
Body
Journey ID from your workspace URL (not the Flow ID)
"98249779-79ae-462f-a0cf-7ce5129cc093"
Lead data. The lead is matched by phone. If no match is found, a new lead is created from these fields. If a match is found, these fields are ignored and the existing lead is enrolled unchanged. Provide this OR lead_id, not both.
Show child attributes
Show child attributes
Existing lead UUID. Provide this OR record, not both.
"307fc241-8398-4740-8122-cf6a59f3b86e"