Select spec version:

Braze Destination Config Reference Beta

Complete Rudder CLI reference for the Braze destination config keys, API and app identifier keys, cloud, device, and hybrid mode settings, and secrets.
Available Plans
  • free
  • growth
  • enterprise

Braze is a customer engagement destination. RudderStack sends events to Braze’s REST API from its servers, loads Braze’s own SDKs in device mode, or combines the two in hybrid mode.

In a Braze destination spec:

  • type: braze
  • definition_version: 1

Sample configuration

yaml
version: rudder/v1
kind: destination
metadata:
  name: braze-prod
spec:
  id: braze-prod
  display_name: Braze Production
  type: braze
  definition_version: 1
  enabled: true
  config:
    data_center: US-03
    rest_api_key: "{{ .BRAZE_REST_API_KEY }}"
    use_platform_specific_api_keys: false
    app_key: "{{ .BRAZE_APP_KEY }}"

    enable_subscription_group_in_group_call: false
    enable_nested_array_operations: false
    send_purchase_event_with_extra_properties: false
    use_ecommerce_recommended_events: true
    support_dedup: true

    enable_braze_logging:
      web: false
    enable_push_notification:
      web: true
    allow_user_supplied_javascript:
      web: false
    track_anonymous_user:
      web: true

    connection_mode:
      web: hybrid
      ios_swift: device
      cloud: cloud
    consent_management:
      web:
        - provider: oneTrust
          consents:
            - marketing

The above example uses one app identifier key for every platform. Because some sources connect in device or hybrid mode and others in cloud or hybrid, it needs both app_key and rest_api_key — see Key dependencies.

Config keys

config accepts only the keys listed below. The shared config key rules cover unknown keys, defaults, and immutability.

Key dependencies

Which keys Braze needs depends on the modes your sources connect in. Rudder CLI enforces each requirement below.

KeyRequired when
rest_api_keyAny source connects in cloud or hybrid mode. Also checked per connection — see Connect a source.
app_keyuse_platform_specific_api_keys is false and any source connects in device or hybrid mode
android_api_keyuse_platform_specific_api_keys is true and android, android_kotlin, react_native, or flutter connects in device or hybrid mode
ios_api_keyuse_platform_specific_api_keys is true and ios, ios_swift, react_native, or flutter connects in device or hybrid mode
web_api_keyuse_platform_specific_api_keys is true and web connects in device or hybrid mode
Write use_platform_specific_api_keys out whenever a source connects in device or hybrid mode. When it’s omitted, neither Rudder CLI nor the API asks for app_key or any platform key — so the spec validates and applies, and device mode has no app identifier key to load Braze with.

Connection

data_center

Required

Type: string

Description: Braze data center of your account — visible in your Braze dashboard URL.

Notes:

  • One of US-01 to US-08, EU-01 to EU-03, or AU-01.
  • A {{ path || fallback }} template is accepted in place of a literal.
  • The dashboard defaults this field to US-01. Rudder CLI requires it explicitly.
  • A spec that omits this key fails validation.

rest_api_key

RequiredSecret

Type: string

Description: Braze REST API key, used whenever RudderStack calls Braze from its servers.

Notes:

  • Required when any source connects in cloud or hybrid mode. Leave it unset otherwise.
  • At most 100 characters, and must not contain line breaks.
  • A {{ path || fallback }} template is accepted in place of a literal.
The key needs the users.track permission, among others. See Where can I find the Braze REST API Key?.

App identifier keys

Braze’s SDKs need an app identifier key. Use app_key for every platform, or set use_platform_specific_api_keys: true and give each platform its own key for separate attribution in Braze.

use_platform_specific_api_keys

Type: boolean

Description: Use a separate app identifier key per platform instead of the single app_key. The dashboard marks this setting as beta and defaults it to false.

Notes:

  • Applies when a source connects in device or hybrid mode.
  • Has no default in Rudder CLI — see Key dependencies.

app_key

RequiredSecret

Type: string

Description: Braze default app identifier key, used for every platform.

Notes:

  • Required when use_platform_specific_api_keys is false and any source connects in device or hybrid mode.
  • At most 100 characters, and must not contain line breaks.
  • A {{ path || fallback }} template is accepted in place of a literal.

android_api_key

RequiredSecret

Type: string

Description: App identifier key for Android. React Native and Flutter apps use it for their Android builds.

Notes:

  • Required when use_platform_specific_api_keys is true and android, android_kotlin, react_native, or flutter connects in device or hybrid mode.
  • At most 100 characters, and must not contain line breaks. A template is accepted.

ios_api_key

RequiredSecret

Type: string

Description: App identifier key for iOS. React Native and Flutter apps use it for their iOS builds.

Notes:

  • Required when use_platform_specific_api_keys is true and ios, ios_swift, react_native, or flutter connects in device or hybrid mode.
  • At most 100 characters, and must not contain line breaks. A template is accepted.

web_api_key

RequiredSecret

Type: string

Description: App identifier key for the web SDK.

Notes:

  • Required when use_platform_specific_api_keys is true and web connects in device or hybrid mode.
  • At most 100 characters, and must not contain line breaks. A template is accepted.
The dashboard describes falling back to app_key when a platform key is blank, but Rudder CLI and the API both require each platform key whose condition is met.

Event settings

enable_subscription_group_in_group_call

Type: boolean

Default value: false

Description: Send the subscription group status in group events.

