Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated /campaigns/trigger/send docs to include newly supported attachments feature #7524

Merged
merged 1 commit into from
Jun 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,14 @@ Authorization: Bearer YOUR-REST-API-KEY
"send_to_existing_only": (optional, boolean) defaults to true, can't be used with user aliases; if set to `false`, an attributes object must also be included,
"attributes": (optional, object) fields in the attributes object will create or update an attribute of that name with the given value on the specified user profile before the message is sent and existing values will be overwritten
}
]
],
"attachments": (optional, array) array of JSON objects that define the files you need attached, defined by "file_name" and "url",
[
{
"file_name": (required, string) the name of the file you want to attach to your email, excluding the extension (for example, ".pdf"). Attach files up to 2 MB. This is required if you use "attachments",
"url": (required, string) the corresponding URL of the file you want to attach to your email. The file name's extension will be detected automatically from the URL defined, which should return the appropriate "Content-Type" as a response header. This is required if you use "attachments",
}
]
}
```

Expand All @@ -69,6 +76,7 @@ Authorization: Bearer YOUR-REST-API-KEY
|`broadcast`| Optional | Boolean | You must set `broadcast` to true when sending a message to an entire segment that a campaign or Canvas targets. This parameter defaults to false (as of August 31, 2017). <br><br> If `broadcast` is set to true, a `recipients` list cannot be included. However, use caution when setting `broadcast: true`, as unintentionally setting this flag may cause you to send your message to a larger than expected audience. |
|`audience`| Optional | Connected audience object| See [connected audience]({{site.baseurl}}/api/objects_filters/connected_audience/). |
|`recipients`| Optional | Array | See [recipients object]({{site.baseurl}}/api/objects_filters/recipient_object/).<br><br>If `send_to_existing_only` is `false`, an attribute object must be included.<br><br>If `recipients` is not provided and `broadcast` is set to true, the message will send to the entire segment targeted by the campaign. |
|`attachments`| Optional | Array | If `broadcast` is set to true, then `attachments` list cannot be included. |
{: .reset-td-br-1 .reset-td-br-2 .reset-td-br-3 .reset-td-br-4}

- The recipients array may contain up to 50 objects, with each object containing a single `external_user_id` string and `trigger_properties` object.
Expand Down Expand Up @@ -147,7 +155,13 @@ curl --location --request POST 'https://rest.iad-01.braze.com/campaigns/trigger/
"first_name" : "Alex"
}
}
]
],
"attachments": [
{
"file_name" : "YourFileName",
"url" : "https://exampleurl.com/YourFileName.pdf"
}
]
}'
```

Expand Down