# Braze Destination Config Reference

<p><a href="https://www.rudderstack.com/docs/destinations/streaming-destinations/braze/setup-guide/" >Braze</a> is a customer engagement destination. RudderStack sends events to Braze&rsquo;s REST API from its servers, loads Braze&rsquo;s own SDKs in device mode, or combines the two in hybrid mode.</p>
<p>In a Braze destination spec:</p>
<ul>
<li><code>type: braze</code></li>
<li><code>definition_version: 1</code></li>
</ul>
<!-- end-chunk -->
<!-- begin-chunk -->
<h2 id="sample-configuration">Sample configuration</h2><div class="rs-code">
  <div class="rs-code__head">yaml<button class="rs-code__copy" type="button">
      
      Copy
    </button>
  </div>
  <div class="highlight"><pre class="chroma"><code class="language-yaml" data-lang="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: &#34;{{ .BRAZE_REST_API_KEY }}&#34;
    use_platform_specific_api_keys: false
    app_key: &#34;{{ .BRAZE_APP_KEY }}&#34;

    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</code></pre></div>
</div>
<p>The above example uses one app identifier key for every platform. Because some sources connect in <code>device</code> or <code>hybrid</code> mode and others in <code>cloud</code> or <code>hybrid</code>, it needs both <code>app_key</code> and <code>rest_api_key</code> — see <a href="#key-dependencies" >Key dependencies</a>.</p>
<!-- end-chunk -->
<!-- begin-chunk -->
<h2 id="config-keys">Config keys</h2><p><code>config</code> accepts only the keys listed below. The <a href="https://www.rudderstack.com/docs/dev-tools/rudder-cli/destination-types/#config-key-rules" >shared config key rules</a> cover unknown keys, defaults, and immutability.</p>
<!-- end-chunk -->
<!-- begin-chunk -->
<h3 id="key-dependencies">Key dependencies</h3><p>Which keys Braze needs depends on the modes your sources connect in. Rudder CLI enforces each requirement below.</p>
<table>
<thead>
<tr>
<th>Key</th>
<th>Required when</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>rest_api_key</code></td>
<td>Any source connects in <code>cloud</code> or <code>hybrid</code> mode. Also checked per connection — see <a href="#connect-a-source" >Connect a source</a>.</td>
</tr>
<tr>
<td><code>app_key</code></td>
<td><code>use_platform_specific_api_keys</code> is <code>false</code> and any source connects in <code>device</code> or <code>hybrid</code> mode</td>
</tr>
<tr>
<td><code>android_api_key</code></td>
<td><code>use_platform_specific_api_keys</code> is <code>true</code> and <code>android</code>, <code>android_kotlin</code>, <code>react_native</code>, or <code>flutter</code> connects in <code>device</code> or <code>hybrid</code> mode</td>
</tr>
<tr>
<td><code>ios_api_key</code></td>
<td><code>use_platform_specific_api_keys</code> is <code>true</code> and <code>ios</code>, <code>ios_swift</code>, <code>react_native</code>, or <code>flutter</code> connects in <code>device</code> or <code>hybrid</code> mode</td>
</tr>
<tr>
<td><code>web_api_key</code></td>
<td><code>use_platform_specific_api_keys</code> is <code>true</code> and <code>web</code> connects in <code>device</code> or <code>hybrid</code> mode</td>
</tr>
</tbody>
</table>

<blockquote class="warning">
  <div class="tip-quote">
    
    <div class="tip-text">Write <code>use_platform_specific_api_keys</code> out whenever a source connects in <code>device</code> or <code>hybrid</code> mode. When it&rsquo;s omitted, neither Rudder CLI nor the API asks for <code>app_key</code> or any platform key — so the spec validates and applies, and device mode has no app identifier key to load Braze with.</div>
  </div>
</blockquote>
<!-- end-chunk -->
<!-- begin-chunk -->
<h3 id="connection">Connection</h3><div class="rs-ckeys">
<div class="rs-ckey" id="data_center">
  <div class="rs-ckey__title">
    <p class="rs-ckey__name">data_center</p>Required</div>
  <p class="rs-ckey__field">
    Type:
    <code>string</code>
  </p>
