File Upload

Issue a POST request to the /asset/v1/content/assets endpoint to upload files, such as gif, pdf, and png files. Add a file to the asset as an encoded base64 string using the file attribute. The maximum size file size is 5 MB.

File Upload Example 

1POST /asset/v1/content/assets HTTP/1.1
2Host: SUBDOMAIN.rest.marketingcloudapis.com
3Content-Type: application/json
4Authorization: Bearer YOUR_ACCESS_TOKEN
5
6{
7  "name": "1px transparent gif asset",
8  "assetType": {
9    "name": "gif",
10    "id": 20
11  },
12  "file": "R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",
13  "modelVersion": 2,
14  "fileProperties": {
15    "fileName": "1px_transparent.gif"
16  }
17}

See Also