Enroll In Sequence
POST
POST
http://api.atzcrm.com/v1/sequence/{sequence_id}/enrollEnroll a candidate or contact in an existing sequence. The sequence_id is passed in the URL, and the entity is selected by entity_type and slug in the request body.
Request
Path Parameters
- sequence_id
integerRequired. The sequence id to enroll the entity into.
Body
- entity_type
stringRequired. Allowed values: candidate, contact.
- slug
stringRequired. Candidate slug or contact slug from the same account.
Request Example
{
"entity_type": "candidate",
"slug": "candidate_0d25558c1a77fc2d7d98"
}
{
"entity_type": "contact",
"slug": "contact_68ba678fcd2a83f4640c"
}
Response
200
Body
- message
stringExample: Enrolled in Sequence successfully.
400
Body
- Validation errors
Returned as an array of field level errors.
- Business rule errors
Returned as an object with a message, for example when the entity is already enrolled, the sequence is being updated, the entity email is opted out, or a required email/timezone setup is missing.
401
Body
- unauthorised
500
Body
- Error while enrolling in sequence
Response Example
{
"message": "Enrolled in Sequence successfully."
}
Validation Error Example
[
{
"field_name": "entity_type",
"error_message": "entity_type is required"
},
{
"field_name": "slug",
"error_message": "slug is required"
}
]
Business Error Example
{
"message": "Candidate is already enrolled in a sequence"
}