---
schema_version: "1"
id: 0af2f4d6cdf79794fbd7b65e5070429fa63e90feafd07e3f0e0709c0b5833378
title: File Upload
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/marketing-cloud/guides/mc-apis/file_upload.md
canonical_url: https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/file_upload.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 22cabf2da0998e9149c326852e744ffe4deec77f21781a0ab16e45c01cce1460
products:
  - Marketing Cloud Engagement APIs and Programmatic Languages
  - Marketing Cloud
---
# 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

```json
POST /asset/v1/content/assets HTTP/1.1
Host: SUBDOMAIN.rest.marketingcloudapis.com
Content-Type: application/json
Authorization: Bearer YOUR_ACCESS_TOKEN

{
  "name": "1px transparent gif asset",
  "assetType": {
    "name": "gif",
    "id": 20
  },
  "file": "R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",
  "modelVersion": 2,
  "fileProperties": {
    "fileName": "1px_transparent.gif"
  }
}
```

## See Also

- [Asset Model](https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/asset-model.md)
- [Asset Model Examples](https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/asset_model_examples.md)
