API Reference
Delete Automation Step
DELETE /automations/:id/steps/:stepId — remove a step from a disabled automation.
DELETE
/automations/:id/steps/:stepIdRemoves a single step from an automation. The automation must be disabled — deleting steps from an enabled automation is not allowed because it would change the graph for in-flight runs. Stop or disable the automation first, then delete the step.
Path parameters
idstringrequiredThe ID of the automation that owns the step.
stepIdstringrequiredThe ID of the step to delete.
import { MailBlastr } from 'mailblastr';
const mb = new MailBlastr('mb_xxxxxxxxx');
const { data, error } = await mb.automations.deleteStep('c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd', '9a8b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d');
console.log({ data, error });Response
{
"id": "9a8b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d",
"deleted": true
}