curl --request GET \
--url https://brew.new/api/v1/automations/triggers/{triggerEventId}/readiness \
--header 'Authorization: Bearer <token>'import requests
url = "https://brew.new/api/v1/automations/triggers/{triggerEventId}/readiness"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://brew.new/api/v1/automations/triggers/{triggerEventId}/readiness', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://brew.new/api/v1/automations/triggers/{triggerEventId}/readiness",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://brew.new/api/v1/automations/triggers/{triggerEventId}/readiness"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://brew.new/api/v1/automations/triggers/{triggerEventId}/readiness")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://brew.new/api/v1/automations/triggers/{triggerEventId}/readiness")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"triggerEventId": "user_signed_up",
"ready": true,
"blockers": [],
"title": "User Signed Up",
"provider": "brew_api",
"payloadSchema": {
"type": "object",
"fields": [
{
"key": "email",
"type": "string",
"required": true
},
{
"key": "firstName",
"type": "string",
"required": false
}
]
},
"endpoint": "/v1/automations/triggers/user_signed_up/fire",
"publishedAutomations": [
{
"automationId": "M3nRk8LqW2xT5vBp9YcZd",
"name": "Welcome flow"
}
],
"counts": {
"automations": 1,
"skipped": 0
}
}Check a trigger is ready to fire
Reports whether a fire would start anything right now, and everything a caller needs to wire one. Runs the same credential, brand scope and permission gates a real fire hits, without firing.
Use when wiring an external service, before sending a live event.
Returns 200 { ready, blockers[], payloadSchema, endpoint, publishedAutomations, counts }. A NO_PUBLISHED_AUTOMATION blocker with ready: false means the trigger resolves and the credential passes, but nothing published listens for it yet, so a fire would start no runs. That stays a 200 because a probe has to report why a fire would not work.
Errors 404 TRIGGER_EVENT_NOT_FOUND for an unknown or cross-brand id.
See also fireTrigger, getTriggerContract, listTriggers.
curl --request GET \
--url https://brew.new/api/v1/automations/triggers/{triggerEventId}/readiness \
--header 'Authorization: Bearer <token>'import requests
url = "https://brew.new/api/v1/automations/triggers/{triggerEventId}/readiness"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://brew.new/api/v1/automations/triggers/{triggerEventId}/readiness', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://brew.new/api/v1/automations/triggers/{triggerEventId}/readiness",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://brew.new/api/v1/automations/triggers/{triggerEventId}/readiness"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://brew.new/api/v1/automations/triggers/{triggerEventId}/readiness")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://brew.new/api/v1/automations/triggers/{triggerEventId}/readiness")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"triggerEventId": "user_signed_up",
"ready": true,
"blockers": [],
"title": "User Signed Up",
"provider": "brew_api",
"payloadSchema": {
"type": "object",
"fields": [
{
"key": "email",
"type": "string",
"required": true
},
{
"key": "firstName",
"type": "string",
"required": false
}
]
},
"endpoint": "/v1/automations/triggers/user_signed_up/fire",
"publishedAutomations": [
{
"automationId": "M3nRk8LqW2xT5vBp9YcZd",
"name": "Welcome flow"
}
],
"counts": {
"automations": 1,
"skipped": 0
}
}Authorizations
Send your Brew API key as Authorization: Bearer brew_xxx.
Headers
The brand this request acts on. REQUIRED for organization-scoped credentials (otherwise 400 BRAND_ID_REQUIRED — there is no default brand); list ids with GET /v1/brands. Brand-scoped credentials may omit it, and sending a different brand returns 403 BRAND_SCOPE_MISMATCH. A brand outside your organization returns 404 BRAND_NOT_FOUND.
1 - 64Path Parameters
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).
1 - 256"user_signed_up"
Response
The readiness report: whether a fire would start runs, and everything needed to wire the caller.
1 - 256True when a fire right now would start at least one run.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
The fire URL to POST events to.
Was this page helpful?