---
title: "Delete a automation"
method: DELETE
path: "/v1/projectId/{projectId}/automations/{id}"
tags: ["Automations"]
---

# Delete a automation

`DELETE /v1/projectId/{projectId}/automations/{id}`

## Request

- Base URL: `https://api.bluefox.email`
- URL: `https://api.bluefox.email/v1/projectId/{projectId}/automations/{id}`
- Auth: HTTP bearer

This also deletes the automation's email content and running-contact history, and cannot be undone.

## Path parameters

- `projectId` string, required
- `id` string, required

## Query parameters

- `confirm` 'true'

## Response `200`

OK - check result.confirmationRequired before assuming the automation was actually deleted.

- object
  - `status` integer
  - `result` union
    - Automation
      - `_id` string
      - `name` string
      - `status` 'draft' | 'active' | 'paused'
      - `trigger` object: Discriminated by trigger.type (contact-added | contact-updated | enter-segment | leave-segment | time-based) - shape varies by type, see the Automations guide. Every type except time-based also supports runOnce (boolean, default true): when true, a contact who has ever run this automation before is skipped even if the trigger matches again; set false to let them re-enter each time it matches.
      - `exitCriteria` object: A condition that removes a contact from this automation mid-flow when true. Has an "active" boolean plus condition fields.
      - `sequence` AutomationNode[]: The live, running sequence. Use the node sub-resource endpoints to add/update/delete nodes rather than replacing this array directly.
        - `_id` string
        - `type` 'delay' | 'send-email' | 'filter-audience' | 'branch' | 'complete' | 'set-value' | 'notify' | 'manage-tags' | 'webhook'
        - `error` string[]: Populated by the server when this node fails validation on an activate/merge-draft attempt - not settable by the client.
      - `draftSequence` AutomationNode[]: Present only while this automation is active and has unmerged staged edits. POST .../merge-draft to apply, or .../discard-draft to drop them.
        - `_id` string
        - `type` 'delay' | 'send-email' | 'filter-audience' | 'branch' | 'complete' | 'set-value' | 'notify' | 'manage-tags' | 'webhook'
        - `error` string[]: Populated by the server when this node fails validation on an activate/merge-draft attempt - not settable by the client.
      - `draftTrigger` object: Staged trigger edit, present only while active with unmerged changes.
      - `draftExitCriteria` object: Staged exit-criteria edit, present only while active with unmerged changes.
      - `usedSegments` string[]
      - `lastTriggeredAt` string, date-time
      - `createdAt` string, date-time
      - `updatedAt` string, date-time
    - object
      - `_id` string
      - `name` string
      - `status` 'draft' | 'active' | 'paused'
      - `trigger` object: Discriminated by trigger.type (contact-added | contact-updated | enter-segment | leave-segment | time-based) - shape varies by type, see the Automations guide. Every type except time-based also supports runOnce (boolean, default true): when true, a contact who has ever run this automation before is skipped even if the trigger matches again; set false to let them re-enter each time it matches.
      - `exitCriteria` object: A condition that removes a contact from this automation mid-flow when true. Has an "active" boolean plus condition fields.
      - `sequence` AutomationNode[]: The live, running sequence. Use the node sub-resource endpoints to add/update/delete nodes rather than replacing this array directly.
        - `_id` string
        - `type` 'delay' | 'send-email' | 'filter-audience' | 'branch' | 'complete' | 'set-value' | 'notify' | 'manage-tags' | 'webhook'
        - `error` string[]: Populated by the server when this node fails validation on an activate/merge-draft attempt - not settable by the client.
      - `draftSequence` AutomationNode[]: Present only while this automation is active and has unmerged staged edits. POST .../merge-draft to apply, or .../discard-draft to drop them.
        - `_id` string
        - `type` 'delay' | 'send-email' | 'filter-audience' | 'branch' | 'complete' | 'set-value' | 'notify' | 'manage-tags' | 'webhook'
        - `error` string[]: Populated by the server when this node fails validation on an activate/merge-draft attempt - not settable by the client.
      - `draftTrigger` object: Staged trigger edit, present only while active with unmerged changes.
      - `draftExitCriteria` object: Staged exit-criteria edit, present only while active with unmerged changes.
      - `usedSegments` string[]
      - `lastTriggeredAt` string, date-time
      - `createdAt` string, date-time
      - `updatedAt` string, date-time
      - `confirmationRequired` boolean

## Other responses

- `403`: Missing or invalid API key
- `404`: Automations not found

---

[API](https://skmtc.dev/bluefox/apis/bluefox-email-public-api.md) · [All operations](https://skmtc.dev/bluefox/apis/bluefox-email-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/bluefox/apis/bluefox-email-public-api/revisions/fa1a0a835c7f?raw)