<p class="rs-ckey__field">
  Description:
  <a href="https://www.braze.com/docs/user_guide/data/data_centers/#list-of-data-centers" >Braze data center</a> of your account — visible in your Braze dashboard URL.
</p>

<div class="rs-ckey__notes">
  <p class="rs-ckey__field">Notes:</p>
  <ul>
<li>One of <code>US-01</code> to <code>US-08</code>, <code>EU-01</code> to <code>EU-03</code>, or <code>AU-01</code>.</li>
<li>A <code>{{ path || fallback }}</code> template is accepted in place of a literal.</li>
<li>The dashboard defaults this field to <code>US-01</code>. Rudder CLI requires it explicitly.</li>
<li>A spec that omits this key fails validation.</li>
</ul>

</div>

<div class="rs-ckey__extra">
  See <a href="https://www.rudderstack.com/docs/destinations/streaming-destinations/braze/setup-guide/#supported-braze-data-centers" >Supported Braze data centers</a>.
</div>

</div>

<div class="rs-ckey" id="rest_api_key">
  <div class="rs-ckey__title">
    <p class="rs-ckey__name">rest_api_key</p>RequiredSecret</div>
  <p class="rs-ckey__field">
    Type:
    <code>string</code>
  </p>
<p class="rs-ckey__field">
  Description:
  Braze REST API key, used whenever RudderStack calls Braze from its servers.
</p>

<div class="rs-ckey__notes">
  <p class="rs-ckey__field">Notes:</p>
  <ul>
<li>Required when any source connects in <code>cloud</code> or <code>hybrid</code> mode. Leave it unset otherwise.</li>
<li>At most 100 characters, and must not contain line breaks.</li>
<li>A <code>{{ path || fallback }}</code> template is accepted in place of a literal.</li>
</ul>

</div>

<div class="rs-ckey__extra">
  The key needs the <code>users.track</code> permission, among others. See <a href="https://www.rudderstack.com/docs/destinations/streaming-destinations/braze/setup-guide/#where-can-i-find-the-braze-rest-api-key" >Where can I find the Braze REST API Key?</a>.
</div>

</div>

</div>

<!-- end-chunk -->
<!-- begin-chunk -->
<h3 id="app-identifier-keys">App identifier keys</h3><p>Braze&rsquo;s SDKs need an app identifier key. Use <code>app_key</code> for every platform, or set <code>use_platform_specific_api_keys: true</code> and give each platform its own key for separate attribution in Braze.</p>
<div class="rs-ckeys">
<div class="rs-ckey" id="use_platform_specific_api_keys">
  <div class="rs-ckey__title">
    <p class="rs-ckey__name">use_platform_specific_api_keys</p></div>
  <p class="rs-ckey__field">
    Type:
    <code>boolean</code>
  </p>
<p class="rs-ckey__field">
  Description:
  Use a separate app identifier key per platform instead of the single <code>app_key</code>. The dashboard marks this setting as beta and defaults it to <code>false</code>.
</p>

<div class="rs-ckey__notes">
  <p class="rs-ckey__field">Notes:</p>
  <ul>
<li>Applies when a source connects in <code>device</code> or <code>hybrid</code> mode.</li>
<li>Has no default in Rudder CLI — see <a href="#key-dependencies" >Key dependencies</a>.</li>
</ul>

</div>

</div>

<div class="rs-ckey" id="app_key">
  <div class="rs-ckey__title">
    <p class="rs-ckey__name">app_key</p>RequiredSecret</div>
  <p class="rs-ckey__field">
    Type:
    <code>string</code>
  </p>
<p class="rs-ckey__field">
  Description:
  Braze default app identifier key, used for every platform.
</p>

<div class="rs-ckey__notes">
  <p class="rs-ckey__field">Notes:</p>
  <ul>
<li>Required when <code>use_platform_specific_api_keys</code> is <code>false</code> and any source connects in <code>device</code> or <code>hybrid</code> mode.</li>
<li>At most 100 characters, and must not contain line breaks.</li>
<li>A <code>{{ path || fallback }}</code> template is accepted in place of a literal.</li>
</ul>

</div>

<div class="rs-ckey__extra">
  See <a href="https://www.rudderstack.com/docs/destinations/streaming-destinations/braze/setup-guide/#where-can-i-find-the-braze-default-app-identifier-key" >Where can I find the Braze Default App Identifier Key?</a>.
