curl --request POST \
--url https://brew.new/api/v1/automations/triggers/integration-events \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"eventId": "k5714pq3vm8x2n6c9d0b7f1h4j6g2r8t"
}
'import requests
url = "https://brew.new/api/v1/automations/triggers/integration-events"
payload = { "eventId": "k5714pq3vm8x2n6c9d0b7f1h4j6g2r8t" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({eventId: 'k5714pq3vm8x2n6c9d0b7f1h4j6g2r8t'})
};
fetch('https://brew.new/api/v1/automations/triggers/integration-events', 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/integration-events",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'eventId' => 'k5714pq3vm8x2n6c9d0b7f1h4j6g2r8t'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://brew.new/api/v1/automations/triggers/integration-events"
payload := strings.NewReader("{\n \"eventId\": \"k5714pq3vm8x2n6c9d0b7f1h4j6g2r8t\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://brew.new/api/v1/automations/triggers/integration-events")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"eventId\": \"k5714pq3vm8x2n6c9d0b7f1h4j6g2r8t\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://brew.new/api/v1/automations/triggers/integration-events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"eventId\": \"k5714pq3vm8x2n6c9d0b7f1h4j6g2r8t\"\n}"
response = http.request(request)
puts response.read_body{
"triggerEventId": "posthog:org_2abc:brand_9xyz:ev_3f1c9b2e7a4d8c06b5e1f2a3",
"title": "created_project",
"provider": "posthog",
"providerEventKey": "created_project",
"payloadSchema": {
"type": "object",
"fields": [
{
"key": "email",
"type": "string",
"required": true
}
]
},
"createdAt": "2026-10-26T12:00:00.000Z",
"updatedAt": "2026-10-26T12:00:00.000Z",
"propertiesStatus": "current",
"created": false
}Get or create an integration event trigger
Returns the trigger for one live integration event, creating it the first time: an event a connected live source sends, such as a PostHog project’s own events or the Stripe and Shopify app catalogs.
Use when an automation should start on such an event. Find it with listIntegrationEvents; read its variables with describeIntegrationEvent.
Input { eventId } from listIntegrationEvents. Never compose an id from a provider and an event name.
Returns 201 with the new trigger row, or 200 with the existing one (created: false). The same event always returns the same trigger, across reconnects of the same account. Brew owns its title and payload contract. The provider starts sending the event once an automation using it is published; saving a draft changes nothing upstream. An event listed bare, or described more than a day ago, is first described at the provider on the account’s read budget, so payloadSchema carries its properties; propertiesStatus says when the provider could not be read (rate_limited with retryAfterSeconds, stored or unavailable).
Errors 404 INTEGRATION_EVENT_NOT_FOUND for an unknown or cross-brand eventId; 404 NOT_FOUND when the event left its source between the read and the write; 409 INTEGRATION_RECONNECT_REQUIRED when a catalog event’s trigger was removed with its connection (reconnect the integration); 409 TRIGGER_LIMIT_REACHED when the brand already holds the maximum number of triggers.
See also listIntegrationEvents, describeIntegrationEvent, createAutomation.
curl --request POST \
--url https://brew.new/api/v1/automations/triggers/integration-events \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"eventId": "k5714pq3vm8x2n6c9d0b7f1h4j6g2r8t"
}
'import requests
url = "https://brew.new/api/v1/automations/triggers/integration-events"
payload = { "eventId": "k5714pq3vm8x2n6c9d0b7f1h4j6g2r8t" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({eventId: 'k5714pq3vm8x2n6c9d0b7f1h4j6g2r8t'})
};
fetch('https://brew.new/api/v1/automations/triggers/integration-events', 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/integration-events",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'eventId' => 'k5714pq3vm8x2n6c9d0b7f1h4j6g2r8t'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://brew.new/api/v1/automations/triggers/integration-events"
payload := strings.NewReader("{\n \"eventId\": \"k5714pq3vm8x2n6c9d0b7f1h4j6g2r8t\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://brew.new/api/v1/automations/triggers/integration-events")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"eventId\": \"k5714pq3vm8x2n6c9d0b7f1h4j6g2r8t\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://brew.new/api/v1/automations/triggers/integration-events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"eventId\": \"k5714pq3vm8x2n6c9d0b7f1h4j6g2r8t\"\n}"
response = http.request(request)
puts response.read_body{
"triggerEventId": "posthog:org_2abc:brand_9xyz:ev_3f1c9b2e7a4d8c06b5e1f2a3",
"title": "created_project",
"provider": "posthog",
"providerEventKey": "created_project",
"payloadSchema": {
"type": "object",
"fields": [
{
"key": "email",
"type": "string",
"required": true
}
]
},
"createdAt": "2026-10-26T12:00:00.000Z",
"updatedAt": "2026-10-26T12:00:00.000Z",
"propertiesStatus": "current",
"created": false
}Authorizations
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 - 64Body
Response
The trigger already existed for this event.
current: listed with the event or read in the last day. stored: the provider could not be read now; these are its last description. rate_limited: its read budget is spent; these are what Brew stored, possibly none (read again after retryAfterSeconds). unavailable: not read, and none stored.
current, stored, rate_limited, unavailable Was this page helpful?