---
title: "Rename an automation"
method: PATCH
path: "/v1/projectId/{projectId}/automations/{id}"
tags: ["Automations"]
---

# Rename an automation

`PATCH /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

Only the name can be changed here. trigger, exitCriteria, sequence, and status all have their own dedicated endpoints (node sub-resource, lifecycle actions) so validation and draft-staging always apply.

## Path parameters

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

## Request body

- object
  - `name` string, required

## Response `200`

OK

- object
  - `status` integer
  - `result` 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

## Other responses

- `400`: Invalid request body or query - every violation found (missing/invalid/unexpected fields) is reported in one response, semicolon-separated, not just the first one hit.
- `403`: Missing or invalid API key
- `404`: Automation 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)
