Recipients object
The recipients object allows you to request or write information in our endpoints.
Either external_user_id
, user_alias
, or email
is required in this object. Requests must specify only one.
The recipients object allows you to combine the user alias object, the trigger properties object, and the Canvas entry properties object.
Object body
1
2
3
4
5
6
7
8
[{
"user_alias": (optional, User Alias Object) User alias of user to receive message,
"external_user_id": (optional, string) see External user ID,
"email": (optional, string) email address of user to receive message,
"prioritization": (optional, array) see Prioritization; required when using email,
"trigger_properties": (optional, object) personalization key-value pairs for this user when sending a campaign or message; see Trigger Properties,
"canvas_entry_properties": (optional, object) personalization key-value pairs for this user when triggering a Canvas; see Canvas Entry Properties
}]
When send_to_existing_only
is true
, Braze will only send the message to existing users. However, this flag can’t be used with user aliases. When send_to_existing_only
is false
, an attribute must be included. Braze will create a user with the id
and attributes before sending the message.
Recipient object deduping
When making an API call with the recipient object, if there exists a duplicated recipient targeting the same address (that is, email, push), the user will be deduped, meaning identical users will be removed, leaving one.
For example, if the same external_user_id
is used, then only one message will be received. Consider making multiple API calls if you need a workaround for this behavior.
1
2
3
4
{"campaign_id":"#####","recipients":[
{"external_user_id":"userid1","trigger_properties":{"name":"Beth Test 1"}},
{"external_user_id":"userid1","trigger_properties":{"name":"Beth Test 2"}}
]}