Skip to content

Braze

Braze is a customer engagement platform used to orchestrate cross-channel messaging campaigns and analyze customer behavior.

ingestr supports Braze as a source.

URI format

braze://?api_key=<rest-api-key>&endpoint=<rest-endpoint>

URI parameters:

  • api_key is a Braze REST API key with access to the relevant export endpoints. You can create one in the Braze dashboard under Settings → APIs and Identifiers.
  • endpoint is your instance's REST endpoint host, e.g. rest.iad-01.braze.com. Braze is multi-instance, so the host depends on which cluster your account is on — find it in the dashboard or in the API overview. The https:// scheme is optional.

Here's a sample command that copies campaigns from Braze into a DuckDB database:

sh
ingestr ingest \
  --source-uri "braze://?api_key=YOUR_REST_API_KEY&endpoint=rest.iad-01.braze.com" \
  --source-table "campaigns" \
  --dest-uri duckdb:///braze.duckdb \
  --dest-table "public.campaigns"

Tables

Braze source allows ingesting the following resources into separate tables:

TablePKInc KeyInc StrategyDetails
campaignsidlast_editedmergeMarketing campaigns (including archived) with their name, tags, and API flags.
canvasesidlast_editedmergeCanvas (journey) definitions (including archived) with their name and tags.
segmentsidreplaceAudience segments with their name and analytics-tracking flag.
eventsnamereplaceCustom events catalog: name, description, status, tags, and analytics-report flag.
productsproduct_idreplaceProduct IDs seen in purchase events.
kpi_dautimetimemergeDaily active users by date.
kpi_mautimetimemergeMonthly active users (rolling 30-day) by date.
kpi_new_userstimetimemergeNew users by date.
kpi_uninstallstimetimemergeApp uninstalls by date.
event_seriestime, event_nametimemergeDaily occurrence count per custom event. Fetches all events by default; an optional event_series:<name>[,<name>] filter limits it.
segment_seriestime, segment_idtimemergeDaily size per segment. Fetches all segments by default; an optional segment_series:<id>[,<id>] filter limits it.
campaign_seriestime, campaign_idtimemergeDaily per-campaign stats (conversions, revenue, unique recipients; per-channel detail in a messages column). Fetches all campaigns by default; an optional campaign_series:<id>[,<id>] filter limits it.
canvas_seriestime, canvas_idtimemergeDaily per-canvas (journey) stats (entries, conversions, revenue). Fetches all canvases by default; an optional canvas_series:<id>[,<id>] filter limits it.
sessionstimetimemergeDaily session count.
purchase_quantitytimetimemergeDaily total number of purchases.
purchase_revenuetimetimemergeDaily total revenue.
user_databraze_id, segment_idreplaceSegment users with their email/push subscription state and profile fields (a point-in-time snapshot). Exports all segments by default; an optional user_data:<id>[,<id>] filter limits it.

Use these as the --source-table parameter in the ingestr ingest command.

User data

The user_data table exports the users of one or more segments along with their subscription state. By default it exports every segment; pass a comma-separated list of segment ids as a suffix to limit it:

--source-table "user_data"                                  # all segments
--source-table "user_data:<segment_id>"                     # one segment
--source-table "user_data:<segment_id_1>,<segment_id_2>"    # specific segments

You can find segment ids by ingesting the segments table (its id column) or in the Braze dashboard. Each run produces a fresh full snapshot, and every row is tagged with the segment_id it came from (so the same user can appear under multiple segments). Exported fields include the subscription state (email_subscribe, push_subscribe, plus the opt-in/unsubscribe timestamps Braze returns automatically alongside them), identifiers (braze_id, external_id, email, phone), profile fields (name, country, language, time zone, …), and per-product purchases.

WARNING

Exporting all segments runs one async export per segment and can produce a very large, heavily duplicated dataset (the same user appears in every segment they belong to). Prefer naming the specific segments you need.

Per-app KPIs

By default the kpi_* tables aggregate across all apps in the workspace. To break a KPI down by app, append a comma-separated list of app identifiers (found in the Braze dashboard under Settings → APIs and Identifiers) to the table name:

--source-table "kpi_dau:app-one-id,app-two-id"

Each row is then tagged with an app_id column. This is only supported on kpi_* tables.

Incremental loading

campaigns, canvases, and the kpi_* tables load incrementally — use --interval-start and --interval-end to limit the data to a time range. When no interval is provided, the list tables fetch all records and the KPI tables fetch the most recent 100 days. The segments, events, and products tables are always fully refreshed.