# Update Talon.One audiences via Braze

> After you create an audience in Talon.One, you can add or update its members directly from Braze. To do this, create a webhook that calls the Update audiences in multiple customer profiles endpoint.

> For the complete documentation index, see [llms.txt](https://docs.talon.one/llms.txt).

To create a webhook in Braze,
you can use the [Canvas feature](https://www.braze.com/docs/user_guide/messaging/canvas),
a workspace that allows you to set up multi-step user journeys.

## Prerequisites

- You are an admin user in Talon.One and Braze.
- You have [created an audience](/docs/product/audiences/overview.md#create-an-audience) in Talon.One.

## Set up the integration

<StepsContainer>

### Create an API key in Talon.One

In the Campaign Manager, create a Braze-specific API key:

1. In your Application, click <Settings className="icon" /> **Settings** > **Integration API Keys**.
1. Click <Add className="icon" /> **Create API Key**.
1. In the **Create API Key** drawer, if you are asked for a key type, select **Production**.
1. In **Key name**, type a name to identify the key.
1. In **Key expiration date**, select a date.

   :::tip
   Avoid choosing expiration dates that fall at the end of the year or during other
   high-traffic periods.
   :::

1. In **Third-party integration**, select **Yes**.
1. From **Platform**, select **{props.partner}**.
1. Click **Create API Key**.
1. Click <Copy className="icon" /> to copy the key for use.

:::note
You cannot view or copy the API key after closing the drawer.
:::

We will use the API key in the Braze webhook.

### Create a webhook in Braze

In Braze, you can
[create a webhook](https://www.braze.com/docs/user_guide/channels/webhooks/create_a_webhook)
as a webhook campaign, API campaign, or Canvas component. Let's create the webhook as a Canvas component.

The webhook should call the [Update audiences in multiple customer profiles](/third-party-api#tag/Customer-data-platforms/operation/cdp/updateCustomerProfilesAudiences)
endpoint in Talon.One.

To create the webhook:

1. In Braze, [create a new Canvas](https://www.braze.com/docs/user_guide/messaging/canvas/create_a_canvas)
   using the [Canvas Flow](https://www.braze.com/docs/user_guide/messaging/canvas/create_a_canvas) editor.
1. When you create a message, select **Webhook** with a blank template as the messaging channel.
1. In **Webhook URL**, enter `https://integration.talon.one/cdp/customer_profiles/audiences`.
1. In **HTTP method**, select **PUT**.
1. In **Request Body**, select **Raw Text** and add the following text, where
   `YOUR_AUDIENCE_ID` is the ID of the audience in Talon.One to update.
      :::tip
      - Your audience ID is displayed on the [Audience page](/docs/product/audiences/overview.md#audience-page)
      of the Campaign Manager.
      - Ensure there are brackets around the audience ID. Example: `[53]`.
      :::

      ```json
      {
        "data": [
          {
            "adds": [YOUR_AUDIENCE_ID],
            "customerProfileId": "{{${user_id}}}"
          }
        ]
      }
      ```

1. In **Request headers**, click **Add New Header** and add the following key-value pairs:
   - `Authorization`: `ApiKey-v1 YOUR_API_KEY`, where `YOUR_API_KEY` is the API key you [created](#create-an-api-key-in-talonone).
   - `customer-data-platform-name`: `Braze`
   - `destination-hostname`: The base URL of your Talon.One deployment, for example, `mycompany.europe-west1.talon.one`.
1. Click the **Test** tab, select an existing user, and click **Send test**.The endpoint returns `204 No Content`, and your audience in Talon.One is updated accordingly.
1. Click **Done**.

</StepsContainer>