</div>

</div>

<div class="rs-ckey" id="android_api_key">
  <div class="rs-ckey__title">
    <p class="rs-ckey__name">android_api_key</p>RequiredSecret</div>
  <p class="rs-ckey__field">
    Type:
    <code>string</code>
  </p>
<p class="rs-ckey__field">
  Description:
  App identifier key for Android. React Native and Flutter apps use it for their Android builds.
</p>

<div class="rs-ckey__notes">
  <p class="rs-ckey__field">Notes:</p>
  <ul>
<li>Required when <code>use_platform_specific_api_keys</code> is <code>true</code> and <code>android</code>, <code>android_kotlin</code>, <code>react_native</code>, or <code>flutter</code> connects in <code>device</code> or <code>hybrid</code> mode.</li>
<li>At most 100 characters, and must not contain line breaks. A template is accepted.</li>
</ul>

</div>

</div>

<div class="rs-ckey" id="ios_api_key">
  <div class="rs-ckey__title">
    <p class="rs-ckey__name">ios_api_key</p>RequiredSecret</div>
  <p class="rs-ckey__field">
    Type:
    <code>string</code>
  </p>
<p class="rs-ckey__field">
  Description:
  App identifier key for iOS. React Native and Flutter apps use it for their iOS builds.
</p>

<div class="rs-ckey__notes">
  <p class="rs-ckey__field">Notes:</p>
  <ul>
<li>Required when <code>use_platform_specific_api_keys</code> is <code>true</code> and <code>ios</code>, <code>ios_swift</code>, <code>react_native</code>, or <code>flutter</code> connects in <code>device</code> or <code>hybrid</code> mode.</li>
<li>At most 100 characters, and must not contain line breaks. A template is accepted.</li>
</ul>

</div>

</div>

<div class="rs-ckey" id="web_api_key">
  <div class="rs-ckey__title">
    <p class="rs-ckey__name">web_api_key</p>RequiredSecret</div>
  <p class="rs-ckey__field">
    Type:
    <code>string</code>
  </p>
<p class="rs-ckey__field">
  Description:
  App identifier key for the web SDK.
</p>

<div class="rs-ckey__notes">
  <p class="rs-ckey__field">Notes:</p>
  <ul>
<li>Required when <code>use_platform_specific_api_keys</code> is <code>true</code> and <code>web</code> connects in <code>device</code> or <code>hybrid</code> mode.</li>
<li>At most 100 characters, and must not contain line breaks. A template is accepted.</li>
</ul>

</div>

<div class="rs-ckey__extra">
  The dashboard describes falling back to <code>app_key</code> when a platform key is blank, but Rudder CLI and the API both require each platform key whose condition is met.
</div>

</div>

</div>

<!-- end-chunk -->
<!-- begin-chunk -->
<h3 id="event-settings">Event settings</h3><div class="rs-ckeys">
<div class="rs-ckey" id="enable_subscription_group_in_group_call">
  <div class="rs-ckey__title">
    <p class="rs-ckey__name">enable_subscription_group_in_group_call</p></div>
  <p class="rs-ckey__field">
    Type:
    <code>boolean</code>
  </p><p class="rs-ckey__field">
    Default value:
    <code>false</code>
  </p>
<p class="rs-ckey__field">
  Description:
  Send the subscription group status in <a href="https://www.rudderstack.com/docs/destinations/streaming-destinations/braze/cloud-mode/#group" ><code>group</code></a> events.
</p>

<div class="rs-ckey__notes">
  <p class="rs-ckey__field">Notes:</p>
  <ul>
<li>Applies to <code>cloud</code> mode only.</li>
</ul>

</div>

</div>

<div class="rs-ckey" id="enable_nested_array_operations">
  <div class="rs-ckey__title">
    <p class="rs-ckey__name">enable_nested_array_operations</p></div>
  <p class="rs-ckey__field">
    Type:
    <code>boolean</code>
  </p><p class="rs-ckey__field">
    Default value:
    <code>false</code>
  </p>
