---
title: uploadpersonalizedattachments
slug: campaign/docs/uploadpersonalizedattachments
docTags: 
createdAt: 2026-07-02T19:01:45.097Z
---

These attachments can be used when sending transactional mails. For more information regarding the Personalized Attachments feature, see [Personalized Attachments - Examples](docId\:eWEtEpCU4ZxwjEGMqbefV).

This operation is available in the form service.

:::hint{type="warning"}
- **Tips**
  The Personalized Attachment feature must first be activated by [customer support](mailto\:support@optimizely.com).
- Personalized Attachments can only be used for event mailings.
- Do not upload more than 500 kB at once.
- With each call of this operation, up to five files can be uploaded.
- An attachment is valid for 24 hours by default; i.e., after this time, the attachment can no longer be used for sending.
:::

**Parameters**

| Name   | Mandatory | Default value | Description                                                                                                                                           |
| ------ | --------- | ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| bmFile | yes       | –             | Defines the attachment to be uploaded<br />This parameter may occur multiple times. I.e., multiple attachments (up to five) can be uploaded per call. |

**Return values**

| Value                                                                            | Description                                                                                                                                                                                                                                                                                                                                                    |
| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ok: \<token>                                                                     | The attachment has been successfully uploaded and can be used later using this returned **token** with the operation *sendtransactionmail*. A token is valid for 24 hours by default; i.e., after this time, the token becomes invalid and you must invoke the operation again.                                                                                |
| syntax\_error: No files uploaded.                                                | The value of the parameter **bmfile**is invalid. Check the spelling.                                                                                                                                                                                                                                                                                           |
| syntax\_error: Invalid file-parameter name \<Parameter name> - must be 'bmFile'. | Instead of the parameter name **bmFile**an incorrect parameter name was used. Always use the parameter name **bmfile**to upload attachments.                                                                                                                                                                                                                   |
| vetoed: Personalized attachments are not enabled.                                | The Personalized Attachments feature has not yet been activated. To activate the feature, contact *customer support*.                                                                                                                                                                                                                                          |
| file\_upload\_failed: Ask Campaign support for ticket #\<ticket ID>              | A general error occurred while uploading the attachment. Contact customer support and quote this ticket ID.                                                                                                                                                                                                                                                    |
| wrong\_tag                                                                       | Authorization failed.<br />Error codes:<br />- 501=wrong authentication tag<br />- 502=wrong request IP<br />- 503=wrong request method<br />- 504=wrong protocol<br />- 505=wrong recipient list<br />- 506=wrong action<br />- 507=action not found<br />If a verification of the authentication tag does not solve the problem, contact *customer support*. |

**Example**

See [Personalized Attachments - Examples](docId\:eWEtEpCU4ZxwjEGMqbefV) for examples for Personalized Attachments.
