Skip to main content
POST
/
v1
/
automations
/
triggers
/
{triggerEventId}
/
fire
Fire a trigger
curl --request POST \
  --url https://brew.new/api/v1/automations/triggers/{triggerEventId}/fire \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "payload": {
    "email": "jane@example.com",
    "firstName": "Jane"
  }
}
'
{
  "success": true,
  "status": "triggered",
  "code": "TRIGGERED",
  "message": "Trigger event accepted and matched published attachments.",
  "triggerEventId": "tri_signup",
  "receivedAt": "2026-04-08T12:34:56.789Z",
  "details": {
    "resolvedPayload": {
      "email": "jane@example.com",
      "firstName": "Jane"
    },
    "triggerInstanceId": "tin_8f2k",
    "publishedAutomations": [
      {
        "automationId": "auto_abc",
        "title": "Welcome flow"
      }
    ],
    "automationRunIds": [
      "run_01HZ"
    ],
    "counts": {
      "transactionalEmails": 0,
      "automations": 1
    }
  }
}

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

Path Parameters

triggerEventId
string
required

Trigger id returned by POST /v1/automations/triggers. Custom triggers use tri_… ids; integration triggers use composite ids (e.g. clerk:org_…:brand_…:user.created, URL-encode the colons).

Required string length: 1 - 256
Example:

"tri_signup"

Body

application/json
payload
object
required

Event payload — fields and types must match the trigger's payloadSchema. Unknown fields are accepted but reported as unexpected_key warnings.

idempotencyKey
string

Legacy body-field alternative to the Idempotency-Key HTTP header. Prefer the header for new integrations. The token is namespaced server-side with the API key org so different tenants cannot collide.

Required string length: 1 - 100

Response

Fired (status: "triggered") or idempotent replay (status: "idempotent_replay"). details.automationRunIds[] carries one run id per matched published automation.

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