curl --request PATCH \
--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",
"company": "Acme Holdings LLC"
}
}
'{
"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"
}Update & Send to Workflow
Create or update a lead, then enroll it in a journey. Works exactly like Send to Workflow (POST), with one difference: if the lead is already on file, the fields you send in record are saved to the lead before it’s enrolled, so the journey runs with your new data.
- Partial updates: Only the fields you include are changed. Everything else on the lead stays the same. Send only
companyand only the company is updated. - New leads: If no matching lead exists, one is created from
recordand enrolled, same asPOST. - Finding the lead: Send
record.phone,lead_id, or both. You need at least one. Without either, no lead can be found and nothing is sent. Always sendphonein E.164 digits-only format (e.g.17145551234) so it matches the lead on file.
Every PATCH enrolls the lead. There is no update-only mode. Don’t use this endpoint for bulk data cleanup unless you want every lead you touch sent into the journey.
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 |
Use POST when the data already on file should win, such as re-enrolling a lead without touching its record. Use PATCH when the data you’re sending should win, such as a lead source sending corrected or enriched details.
curl --request PATCH \
--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",
"company": "Acme Holdings LLC"
}
}
'{
"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 fields to create or update. On an existing lead, only the fields you include are changed and everything else stays the same. phone is required unless you provide lead_id.
Show child attributes
Show child attributes
Existing lead UUID. Optional, but required if record doesn't include phone.
"307fc241-8398-4740-8122-cf6a59f3b86e"