Sequences
Enroll by Email
Upsert a contact and enroll them in a sequence by email.
POST /api/v1/sequences/:id/enroll-by-email
Upsert a contact by email and enroll them in the sequence. Combines contact creation/update with enrollment in a single call.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
email | string | Yes | Contact email address |
phone | string | No | Phone number |
firstName | string | No | First name |
lastName | string | No | Last name |
tags | string[] | No | Tags to set |
customFields | object | No | Custom field key-value pairs |
Example
curl -X POST /api/v1/sequences/SEQUENCE_ID/enroll-by-email \
-H "x-api-key: mndr_..." \
-H "Content-Type: application/json" \
-d '{
"email": "jane@example.com",
"firstName": "Jane"
}'{
"enrolled": true,
"contactId": "uuid",
"runId": "uuid"
}{
"enrolled": false,
"reason": "active_run_exists",
"contactId": "uuid"
}Difference from Trigger
Both endpoints upsert a contact and enroll. The difference is the request shape:
- Trigger wraps contact data in a
contactobject:{ contact: { email, ... } } - Enroll by email accepts fields at the top level:
{ email, firstName, ... }