Upload Asset

The first step in uploading an asset to a site. This endpoint generates a response with the following information: `uploadUrl` and `uploadDetails`. Use these properties in the header of a [POST request to Amazson s3](https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectPOST.html) to complete the upload. To learn more about how to upload assets to Webflow, see our [assets guide](/data/docs/working-with-assets). Required scope | `assets:write`

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

site_idstringRequiredformat: "objectid"
Unique identifier for a Site

Request

Information about the asset to create
fileNamestringRequired
File name including file extension. File names must be less than 100 characters.
fileHashstringRequired
MD5 hash of the file
parentFolderstringOptional

ID of the Asset folder (optional)

Response

Request was successful
uploadDetailsobject
Metadata for uploading the asset binary
contentTypestring
idstringformat: "objectid"
parentFolderstringformat: "objectid"
Parent folder for the asset
uploadUrlstringformat: "uri"
assetUrlstringformat: "uri"
S3 link to the asset
hostedUrlstringformat: "uri"
Represents the link to the asset
originalFileNamestring
Original file name when uploaded. If not specified at time of upload, it may be extracted from the raw file name
createdOnstringformat: "date-time"
Date the asset metadata was created
lastUpdatedstringformat: "date-time"
Date the asset metadata was last updated

Errors

400
Bad Request Error
401
Unauthorized Error
404
Not Found Error
429
Too Many Requests Error
500
Internal Server Error