curl --request GET \
--url https://brew.new/api/v1/analytics/events \
--header 'Authorization: Bearer <token>'import requests
url = "https://brew.new/api/v1/analytics/events"
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/analytics/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/analytics/events",
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/analytics/events"
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/analytics/events")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://brew.new/api/v1/analytics/events")
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{
"data": [
{
"id": "evt_abc",
"occurredAt": "2026-04-08T12:34:56.789Z",
"domain": "email",
"eventType": "opened",
"recipientEmail": "jane@example.com",
"sendId": "snd_8fK2mQ4p",
"emailId": "eml_launch",
"emailName": "Spring Launch"
}
],
"pagination": {
"limit": 50,
"cursor": null,
"hasMore": false
},
"range": {
"from": "2026-04-01T12:34:56.789Z",
"to": "2026-04-08T12:34:56.789Z"
}
}{
"error": {
"code": "INVALID_REQUEST",
"type": "invalid_request",
"message": "Request validation failed.",
"suggestion": "Fix the field reported in `param` and retry.",
"docs": "https://docs.brew.new/api-reference/api/errors",
"param": "eventType"
}
}{
"error": {
"code": "INVALID_API_KEY",
"type": "authentication_error",
"message": "The provided API key is invalid.",
"suggestion": "Check the API key format and retry with a valid active key.",
"docs": "https://docs.brew.new/api-reference/api/authentication"
}
}{
"error": {
"code": "INSUFFICIENT_PERMISSIONS",
"type": "authorization_error",
"message": "The caller does not have the required permission.",
"suggestion": "Use an API key or session with the required permission.",
"docs": "https://docs.brew.new/api-reference/api/authentication",
"param": "emails"
}
}{
"error": {
"code": "RATE_LIMITED",
"type": "rate_limit",
"message": "Too many requests.",
"suggestion": "Wait for the retry window before sending another request.",
"docs": "https://docs.brew.new/api-reference/api/rate-limits",
"retryAfter": 42
}
}{
"error": {
"code": "INTERNAL_ERROR",
"type": "internal_error",
"message": "An unexpected error occurred.",
"suggestion": "Retry the request. If it keeps failing, contact support.",
"docs": "https://docs.brew.new/api-reference/api/errors"
}
}Unified events feed
Read-only window over the brand’s analytics events across domains (email, automation, trigger, inbound). Defaults to the last 7 days. Equality filters: recipientEmail, eventType, automationId, sendId (join back to /v1/analytics/sends?sendId=), messageClass (marketing | transactional — same event object; absent stamps match as marketing). Recipient rules — recipient (csv, ≤10): a full address matches exactly, @domain matches everyone on that domain, any other text matches as a substring, and a ! prefix excludes (recipient=@clay.com,!ceo@clay.com = clay recipients except the CEO); includes OR together, excludes always apply. Send-object facets — source (csv of send sources), audienceId (csv, ≤20), emailId (design), domain (sending domain), triggerEventId (csv, ≤10 — integration trigger-events resolved to their wired automations), messageClass: when ANY facet or recipient rule is present the feed narrows to EMAIL events only and each row is enriched with sendSource + sendContext + messageClass (plus triggerProvider/triggerTitle on integration/custom-triggered rows). Overview/insights collect transactional-class events like any other email event. Machine/bot-classified clicked AND opened rows (scanner detonation, Apple-proxy prefetch) are EXCLUDED by default (matching /v1/analytics/overview); pass includeMachineClicks=true / includeMachineOpens=true to include the raw rows (audit/debug only). Cursor pagination — pass pagination.cursor back as ?cursor=; loop while (cursor !== null). Requires the emails scope.
curl --request GET \
--url https://brew.new/api/v1/analytics/events \
--header 'Authorization: Bearer <token>'import requests
url = "https://brew.new/api/v1/analytics/events"
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/analytics/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/analytics/events",
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/analytics/events"
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/analytics/events")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://brew.new/api/v1/analytics/events")
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{
"data": [
{
"id": "evt_abc",
"occurredAt": "2026-04-08T12:34:56.789Z",
"domain": "email",
"eventType": "opened",
"recipientEmail": "jane@example.com",
"sendId": "snd_8fK2mQ4p",
"emailId": "eml_launch",
"emailName": "Spring Launch"
}
],
"pagination": {
"limit": 50,
"cursor": null,
"hasMore": false
},
"range": {
"from": "2026-04-01T12:34:56.789Z",
"to": "2026-04-08T12:34:56.789Z"
}
}{
"error": {
"code": "INVALID_REQUEST",
"type": "invalid_request",
"message": "Request validation failed.",
"suggestion": "Fix the field reported in `param` and retry.",
"docs": "https://docs.brew.new/api-reference/api/errors",
"param": "eventType"
}
}{
"error": {
"code": "INVALID_API_KEY",
"type": "authentication_error",
"message": "The provided API key is invalid.",
"suggestion": "Check the API key format and retry with a valid active key.",
"docs": "https://docs.brew.new/api-reference/api/authentication"
}
}{
"error": {
"code": "INSUFFICIENT_PERMISSIONS",
"type": "authorization_error",
"message": "The caller does not have the required permission.",
"suggestion": "Use an API key or session with the required permission.",
"docs": "https://docs.brew.new/api-reference/api/authentication",
"param": "emails"
}
}{
"error": {
"code": "RATE_LIMITED",
"type": "rate_limit",
"message": "Too many requests.",
"suggestion": "Wait for the retry window before sending another request.",
"docs": "https://docs.brew.new/api-reference/api/rate-limits",
"retryAfter": 42
}
}{
"error": {
"code": "INTERNAL_ERROR",
"type": "internal_error",
"message": "An unexpected error occurred.",
"suggestion": "Retry the request. If it keeps failing, contact support.",
"docs": "https://docs.brew.new/api-reference/api/errors"
}
}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 - 64Query Parameters
CSV of recipient rules (max 10) matching who RECEIVED the email: a full address matches exactly, @domain matches the domain, any other text matches as a substring; prefix ! to exclude (e.g. @clay.com,!ceo@clay.com). Includes OR together; excludes always apply. Narrows the feed to email events.
1 - 20481 - 641 - 641 - 64Admission snapshot on the send behind the event (marketing | transactional). Same event object for both classes; absent stamps match as marketing. Narrows the feed to email events.
marketing, transactional Send-object facet: CSV of send sources (valid values: audience, api, automation_manual, automation_integration, automation_custom). Narrows the feed to email events.
1 - 256Send-object facet: CSV of audience ids (max 20) — events from the audiences' sends. Narrows the feed to email events.
1 - 2048Send-object facet: one email design id. Narrows the feed to email events.
1 - 64Send-object facet: a sending domain (fromEmail match). Narrows the feed to email events.
1 - 255Send-object facet: CSV of integration trigger-event ids (max 10), resolved to their wired automations. Narrows the feed to email events.
1 - 2048Machine/bot-classified clicked rows are excluded by default. Pass true to include the raw rows (they carry machineGenerated: true + a clickBotReason; audit/debug only).
Machine/bot-classified opened rows (security-scanner pixel detonation, Apple-proxy prefetch) and still-classifying opens are excluded by default. Pass true to include the raw rows (they carry machineGenerated + an openBotReason and openFetchSource; audit/debug only).
1 <= x <= 1001 - 8192Was this page helpful?