Skip to main content
POST
/
v1
/
automation
/
runs
curl --request POST \
  --url https://brew.new/api/v1/automation/runs \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "triggerEventId": "tri_password_reset",
  "payload": {
    "email": "jane@example.com",
    "resetUrl": "https://app.example.com/reset/abc"
  },
  "idempotencyKey": "reset-jane-2026-04-08"
}
'
{
  "success": true,
  "code": "<string>",
  "message": "<string>",
  "receivedAt": "<string>",
  "triggerEventId": "<string>",
  "details": {
    "resolvedPayload": {},
    "warnings": [
      "<unknown>"
    ],
    "idempotencyKey": "<string>",
    "triggerInstanceId": "<string>",
    "publishedTransactionalEmails": [
      {
        "emailId": "<string>"
      }
    ],
    "publishedAutomations": [
      {
        "automationId": "<string>",
        "title": "<string>"
      }
    ],
    "automationRunIds": [
      "<string>"
    ],
    "counts": {
      "transactionalEmails": 123,
      "automations": 123
    }
  }
}

Authorizations

Authorization
string
header
default:Bearer brew_your_api_key
required

Send your Brew API key as Authorization: Bearer brew_xxx.

Headers

Idempotency-Key
string

Optional idempotency key for safe retries. Reusing the same key with the same request body returns the original response for 24 hours.

Required string length: 1 - 100

Body

application/json
triggerEventId
string
required
Required string length: 1 - 256
payload
object
required
idempotencyKey
string
Required string length: 1 - 100

Response

Idempotent replay — original automationRunIds returned.

success
boolean
required
status
enum<string>
required

Discriminator for the response category. Pairs with code. A trigger with no published automation attached returns status: "failed" + code: "NO_PUBLISHED_AUTOMATION" (HTTP 422). Successful fires always return status: "triggered".

Available options:
triggered,
idempotent_replay,
ready,
invalid_api_key,
invalid_json,
failed,
forbidden,
payload_mismatch,
trigger_event_not_found
code
string
required
message
string
required
receivedAt
string
required

ISO-8601 timestamp the request was processed at.

triggerEventId
string
details
object