curl --request POST \
--url https://app.leonar.app/api/v1/sequences/{id}/enroll \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"contact_ids": [
"a1b2c3d4-5678-90ab-cdef-1234567890ab",
"b2c3d4e5-6789-01bc-defa-2345678901bc"
]
}
'{
"data": {
"enrolled": 8,
"skipped_blacklisted": 1,
"skipped_already_enrolled": 2,
"skipped_active_elsewhere": 0,
"skipped_not_found": 0
}
}{
"error": {
"code": "validation_error",
"message": "Invalid input"
}
}{
"error": {
"code": "invalid_api_key",
"message": "Invalid API key"
}
}{
"error": {
"code": "not_found",
"message": "Resource not found"
}
}Sequences
Enroll contacts
Enrolls contacts in a sequence. Skips contacts that are blacklisted, already enrolled, or active in another sequence.
Use the simple contact_ids format when no per-contact custom variables
are needed. Use the extended contacts format to provide values for
sequence placeholders {{custom_variable_1}} through
{{custom_variable_5}}. Custom variable keys are fixed; arbitrary keys
such as project_name are rejected.
POST
/
sequences
/
{id}
/
enroll
curl --request POST \
--url https://app.leonar.app/api/v1/sequences/{id}/enroll \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"contact_ids": [
"a1b2c3d4-5678-90ab-cdef-1234567890ab",
"b2c3d4e5-6789-01bc-defa-2345678901bc"
]
}
'{
"data": {
"enrolled": 8,
"skipped_blacklisted": 1,
"skipped_already_enrolled": 2,
"skipped_active_elsewhere": 0,
"skipped_not_found": 0
}
}{
"error": {
"code": "validation_error",
"message": "Invalid input"
}
}{
"error": {
"code": "invalid_api_key",
"message": "Invalid API key"
}
}{
"error": {
"code": "not_found",
"message": "Resource not found"
}
}Authorizations
API key starting with leo_
Path Parameters
Sequence ID
Body
application/json
- Option 1
- Option 2
Simple format - list of contact IDs
Maximum array length:
500Response
Enrollment results
Show child attributes
Show child attributes