<p class="rs-ckey__field">
  Description:
  Use Braze&rsquo;s nested custom attributes to update custom attribute objects. The dashboard calls this <strong>Use Custom Attributes Operation</strong>.
</p>

<div class="rs-ckey__notes">
  <p class="rs-ckey__field">Notes:</p>
  <ul>
<li>Applies to <code>cloud</code> mode only.</li>
</ul>

</div>

<div class="rs-ckey__extra">
  See <a href="https://www.rudderstack.com/docs/destinations/streaming-destinations/braze/cloud-mode/#send-user-traits-as-nested-custom-attributes" >Send user traits as nested custom attributes</a>.
</div>

</div>

<div class="rs-ckey" id="send_purchase_event_with_extra_properties">
  <div class="rs-ckey__title">
    <p class="rs-ckey__name">send_purchase_event_with_extra_properties</p></div>
  <p class="rs-ckey__field">
    Type:
    <code>boolean</code>
  </p><p class="rs-ckey__field">
    Default value:
    <code>false</code>
  </p>
<p class="rs-ckey__field">
  Description:
  Include custom properties in purchase events.
</p>

<div class="rs-ckey__notes">
  <p class="rs-ckey__field">Notes:</p>
  <ul>
<li>Applies to <code>cloud</code> mode only.</li>
</ul>

</div>

</div>

<div class="rs-ckey" id="use_ecommerce_recommended_events">
  <div class="rs-ckey__title">
    <p class="rs-ckey__name">use_ecommerce_recommended_events</p></div>
  <p class="rs-ckey__field">
    Type:
    <code>boolean</code>
  </p><p class="rs-ckey__field">
    Default value:
    <code>true</code>
  </p>
<p class="rs-ckey__field">
  Description:
  Map RudderStack ecommerce <code>track</code> events such as <strong>Product Viewed</strong> and <strong>Order Completed</strong> to Braze&rsquo;s <code>ecommerce.*</code> recommended events. When <code>false</code>, they&rsquo;re sent as legacy custom and purchase events. The dashboard marks this setting as beta.
</p>

<div class="rs-ckey__notes">
  <p class="rs-ckey__field">Notes:</p>
  <ul>
<li>Applies to both <code>cloud</code> and <code>device</code> mode.</li>
</ul>

</div>

<div class="rs-ckey__extra">
  See <a href="https://www.rudderstack.com/docs/destinations/streaming-destinations/braze/recommended-ecommerce-events/" >Braze Recommended Ecommerce Events</a>.
</div>

</div>

<div class="rs-ckey" id="support_dedup">
  <div class="rs-ckey__title">
    <p class="rs-ckey__name">support_dedup</p></div>
  <p class="rs-ckey__field">
    Type:
    <code>boolean</code>
  </p><p class="rs-ckey__field">
    Default value:
    <code>false</code>
  </p>
<p class="rs-ckey__field">
  Description:
  Deduplicate traits on <code>identify</code> and <code>track</code> calls, using Braze&rsquo;s <code>/users/export/ids</code> API to fetch existing attributes. If Braze&rsquo;s rate limit is hit, RudderStack sends all attributes without deduplicating.
</p>

<div class="rs-ckey__extra">
  See <a href="https://www.rudderstack.com/docs/destinations/streaming-destinations/braze/trait-deduplication/" >Braze trait deduplication</a>.
</div>

</div>

</div>

<!-- end-chunk -->
<!-- begin-chunk -->
<h3 id="web-sdk-settings">Web SDK settings</h3><p>These keys configure Braze&rsquo;s web SDK, so they apply only when <code>connection_mode.web</code> is <code>device</code> or <code>hybrid</code>. Each is an object keyed by <code>web</code>, with a boolean value.</p>
<div class="rs-ckeys">
<div class="rs-ckey" id="enable_braze_logging">
  <div class="rs-ckey__title">
    <p class="rs-ckey__name">enable_braze_logging</p></div>
  <p class="rs-ckey__field">
    Type:
    <code>object</code>
  </p>
<p class="rs-ckey__field">
  Description:
  Show Braze SDK logs in the browser console.
</p>

<div class="rs-ckey__notes">
  <p class="rs-ckey__field">Notes:</p>
  <ul>
<li><code>web</code> — boolean.</li>
</ul>

</div>

</div>

