Sequence Trigger by ID API
Update, delete, and simulate individual sequence triggers.
PUT /sequences/{id}
Update an existing sequence trigger.
Request
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Sequence trigger identifier (path parameter) |
Request Body
All fields are optional. Only provided fields will be updated.
| Field | Type | Description |
|---|---|---|
name | string | Sequence trigger name |
event_types | array | Ordered list of event types |
window_seconds | integer | Time window in seconds |
window_unit | string | Human-readable unit label |
ordered | boolean | Whether events must occur in order |
webhook_url | string | Webhook destination URL |
emails | array | Email notification recipients |
email_subject | string | Subject line for email notifications |
email_preheader | string | Preheader text for email notifications |
email_message | string | Custom message body for email notifications |
active | boolean | Whether trigger is active |
Response
200 OK
{
"id": "seq-123",
"name": "Updated Sequence",
"event_types": ["pricing_page_view", "demo_request"],
"window_seconds": 86400,
"ordered": false,
"active": true,
"updated_at": "2025-01-15T12:00:00Z"
}
Example
curl -X PUT "https://api.leadvibe.com/sequences/seq-123" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"window_seconds": 86400,
"ordered": false
}'
Common Errors
| Status | Meaning | Solution |
|---|---|---|
| 400 | Bad Request | Invalid field values |
| 401 | Unauthorized | Check authentication token |
| 404 | Not Found | Sequence trigger does not exist or not accessible |
DELETE /sequences/{id}
Delete a sequence trigger. This action cannot be undone.
Request
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Sequence trigger identifier (path parameter) |
Response
204 No Content
Successfully deleted.
Example
curl -X DELETE "https://api.leadvibe.com/sequences/seq-123" \
-H "Authorization: Bearer <token>"
Common Errors
| Status | Meaning | Solution |
|---|---|---|
| 401 | Unauthorized | Check authentication token |
| 404 | Not Found | Sequence trigger does not exist or not accessible |
POST /sequences/{id}/simulate
Test a sequence trigger against a specific lead or against historical data. Use this to verify that a sequence trigger's event steps, time window, and order requirements are configured correctly before enabling it.
Request
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Sequence trigger identifier (path parameter) |
lead_id | string | No | Specific lead ID to test against. When omitted, scans historical data for all matching leads. |
days | integer | No | Number of days to look back (default: 30, range: 1-365) |
Request Body
{
"lead_id": "abc-123",
"days": 30
}
Response
200 OK
{
"would_fire": true,
"matched_leads": ["abc-123"],
"total_matches": 1,
"message": "Trigger would fire for this lead"
}
Response Fields
| Field | Type | Description |
|---|---|---|
would_fire | boolean | Whether the sequence trigger would fire |
matched_leads | array | Lead IDs that completed the sequence (up to 100) |
total_matches | integer | Total number of matching leads |
message | string | Human-readable summary of the simulation result |
Examples
Test a Specific Lead:
curl -X POST "https://api.leadvibe.com/sequences/seq-123/simulate" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{"lead_id": "abc-123", "days": 30}'
Scan Historical Data:
curl -X POST "https://api.leadvibe.com/sequences/seq-123/simulate" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{"days": 60}'
Common Errors
| Status | Meaning | Solution |
|---|---|---|
| 400 | Bad Request | Check that the JSON body is well-formed |
| 401 | Unauthorized | Check authentication token |
| 404 | Not Found | Sequence trigger or lead does not exist |
| 500 | Server Error | Retry later or contact support |
POST /sequences/{id}/pause
Pause a sequence trigger. A paused trigger remains configured but does not fire.
Response
200 OK
POST /sequences/{id}/resume
Resume a paused sequence trigger.
Response
200 OK
POST /sequences/{id}/copy
Create a copy of an existing sequence trigger. Useful for creating variations for testing.
Response
201 Created
Returns the newly created sequence trigger.
Notes
- Consider pausing a trigger instead of deleting it if you might need it later
- Simulation does not fire the actual trigger or send any notifications
- Historical scans are limited to 100 matched leads in the response
Related Endpoints
- Sequence Triggers - List and create sequence triggers
- Milestone Trigger by ID - Simulate milestone triggers
- Search Leads - Find leads to test against