Enrol up to 100 contacts
Enrol 1 to 100 contacts into an automation in one call, each by contactId or by email (an email not yet in the automation's contact book is added to it).
https://app.usenotix.dev/api/v1/automations/{id}/enroll/batchNeeds a full access key. Sending access keys cannot call this. Key permissions lists the extra rules some calls have.
Enrol 1 to 100 contacts into an automation in one call, each by contactId or by email (an email not yet in the automation's contact book is added to it). Each contact is enrolled by the same rules as a single enrolment; one failing does not stop the rest. The answer has one entry per contact in results, in request order: enrolled with its run id, or failed with the code and reason. Needs a full access key.
A key with an approval policy cannot enrol more people at once than its threshold (a DRAFT_ONLY key cannot use this at all): there is no approval step for an enrolment, so the call answers 403. Enrol them from the dashboard instead.
Idempotency
Pass an Idempotency-Key header to make a retry safe for 24 hours. The same key and body answers the original result without sending again, with the response header Idempotent-Replayed: true. The same key with a different body answers 409 NOT_UNIQUE; the same key while the first request is still running answers 409 too, so retry shortly. Keys are scoped to the API key.
Dry run
Send the header Notix-Dry-Run: true to see what the request would do without doing it. The answer is 200 with dryRun: true: who it would reach, what they would see, what it would cost, a verdict (allowed and every reasons it would be refused for) and the limits it would count against. Nothing is sent, charged, reserved or written, and the call is recorded in the audit log as a dry run. A write route that cannot preview answers 400.
Path parameters
Body parameters
1 to 100 contacts, each by contactId or by email.
An existing contact's id.
At most 128 characters.
An address in the journey's contact book; created there when absent.
Headers
Bearer followed by your API key.
Makes the request safe to retry for 24 hours. Same key and same body answers the original result without running again, with the response header Idempotent-Replayed: true. Same key and a different body answers 409 NOT_UNIQUE; same key while the first request is still running answers 409 too, so retry shortly. Keys are scoped to the API key.
Set to true to preview the request instead of running it. The answer is 200 with dryRun: true: who it would reach, what they would see, what it would cost, whether policy allows it and the limits it counts against. Nothing is sent, charged, reserved or written. A write route that cannot preview answers 400.
Errors
The body is not valid
The key's approval policy does not allow this many enrolments at once, or a pinned key and a journey on another domain
No journey with this id for the calling team
The key's daily journey enrolment limit or email cap is reached
Every error has the same shape. See all error codes.
curl -X POST "https://app.usenotix.dev/api/v1/automations/<id>/enroll/batch" \
-H "Authorization: Bearer $NOTIX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"contacts": [
{
"contactId": "cm1x8f3k20001qz7v5b9d2e4a",
"email": "customer@example.com"
}
]
}'
{
"journeyId": "cm1x8f3k20001qz7v5b9d2e4a",
"summary": {
"total": 1,
"enrolled": 1,
"failed": 1
},
"results": [
{
"index": 1,
"status": "enrolled",
"runId": "cm1x8f3k20001qz7v5b9d2e4a",
"contactId": "cm1x8f3k20001qz7v5b9d2e4a",
"error": {
"code": null,
"message": null
}
}
]
}