<div class="rs-ckey" id="enable_push_notification">
  <div class="rs-ckey__title">
    <p class="rs-ckey__name">enable_push_notification</p></div>
  <p class="rs-ckey__field">
    Type:
    <code>object</code>
  </p>
<p class="rs-ckey__field">
  Description:
  Use Braze <a href="https://www.braze.com/docs/developer_guide/platform_integration_guides/web/push_notifications/integration" >web push notifications</a>. Requires a service worker on your site.
</p>

<div class="rs-ckey__notes">
  <p class="rs-ckey__field">Notes:</p>
  <ul>
<li><code>web</code> — boolean.</li>
</ul>

</div>

</div>

<div class="rs-ckey" id="allow_user_supplied_javascript">
  <div class="rs-ckey__title">
    <p class="rs-ckey__name">allow_user_supplied_javascript</p></div>
  <p class="rs-ckey__field">
    Type:
    <code>object</code>
  </p>
<p class="rs-ckey__field">
  Description:
  Enable HTML in-app messages, which can run JavaScript you supply in Braze.
</p>

<div class="rs-ckey__notes">
  <p class="rs-ckey__field">Notes:</p>
  <ul>
<li><code>web</code> — boolean.</li>
</ul>

</div>

</div>

<div class="rs-ckey" id="track_anonymous_user">
  <div class="rs-ckey__title">
    <p class="rs-ckey__name">track_anonymous_user</p></div>
  <p class="rs-ckey__field">
    Type:
    <code>object</code>
  </p>
<p class="rs-ckey__field">
  Description:
  Track activity from anonymous users and send it to Braze.
</p>

<div class="rs-ckey__notes">
  <p class="rs-ckey__field">Notes:</p>
  <ul>
<li><code>web</code> — boolean.</li>
</ul>

</div>

</div>

</div>

<!-- end-chunk -->
<!-- begin-chunk -->
<h3 id="event-filtering">Event filtering</h3>
<blockquote class="warning">
  <div class="tip-quote">
    
    <div class="tip-text"><a href="https://www.rudderstack.com/docs/sources/event-streams/sdks/event-filtering/" >Client-side event filtering</a> applies only to sources connected in <code>device</code> 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.</div>
  </div>
</blockquote>
<div class="rs-ckeys">
<div class="rs-ckey" id="event_filtering">
  <div class="rs-ckey__title">
    <p class="rs-ckey__name">event_filtering</p></div>
  <p class="rs-ckey__field">
    Type:
    <code>object</code>
  </p>
<p class="rs-ckey__field">
  Description:
  Restricts which <code>track</code> events the SDK passes to Braze, by event name.
</p>

<div class="rs-ckey__notes">
  <p class="rs-ckey__field">Notes:</p>
  <ul>
<li><code>whitelist</code> — array of event names to allow; every other <code>track</code> event is dropped.</li>
<li><code>blacklist</code> — array of event names to drop; every other <code>track</code> event is allowed.</li>
<li>The two are mutually exclusive, and Rudder CLI enforces it — setting both fails validation.</li>
<li>Each name is at most 100 characters, or a <code>{{ path || fallback }}</code> template.</li>
</ul>

</div>

</div>

</div>

<!-- end-chunk -->
<!-- begin-chunk -->
<h3 id="per-source-keys">Per-source keys</h3><p>Both keys are objects keyed by the local source type — the tokens listed under <a href="#source-types" >Source types</a>. A key naming a source type this destination doesn&rsquo;t support fails validation.</p>
<div class="rs-ckeys">
<div class="rs-ckey" id="connection_mode">
  <div class="rs-ckey__title">
    <p class="rs-ckey__name">connection_mode</p></div>
  <p class="rs-ckey__field">
    Type:
    <code>object</code>
  </p>
<p class="rs-ckey__field">
  Description:
  Maps each source type you connect to the mode its events reach Braze in, using the modes in <a href="#source-types" >Source types</a>. It also decides which API and app identifier keys are required.
</p>

<div class="rs-ckey__notes">
  <p class="rs-ckey__field">Notes:</p>
  <ul>
