{"command":{"effect":"write","timeoutSeconds":30,"inputSchema":{"type":"object","description":"Update an automation","properties":{"path":{"type":"object","properties":{"automation_id":{"type":"string","format":"uuid","description":"The ID of the automation."}},"required":["automation_id"],"additionalProperties":false},"body":{"$ref":"#/definitions/PatchAutomationRequest"}},"required":["path"],"additionalProperties":false,"definitions":{"PatchAutomationRequest":{"type":"object","description":"At least one of `name`, `status`, or `steps` and `connections` must be provided. When updating the workflow graph, both `steps` and `connections` must be provided together.\n","properties":{"name":{"type":"string","minLength":1,"description":"The name of the automation."},"status":{"type":"string","enum":["enabled","disabled"],"description":"The status of the automation."},"steps":{"type":"array","minItems":1,"maxItems":150,"description":"The steps that compose the automation workflow. Must be provided together with `connections`.","items":{"$ref":"#/definitions/AutomationStep"}},"connections":{"type":"array","description":"The connections between steps in the automation graph. Must be provided together with `steps`.","items":{"$ref":"#/definitions/AutomationConnection"}}}},"AutomationStep":{"type":"object","description":"A step in an automation workflow. The `config` object varies based on the step `type`.","required":["key","type","config"],"properties":{"key":{"type":"string","description":"A unique key for this step within the automation graph."},"type":{"type":"string","enum":["trigger","send_email","delay","wait_for_event","condition","contact_update","contact_delete","add_to_segment"],"description":"The type of automation step."},"config":{"type":"object","description":"Configuration for the step. Shape depends on `type`: - **trigger**: `{ event_name: string }` - **send_email**: `{ template: { id: string, variables?: object }, subject?: string, from?: string, reply_to?: string }` - **delay**: `{ duration: string }` — a human-readable duration (e.g. `\"30 minutes\"`) - **wait_for_event**: `{ event_name: string, timeout?: string, filter_rule?: object }` — `timeout` is a human-readable duration (e.g. `\"1 hour\"`) - **condition**: A rule tree with `type` (`rule`, `and`, `or`), `field`, `operator`, and `value` - **contact_update**: `{ first_name?: string|object, last_name?: string|object, unsubscribed?: boolean|object, properties?: object }` - **contact_delete**: `{}` - **add_to_segment**: `{ segment_id: string }`\n"}}},"AutomationConnection":{"type":"object","description":"A connection between two steps in the automation graph.","required":["from","to"],"properties":{"from":{"type":"string","description":"The `key` of the source step."},"to":{"type":"string","description":"The `key` of the target step."},"type":{"type":"string","enum":["default","condition_met","condition_not_met","timeout","event_received"],"default":"default","description":"The type of connection. Defaults to `default`."}}}}},"name":"Update an automation","id":"resend.automations.update","example":{"path":{"automation_id":"00000000-0000-4000-8000-000000000000"}},"maxRequests":1,"summary":false}}