diff --git a/_docs/_api/endpoints/messaging/send_messages/post_send_triggered_campaigns.md b/_docs/_api/endpoints/messaging/send_messages/post_send_triggered_campaigns.md index 80206ec7472..a7caa147283 100644 --- a/_docs/_api/endpoints/messaging/send_messages/post_send_triggered_campaigns.md +++ b/_docs/_api/endpoints/messaging/send_messages/post_send_triggered_campaigns.md @@ -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", + } + ] } ``` @@ -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).

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/).

If `send_to_existing_only` is `false`, an attribute object must be included.

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. @@ -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" + } + ] }' ```