<li>An entry is required for each source type you connect — see <a href="#connect-a-source" >Connect a source</a>.</li>
<li>A mode the source type doesn&rsquo;t support on this destination fails validation — for example <code>hybrid</code> for <code>react_native</code>.</li>
</ul>

</div>

<div class="rs-ckey__extra">
  <div class="rs-code">
  <div class="rs-code__head">yaml<button class="rs-code__copy" type="button">
      
      Copy
    </button>
  </div>
  <div class="highlight"><pre class="chroma"><code class="language-yaml" data-lang="yaml">connection_mode:
  web: hybrid
  ios_swift: device
  react_native: device
  cloud: cloud</code></pre></div>
</div>

</div>

</div>

<div class="rs-ckey" id="consent_management">
  <div class="rs-ckey__title">
    <p class="rs-ckey__name">consent_management</p></div>
  <p class="rs-ckey__field">
    Type:
    <code>object</code>
  </p>
<p class="rs-ckey__field">
  Description:
  Consent provider configuration per source type. The entry shape, accepted providers, and the rules on <code>resolution_strategy</code> and <code>consents</code> are shared across all destination types — see <a href="https://www.rudderstack.com/docs/dev-tools/rudder-cli/destination-types/#consent-management" >Consent management</a>.
</p>

</div>

</div>

<!-- end-chunk -->
<!-- begin-chunk -->
<h2 id="source-types">Source types</h2><p>Braze accepts events from these source types in the mentioned connection modes:</p>
<table>
<thead>
<tr>
<th>Source type</th>
<th>Connection mode</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>android</code></td>
<td><code>cloud</code>, <code>device</code>, <code>hybrid</code></td>
</tr>
<tr>
<td><code>android_kotlin</code></td>
<td><code>cloud</code>, <code>device</code>, <code>hybrid</code></td>
</tr>
<tr>
<td><code>ios</code></td>
<td><code>cloud</code>, <code>device</code>, <code>hybrid</code></td>
</tr>
<tr>
<td><code>ios_swift</code></td>
<td><code>cloud</code>, <code>device</code>, <code>hybrid</code></td>
</tr>
<tr>
<td><code>web</code></td>
<td><code>cloud</code>, <code>device</code>, <code>hybrid</code></td>
</tr>
<tr>
<td><code>unity</code></td>
<td><code>cloud</code></td>
</tr>
<tr>
<td><code>cloud</code></td>
<td><code>cloud</code></td>
</tr>
<tr>
<td><code>react_native</code></td>
<td><code>cloud</code>, <code>device</code></td>
</tr>
<tr>
<td><code>flutter</code></td>
<td><code>cloud</code>, <code>device</code></td>
</tr>
<tr>
<td><code>cordova</code></td>
<td><code>cloud</code></td>
</tr>
</tbody>
</table>
<p>In <code>hybrid</code> mode, RudderStack sends every user-generated event — <code>identify</code>, <code>track</code>, <code>page</code>, <code>screen</code>, <code>group</code>, and <code>alias</code> — through Braze&rsquo;s REST API, and loads Braze&rsquo;s SDK only for what needs it, such as in-app messages and push notifications. See <a href="https://www.rudderstack.com/docs/destinations/streaming-destinations/braze/hybrid-mode/" >Braze hybrid mode</a>.</p>
<p><code>react_native</code> and <code>flutter</code> device mode covers their Android and iOS builds only. A Flutter app deployed to the web can reach Braze in <code>cloud</code> mode only.</p>

<html lang="en">
<blockquote class="info">
  <div class="tip-quote">
    
    <div class="tip-text">The dashboard additionally offers Braze to AMP, Shopify, and Reverse ETL sources. Rudder CLI doesn&rsquo;t manage those connections, so <code>amp</code>, <code>shopify</code>, and <code>warehouse</code> are invalid here.</div>
  </div>
</blockquote>

</html>
<!-- end-chunk -->
<!-- begin-chunk -->
<h2 id="connect-a-source">Connect a source</h2><p>An event stream connection to this destination is checked against three rules at <code>validate</code> time.</p>
<p><strong>The source&rsquo;s type must be supported.</strong> A source&rsquo;s type resolves to one of the tokens above before the check — a JavaScript source resolves to <code>web</code>, and webhook and server-side SDK sources resolve to <code>cloud</code>. An unsupported type reports:</p>
<div class="rs-code">
  <div class="rs-code__head"><button class="rs-code__copy" type="button">
      
      Copy
    </button>
  </div>
  <div class="highlight"><pre class="chroma"><code class="language-text" data-lang="text">destination &#39;braze-prod&#39; (type &#39;braze&#39;) does not support source &#39;my-source&#39;:
