The Entity Map
Two entities are organization-wide: templates (a shared design, addressed byemailId) and usage. Everything else belongs to one brand. A brand-scoped API
key names its brand implicitly; an organization-scoped key names it per call
with X-Brand-Id. See
Organization and brand scope.
What Each Entity Holds
- Brand (
brandId): the tenant every other row belongs to. It holds domains, contacts, audiences, designs, triggers, automations, and sends. - Domain (
domainId): a verified sending domain. A send and everysendEmailnode name the domain they deliver from. - Contact (
email): one recipient with its core columns,customFieldskeyed by field name, and an optionalconsentrecord (source,capturedAt,policyVersion,evidence). - Field (
fieldName): the definition behind a custom field, typed once per brand. - Audience (
audienceId, or the literalallon a send for every subscribed contact): a saved filter over contacts. Launching a manual-audience automation against one produces an audience run (audienceRunId). - Email (
emailId): a design and its versions (emailVersionId), filed under a group (groupId, orungrouped). - Trigger (
triggerEventId): a named event your systems fire. Its payload contract (contractHash,version,enforcement) validates each fire, and each fire is recorded as a trigger instance (triggerInstanceId) that lists the runs it started. - Automation (
automationId): the graph, versioned (automationVersionId;liveAutomationVersionIdis the version that runs). EachsendEmailnode (nodeId) pins anemailId, anemailVersionId, and adomainId. - Automation run (
automationRunId): one execution of one automation for one recipient. It carries the version it ran, itsdefinitionHash, thetriggerInstanceIdthat started it, and per-nodelogs. - Send (
sendId): the unit of delivery.kind: campaignrows carryemailId,emailVersionId,domainId, and the audience or inline recipients.kind: automationrows addautomationId,nodeId, andautomationRunId, plustriggerInstanceIdwhen a fire started the run oraudienceRunIdwhen a manual-audience launch did. - Event: one delivery or engagement event, stamped with the send, design, automation, node, run, fire, and audience run it belongs to.
Identifiers
Treat every identifier as opaque. Prefixes such as
as_, arn_, arun_,
tin_, and grp_ are stable, but they are not a contract to parse: the
kind field on a send row says what kind of send it is.
From a Fire to an Inbox
The join keys above let you follow one event end to end:POST /v1/automations/triggers/{triggerEventId}/fireanswers with atriggerInstanceIdand theautomationRunIdsit started.GET /v1/automations/trigger-instances/{triggerInstanceId}shows the fire’sstateand the same run ids;GET /v1/automations/runs/{automationRunId}?include=logsshows one run node by node.GET /v1/sends?automationRunId={automationRunId}lists that run’s per-recipient sends (kind: automation), each with itsnodeIdandtriggerInstanceId.GET /v1/sends/{sendId}?include=eventsreads one send with its recipient events, andGET /v1/analytics/events?automationRunId={automationRunId}reads every event the run produced.
POST /v1/sends returns the
sendId, GET /v1/sends?emailId={emailId} lists the sends of one design, and
the same include=events read applies.
See Also
- Pagination for the list envelope every collection shares.
- Errors for the
*_NOT_FOUNDcode each identifier answers with. - Migrate to the new v1 surface if you knew the pre-cleanup spellings.
Need Help?
Our team is ready to support you at every step of your journey with Brew. Choose the option that works best for you:- Self-Service Tools
- Talk to Our Team
Search Documentation
Type in the “Ask any question” search bar at the top left to instantly find relevant documentation pages.
ChatGPT/Claude Integration
Click “Open in ChatGPT” at the top right of any page to explore it further with ChatGPT or Claude.