> For the complete documentation index, see [llms.txt](https://docs.growsurf.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.growsurf.com/integrations/braze.md).

# Braze

## Sync participant referral data to Braze

The integration works with referral and affiliate programs. GrowSurf uses the participant's email address to find or create a Braze user profile.

**Step 1:** In Braze, open *Settings > APIs and Identifiers > API Keys*, then create a dedicated REST API key for GrowSurf with the `users.track` permission. Copy the key.

**Step 2:** Find the [REST endpoint for your Braze instance](https://www.braze.com/docs/api/basics/#endpoints). The endpoint looks like `https://rest.iad-01.braze.com` or `https://rest.fra-01.braze.eu`.

**Step 3:** In GrowSurf, open *Program Editor > 4. Options > Integrations > Braze*. Select the same REST endpoint, enter the API key, then connect.

<figure><img src="/files/hBYfFEPEjWNF1SaLOdS6" alt="The Braze REST endpoint and API key form in the GrowSurf Program Editor"><figcaption><p>Select your Braze REST endpoint and connect with a REST API key.</p></figcaption></figure>

GrowSurf stores the key securely and does not return it to the dashboard. Connecting does not make a test request to Braze. The first participant sync validates the endpoint, key, and `users.track` permission.

{% hint style="warning" %}
Connect Braze before importing participants. If participants are already in your program, use the [existing-participant sync options](https://support.growsurf.com/article/385-how-can-i-sync-my-growsurf-participants-to-my-esp) to send their current referral data to Braze.
{% endhint %}

## Custom attributes

GrowSurf sends profile updates through the Braze [`POST /users/track`](https://www.braze.com/docs/api/endpoints/user_data/post_user_track/) endpoint. Each profile is identified by email. The request contains attributes only. It does not send custom events, purchases, or subscription changes.

| GrowSurf data                   | Attribute key                      | Type   | Description                                                         | Example                                |
| ------------------------------- | ---------------------------------- | ------ | ------------------------------------------------------------------- | -------------------------------------- |
| Share URL                       | `grsf_share_url`                   | String | The participant's unique referral link                              | `https://growsurf.com?grsf=abc123`     |
| Participant ID                  | `grsf_participant_id`              | String | The participant's GrowSurf ID                                       | `abc123`                               |
| Referral Status                 | `grsf_referral_status`             | String | The participant's referral-credit status                            | `CREDIT_PENDING`                       |
| Participant First Name          | `grsf_participant_first_name`      | String | The participant's first name                                        | `Bob`                                  |
| Participant Last Name           | `grsf_participant_last_name`       | String | The participant's last name                                         | `Loblaw`                               |
| Referrer First Name             | `grsf_referrer_first_name`         | String | The referrer's first name, when applicable                          | `Gavin`                                |
| Referrer Last Name              | `grsf_referrer_last_name`          | String | The referrer's last name, when applicable                           | `Belson`                               |
| Referrer Email                  | `grsf_referrer_email`              | String | The referrer's email, when applicable                               | `gavin@example.com`                    |
| Total Referral Count            | `grsf_total_referral_count`        | Number | The participant's all-time referral count                           | `12`                                   |
| Monthly Referral Count          | `grsf_monthly_referral_count`      | Number | The participant's referral count for the current month              | `3`                                    |
| Previous Monthly Referral Count | `grsf_prev_monthly_referral_count` | Number | The participant's referral count for the previous month             | `8`                                    |
| Next Milestone                  | `grsf_next_milestone`              | String | The next milestone message, when the program uses milestone rewards | `2 referrals until your next reward`   |
| Next Monthly Milestone          | `grsf_next_monthly_milestone`      | String | The next monthly milestone message, when applicable                 | `1 referral until this month's reward` |
| Total Invite Count              | `grsf_total_invite_count`          | Number | The participant's all-time invite count                             | `24`                                   |
| Total Impression Count          | `grsf_total_impression_count`      | Number | The participant's all-time referral-link view count                 | `150`                                  |

The referral status can be `CREDIT_PENDING`, `CREDIT_AWARDED`, or `CREDIT_EXPIRED`.

If the same email is a participant in more than one connected GrowSurf program, the latest sync wins for these `grsf_` attributes on that Braze profile.

The first sync sends the current value of all 15 `grsf_` attributes. Later syncs send only attributes that changed. GrowSurf sends `null` when a string value becomes empty, which clears the old value in Braze. If nothing changed, GrowSurf skips the Braze request.

## Use the attributes in Braze

Use the synced values for segmentation and Liquid personalization in Braze. For example, insert the participant's referral link with `{{custom_attribute.${grsf_share_url}}}`.

## Troubleshooting

* If the integration connects but the first sync fails, confirm the key has the `users.track` permission and that the selected REST endpoint belongs to the same Braze instance.
* If one participant fails, verify that the participant has a valid email address.
* Check the participant's GrowSurf activity logs for sync results and error details.
* A credential or endpoint failure can disable the integration. Reconnect with a current key and endpoint after fixing the Braze settings.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.growsurf.com/integrations/braze.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
