Skip to main content
POST
/
v1
/
triggers
Create a trigger
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
      }
    ]
  }
}
'
{
  "triggerEventId": "<string>",
  "title": "<string>",
  "payloadSchema": {
    "fields": [
      {
        "key": "<string>",
        "required": true,
        "fallbackValue": "<string>"
      }
    ]
  },
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "description": "<string>",
  "providerEventKey": "<string>"
}

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.

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 canonical trigger row.

triggerEventId
string
required
Required string length: 1 - 256
title
string
required
Required string length: 1 - 120
provider
enum<string>
required
Available options:
brew_api,
clerk,
stripe,
shopify,
stytch,
supabase,
workos,
revenuecat,
custom
status
enum<string>
required
Available options:
enabled,
disabled
payloadSchema
object
required
createdAt
string<date-time>
required
updatedAt
string<date-time>
required
description
string
Maximum string length: 2000
providerEventKey
string