source type &#39;amp&#39; is not among supported source types: android, android_kotlin, ...</code></pre></div>
</div>
<p><strong>The destination config must carry a <code>connection_mode</code> entry for that source type.</strong> This lives on the destination spec, not on the <a href="https://www.rudderstack.com/docs/dev-tools/rudder-cli/yaml-connections/" >connection spec</a>. Without it:</p>
<div class="rs-code">
  <div class="rs-code__head"><button class="rs-code__copy" type="button">
      
      Copy
    </button>
  </div>
  <div class="highlight"><pre class="chroma"><code class="language-text" data-lang="text">destination &#39;braze-prod&#39; config has no &#39;connection_mode&#39; entry for source type &#39;web&#39;</code></pre></div>
</div>
<p><strong>A source connecting in <code>cloud</code> or <code>hybrid</code> mode needs <code>rest_api_key</code>.</strong> Device-mode connections don&rsquo;t. Without it:</p>
<div class="rs-code">
  <div class="rs-code__head"><button class="rs-code__copy" type="button">
      
      Copy
    </button>
  </div>
  <div class="highlight"><pre class="chroma"><code class="language-text" data-lang="text">destination &#39;braze-prod&#39; config is missing fields required to connect a &#39;cloud&#39; source: rest_api_key</code></pre></div>
</div>
<p>The app identifier keys aren&rsquo;t checked per connection — they&rsquo;re covered by the destination-level rules in <a href="#key-dependencies" >Key dependencies</a>.</p>
<!-- end-chunk -->
<!-- begin-chunk -->
<h2 id="secrets">Secrets</h2><p>Rudder CLI treats five keys as secrets: <code>rest_api_key</code>, <code>app_key</code>, <code>android_api_key</code>, <code>ios_api_key</code>, and <code>web_api_key</code>. Write each one you use as a <code>{{ .VAR }}</code> reference and supply the value at apply time:</p>
<div class="rs-code">
  <div class="rs-code__head">yaml<button class="rs-code__copy" type="button">
      
      Copy
    </button>
  </div>
  <div class="highlight"><pre class="chroma"><code class="language-yaml" data-lang="yaml">config:
  rest_api_key: &#34;{{ .BRAZE_REST_API_KEY }}&#34;
  app_key: &#34;{{ .BRAZE_APP_KEY }}&#34;</code></pre></div>
</div>
<div class="rs-code">
  <div class="rs-code__head">bash<button class="rs-code__copy" type="button">
      
      Copy
    </button>
  </div>
  <div class="highlight"><pre class="chroma"><code class="language-bash" data-lang="bash">export RUDDER_BRAZE_REST_API_KEY=&#34;...&#34;
export RUDDER_BRAZE_APP_KEY=&#34;...&#34;
rudder-cli apply

# or
rudder-cli apply --var-file secrets.vars.yaml</code></pre></div>
</div>
<p>Note that:</p>
<ul>
<li>The YAML that <code>rudder-cli import</code> 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.</li>
<li>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.</li>
</ul>
<p>See <a href="https://www.rudderstack.com/docs/dev-tools/rudder-cli/variable-substitution/" >How to Use Variable Substitution in Rudder CLI</a>.</p>
<!-- end-chunk -->
<!-- begin-chunk -->
<h2 id="see-more">See more</h2><ul>
<li><a href="https://www.rudderstack.com/docs/destinations/streaming-destinations/braze/setup-guide/" >Braze Destination</a> for finding your keys, data centers, and domain allowlisting</li>
<li><a href="https://www.rudderstack.com/docs/dev-tools/rudder-cli/destination-types/" >Destination Type Reference for Rudder CLI</a> for the rules shared across destination types</li>
<li><a href="https://www.rudderstack.com/docs/dev-tools/rudder-cli/yaml-destinations/" >Destination YAML Reference</a> for the spec envelope</li>
</ul>

