---
title: "PATCH /api/automation-rules/{id}"
method: PATCH
path: "/api/automation-rules/{id}"
tags: ["Automation Rules"]
---

# PATCH /api/automation-rules/{id}

`PATCH /api/automation-rules/{id}`

Update an automation rule. Supplying `conditions` replaces the whole condition tree; omitting it leaves the tree untouched. Rules are not versioned, so an edit takes effect on the next scheduled run.

## Path parameters

- `id` string, required

## Request body

- object
  - `name` string
  - `description` string
  - `workflowId` string
  - `workflowTemplateKey` string
  - `stepConfigs` object
  - `triggerCron` string
  - `timezone` string
  - `status` 'draft' | 'active' | 'paused' | 'archived'
  - `conditions` Schema0Input — unresolved $ref

## Response `200`

Default Response

- object
  - `metadata` object, required
    - `success` boolean, required — True when the request succeeded.
  - `data` object, required
    - `id` string, required
    - `companyId` string, required
    - `name` string, required
    - `description` string, required
    - `resourceType` string, required
    - `status` 'draft' | 'active' | 'paused' | 'archived', required
    - `workflowId` string, required
    - `workflowKey` string, required
    - `triggerCron` string, required
    - `timezone` string, required
    - `nextRunAt` string, required
    - `lastRunAt` string, required
    - `rootGroupId` string, required
    - `conditions` Schema0, required — unresolved $ref
    - `createdAt` string, required
    - `updatedAt` string, required

## Other responses

- `400` — Default Response
- `401` — Default Response
- `403` — Default Response
- `404` — Default Response

---

[API](https://skmtc.net/retraced/apis/api-reference.md) · [All operations](https://skmtc.net/retraced/apis/api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/retraced/api-reference/revisions/60d6c901bc4e/schema)
