Skip to content

Sending test messages

Before sending out a messaging campaign to your users, you may want to test it to make sure it looks right and operates in the intended manner. You can use the dashboard to create and send test messages with push notifications, in-app messages (IAM), or email.

Sending a test message

Step 1: Create a designated test segment

After you set up a test segment, you can use it to test any of your Braze messaging channels. When set up correctly, this only needs to be done a single time.

To set up a test segment, go to Segments and create a new segment. Select Add Filter, then choose a one of the test filters.

A Braze test campaign displaying the filters available in the targeting step.

Use test filters to send the test message only to users with a specific email address or external user ID.

A dropdown menu displaying several filters listed under a heading that reads Testing

Both email address and external user ID filters offer the following options:

Operator Description
equals This will look for an exact match of the email or user ID that you provide. Use this if you only want to send the test campaigns to devices associated with a single email or user ID.
does not equal Use this if you want to exclude a particular email or user ID from test campaigns.
matches This will find users that have email addresses or user IDs that match part of the search term you provide. You could use this to find only the users that have an @yourcompany.com address, allowing you to send messages to everyone on your team.

You can select multiple specific emails using the “matches” option and separating the email addresses with a | character. For example: “matches” “[email protected] | [email protected]”. You can also combine multiple operators together. For example, the test segment could include an email address filter that “matches” “@braze.com” and another filter that “does not equal” “[email protected]”.

After adding the testing filters to your test segment, you can verify it’s working by selecting Preview or by selecting Settings > CSV Export All User Data to export that segment’s user data to a CSV file.

A section of a Braze campaign titled Segment Details

Step 2: Send the message

You can send a message using the Braze dashboard or the command line.

To send test push notifications or in-app messages, you need to target your previously created test segment. Begin by creating your campaign and following the usual steps. When you reach the Target Audiences step, select your test segment from the dropdown menu.

A Braze test campaign displaying the segments available in the targeting step.

Confirm your campaign and launch it to test your push notification and in-app messages.

You don’t need to set up a test segment to send a test email. Instead, you can send a test directly from the email composer to one or more inboxes, one or more external user IDs, or a Content Test Group.

To send a test email from the email composer:

  1. In the Campaigns or Canvas composer, draft your email message.
  2. Select Preview and Test, then select the Test Send tab.
  3. Add recipients in any of the following ways:
    • Enter one or more email addresses or external user IDs in the Add individual users field.
    • Select an existing Content Test Group to send the test to a predefined list of testers.
  4. (Optional) To preview personalization, select an existing user or define a custom user. This populates user attributes, custom attributes, and event properties so you can verify that Liquid renders the correct values for that user.
  5. Select Send Test to send the test email to the selected recipients.

A Braze campaign with the Test Send tab selected.

For shared test limitations, including unsubscribe-related behavior, see Test limitations.

If a large image isn’t rendering as expected in Outlook, reduce the actual file dimensions of the image with an image editing or resizing tool instead of only scaling it with CSS or HTML.

For the full set of email testing options (including a complete preview workflow, troubleshooting, and channel-specific test checklists), see Send test messages: Email.

Alternatively, you can send a single notification using cURL and the Braze Messaging API. Note that these examples make a request using the US-01 instance. To find out yours, refer to API endpoints.

curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer {BRAZE_API_KEY}" -d '{
  "external_user_ids":["EXTERNAL_USER_ID"],
  "messages": {
    "android_push": {
      "title":"Test push title",
      "alert":"Test push",
      "extra":{
        "CUSTOM_KEY":"CUSTOM_VALUE"
      }
    }
  }
}' https://rest.iad-01.braze.com/messages/send
curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer {BRAZE_API_KEY}" -d '{
  "external_user_ids":["EXTERNAL_USER_ID"],
  "messages": {
    "apple_push": {
      "alert": "Test push",
      "extra": { 
        "CUSTOM_KEY" :"CUSTOM_VALUE"
      }
    }
  }
}' https://rest.iad-01.braze.com/messages/send
curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer {BRAZE_API_KEY}" -d '{
  "external_user_ids":["EXTERNAL_USER_ID"],
  "messages": {
    "kindle_push": {
      "title":"Test push title",
      "alert":"Test push",
      "extra":{
        "CUSTOM_KEY":"CUSTOM_VALUE"
      }
    }
  }
}' https://rest.iad-01.braze.com/messages/send

Replace the following:

Placeholder Description
BRAZE_API_KEY Your Braze API key used for authentication. In Braze, go to Settings > API Keys to locate your key.
EXTERNAL_USER_ID The external user ID used to send your message to a specific user. In Braze, go to Audience > Search users, then search for a user.
CUSTOM_KEY (Optional) A custom key for additional data.
CUSTOM_VALUE (Optional) A custom value assigned to your custom key.

Test limitations

There are a few situations where test messages don’t have complete feature parity with launching a campaign or Canvas to a real set of users. In these instances, to validate this behavior, you should launch the campaign or Canvas to a limited set of test users.

  • Viewing the Braze preference center from Test Messages will cause the submit button to be grayed out.
  • The list-unsubscribe header is not included in emails sent by the test message functionality.
  • For testing unsubscribe links in emails, make sure your test user’s email address is in the workspace you’re sending from.
  • For in-app messages and Content Cards, the target user must have a push token for the target device.
New Stuff!