Notes:

  • Applies to cloud mode only.

enable_nested_array_operations

Type: boolean

Default value: false

Description: Use Braze’s nested custom attributes to update custom attribute objects. The dashboard calls this Use Custom Attributes Operation.

Notes:

  • Applies to cloud mode only.

send_purchase_event_with_extra_properties

Type: boolean

Default value: false

Description: Include custom properties in purchase events.

Notes:

  • Applies to cloud mode only.

support_dedup

Type: boolean

Default value: false

Description: Deduplicate traits on identify and track calls, using Braze’s /users/export/ids API to fetch existing attributes. If Braze’s rate limit is hit, RudderStack sends all attributes without deduplicating.

Web SDK settings

These keys configure Braze’s web SDK, so they apply only when connection_mode.web is device or hybrid. Each is an object keyed by web, with a boolean value.

enable_braze_logging

Type: object

Description: Show Braze SDK logs in the browser console.

Notes:

  • web — boolean.

enable_push_notification

Type: object

Description: Use Braze web push notifications. Requires a service worker on your site.

Notes:

  • web — boolean.

allow_user_supplied_javascript

Type: object

Description: Enable HTML in-app messages, which can run JavaScript you supply in Braze.

Notes:

  • web — boolean.

track_anonymous_user

Type: object

Description: Track activity from anonymous users and send it to Braze.

Notes:

  • web — boolean.

Event filtering

Client-side event filtering applies only to sources connected in device mode — the dashboard shows these controls only then, and the SDK is what applies the filter. Rudder CLI accepts the block in any mode, but it has no effect on cloud-mode events, or on the events hybrid mode sends through the API.

event_filtering

Type: object

Description: Restricts which track events the SDK passes to Braze, by event name.

Notes:

  • whitelist — array of event names to allow; every other track event is dropped.
  • blacklist — array of event names to drop; every other track event is allowed.
  • The two are mutually exclusive, and Rudder CLI enforces it — setting both fails validation.
  • Each name is at most 100 characters, or a {{ path || fallback }} template.

Per-source keys

Both keys are objects keyed by the local source type — the tokens listed under Source types. A key naming a source type this destination doesn’t support fails validation.

connection_mode

Type: object

Description: Maps each source type you connect to the mode its events reach Braze in, using the modes in Source types. It also decides which API and app identifier keys are required.

Notes:

  • An entry is required for each source type you connect — see Connect a source.
  • A mode the source type doesn’t support on this destination fails validation — for example hybrid for react_native.
yaml
connection_mode:
  web: hybrid
  ios_swift: device
  react_native: device
  cloud: cloud

Source types

Braze accepts events from these source types in the mentioned connection modes:

Source typeConnection mode
androidcloud, device, hybrid
android_kotlincloud, device, hybrid
ioscloud, device, hybrid
ios_swiftcloud, device, hybrid
webcloud, device, hybrid
unitycloud
cloudcloud
react_nativecloud, device
fluttercloud, device
cordovacloud

In hybrid mode, RudderStack sends every user-generated event — identify, track, page, screen, group, and alias — through Braze’s REST API, and loads Braze’s SDK only for what needs it, such as in-app messages and push notifications. See Braze hybrid mode.

react_native and flutter device mode covers their Android and iOS builds only. A Flutter app deployed to the web can reach Braze in cloud mode only.

The dashboard additionally offers Braze to AMP, Shopify, and Reverse ETL sources. Rudder CLI doesn’t manage those connections, so amp, shopify, and warehouse are invalid here.

Connect a source

An event stream connection to this destination is checked against three rules at validate time.

The source’s type must be supported. A source’s type resolves to one of the tokens above before the check — a JavaScript source resolves to web, and webhook and server-side SDK sources resolve to cloud. An unsupported type reports:

destination 'braze-prod' (type 'braze') does not support source 'my-source':
source type 'amp' is not among supported source types: android, android_kotlin, ...

The destination config must carry a connection_mode entry for that source type. This lives on the destination spec, not on the connection spec. Without it:

destination 'braze-prod' config has no 'connection_mode' entry for source type 'web'

A source connecting in cloud or hybrid mode needs rest_api_key. Device-mode connections don’t. Without it:

destination 'braze-prod' config is missing fields required to connect a 'cloud' source: rest_api_key

The app identifier keys aren’t checked per connection — they’re covered by the destination-level rules in Key dependencies.

Secrets

Rudder CLI treats five keys as secrets: rest_api_key, app_key, android_api_key, ios_api_key, and web_api_key. Write each one you use as a {{ .VAR }} reference and supply the value at apply time:

yaml
config:
  rest_api_key: "{{ .BRAZE_REST_API_KEY }}"
  app_key: "{{ .BRAZE_APP_KEY }}"
bash
export RUDDER_BRAZE_REST_API_KEY="..."
export RUDDER_BRAZE_APP_KEY="..."
rudder-cli apply

# or
rudder-cli apply --var-file secrets.vars.yaml

Note that:

  • The YAML that rudder-cli import writes may or may not include secret keys. Before you apply, make sure every secret key your configuration needs is present and populated through variable substitution.
  • In device and hybrid mode the app identifier keys are embedded in the app or page, so masking them protects your YAML, not the values themselves.

See How to Use Variable Substitution in Rudder CLI.

See more

Questions? Let's figure it out together.

Join the RudderStack Slack community to connect with other users, customers, and the RudderStack team — or reach out for direct support.