Skip to main content
PATCH
/
v1
/
automations
curl --request PATCH \
  --url https://brew.new/api/v1/automations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "automationId": "auto_abc",
  "name": "Renamed",
  "nodes": [
    {
      "id": "trg",
      "label": "On signup",
      "type": "trigger",
      "config": {
        "actionType": "trigger"
      }
    },
    {
      "id": "send_welcome",
      "label": "Welcome",
      "type": "sendEmail",
      "config": {
        "actionType": "sendEmail",
        "emailId": "eml_welcome",
        "emailVersionId": "emv_welcome_v1",
        "domainId": "dom_brand_primary",
        "subject": "Welcome to Brew, {{firstName | there}}!",
        "previewText": "Thanks for signing up — get started in 2 minutes.",
        "fromName": "Brew",
        "replyTo": "support@example.com"
      }
    }
  ],
  "connections": [
    {
      "from": "trg",
      "to": "send_welcome"
    }
  ]
}
'
{
  "automations": [
    {
      "automationId": "<string>",
      "automationVersionId": "<string>",
      "name": "<string>",
      "version": 1,
      "published": true,
      "nodes": [
        {
          "id": "<string>",
          "label": "<string>",
          "config": {
            "actionType": "<string>",
            "triggerEventId": "<string>",
            "eventName": "<string>"
          },
          "description": "<string>"
        }
      ],
      "connections": [
        {
          "from": "<string>",
          "to": "<string>"
        }
      ],
      "emailIds": [
        "<string>"
      ],
      "triggerEventId": "<string>",
      "description": "<string>",
      "createdBy": "<string>",
      "createdByUserId": "<string>",
      "createdAt": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z",
      "publishedAt": "2023-11-07T05:31:56Z",
      "versions": [
        {
          "automationId": "<string>",
          "automationVersionId": "<string>",
          "name": "<string>",
          "version": 1,
          "published": true,
          "nodes": [
            {
              "id": "<string>",
              "label": "<string>",
              "config": {
                "actionType": "<string>",
                "triggerEventId": "<string>",
                "eventName": "<string>"
              },
              "description": "<string>"
            }
          ],
          "connections": [
            {
              "from": "<string>",
              "to": "<string>"
            }
          ],
          "emailIds": [
            "<string>"
          ],
          "triggerEventId": "<string>",
          "description": "<string>",
          "createdBy": "<string>",
          "createdByUserId": "<string>",
          "createdAt": "2023-11-07T05:31:56Z",
          "updatedAt": "2023-11-07T05:31:56Z",
          "publishedAt": "2023-11-07T05:31:56Z"
        }
      ]
    }
  ]
}

Documentation Index

Fetch the complete documentation index at: https://docs.brew.new/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
default:Bearer brew_your_api_key
required

Send your Brew API key as Authorization: Bearer brew_xxx.

Body

application/json
automationId
string
required
Required string length: 1 - 64
name
string
Required string length: 1 - 120
description
string
Maximum string length: 2000
nodes
object[]
connections
object[]
triggerEventId
string
Required string length: 1 - 256
dryRun
boolean

Response

Updated. Returns { automations: [row] } — a one-element list of the updated automation row.

automations
object[]
required