Skip to main content
POST
/
v1
/
triggers
Create a trigger event (deterministic)
curl --request POST \
  --url https://brew.new/api/v1/triggers \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "title": "User Signed Up",
  "description": "Fires when a user completes signup.",
  "payloadSchema": {
    "type": "object",
    "fields": [
      {
        "key": "email",
        "type": "string",
        "required": true
      },
      {
        "key": "firstName",
        "type": "string",
        "required": false
      }
    ]
  }
}
'
{
  "triggers": [
    {
      "triggerEventId": "<string>",
      "title": "<string>",
      "payloadSchema": {
        "type": "object",
        "fields": [
          {
            "key": "<string>",
            "required": true,
            "fallbackValue": "<string>"
          }
        ]
      },
      "createdAt": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z",
      "description": "<string>",
      "providerEventKey": "<string>"
    }
  ],
  "pagination": {
    "limit": 50,
    "cursor": "<string>",
    "hasMore": true
  }
}

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
title
string
required
Required string length: 1 - 120
payloadSchema
object
required
description
string
Maximum string length: 2000

Response

Created. Returns the uniform { triggers: [row] } envelope (single-element array of the created row).

triggers
object[]
required
pagination
object