Check an automation before activating
Every finding the dashboard's review screen shows, at once: the entry, the emails' domains, empty emails, the deliverability check of each email, preview…
https://app.usenotix.dev/api/v1/automations/{id}/preflightFull access and read only keys can call this. Sending access keys cannot. Key permissions lists the extra rules some calls have.
Every finding the dashboard's review screen shows, at once: the entry, the emails' domains, empty emails, the deliverability check of each email, preview text and plan usage, each ok, warn or block. It adds what would stop the calling key from activating (an automation that is not a draft, a key that is not full access or not made by an admin, an approval policy). canActivate is true when nothing blocks. mayBeHeld is true when Notix would hold the automation for review. It runs the same checks as activation, so a team can run 30 a minute.
Path parameters
Headers
Bearer followed by your API key.
Errors
No journey with this id for the calling team (or, for a pinned key, on its domain).
The team checked 30 journeys in the last minute.
Every error has the same shape. See all error codes.
curl -X GET "https://app.usenotix.dev/api/v1/automations/<id>/preflight" \
-H "Authorization: Bearer $NOTIX_API_KEY"
import { Notix } from "notix-js";
const notix = new Notix(process.env.NOTIX_API_KEY);
const { data, error } = await notix.automations.preflight("jrn_123");
data?.findings.filter((finding) => finding.level === "block").forEach((finding) => console.log(finding.title));
{
"journeyId": "cm1x8f3k20001qz7v5b9d2e4a",
"status": "string",
"canActivate": true,
"mayBeHeld": true,
"findings": [
{
"id": "cm1x8f3k20001qz7v5b9d2e4a",
"level": "ok",
"title": "string",
"detail": "string"
}
],
"entry": {
"triggerType": "CONTACT_ADDED",
"contactBookName": "Acme",
"existingContacts": 1
}
}