Sequences
Trigger
Upsert a contact and enroll them in a sequence in a single call.
POST /api/v1/sequences/:id/trigger
The most common integration endpoint. Upserts a contact and enrolls them in the sequence atomically. The sequence must be in active status.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
contact.email | string | Yes | Contact email address |
contact.phone | string | No | Phone number |
contact.firstName | string | No | First name |
contact.lastName | string | No | Last name |
contact.tags | string[] | No | Tags to set on the contact |
contact.customFields | object | No | Custom field key-value pairs |
contact.emailSubscriptionStatus | "subscribed" | "unsubscribed" | No | Defaults to "subscribed" |
contact.whatsappSubscriptionStatus | "subscribed" | "unsubscribed" | No | Defaults to "subscribed" |
Example
curl -X POST /api/v1/sequences/SEQUENCE_ID/trigger \
-H "x-api-key: mndr_..." \
-H "Content-Type: application/json" \
-d '{
"contact": {
"email": "jane@example.com",
"firstName": "Jane",
"tags": ["new-customer"]
}
}'Responses
All responses return 202 Accepted:
{
"enrolled": true,
"contactId": "uuid",
"runId": "uuid"
}{
"enrolled": false,
"reason": "active_run_exists",
"contactId": "uuid"
}{
"enrolled": false,
"reason": "sequence_limit_reached",
"message": "Active sequence limit reached."
}Error Responses
| Status | Meaning |
|---|---|
404 | Sequence not found |
409 | Sequence is not active |