Upload assets to library or task
Upload assets (images, videos, and raw files) to the library or a task.
-
Fetch the pre-signed upload URL and its related meta-fields using the
GET /v3/upload-url
endpoint. The validity time for this URL is 60 minutes. -
Upload the file and related meta fields through an HTTP POST request to the pre-signed upload URL.
- The payload must be in
multipart/form-data
. - The field name for the file must be
file
. - Ensure that the meta fields are in the same order as received.
- The
file
field must be appended at the end.
If this URL is accessed multiple times with the same meta-fields, the asset is created by the last successfully uploaded file in the next step.
- The payload must be in
-
Upon success (204 HTTP response code) from the pre-signed URL, access the POST endpoint for the desired destination (library or task) by passing the
key
that was previously obtained from theGET /v3/upload-url
endpoint and an arbitrarytitle
as the request payload. If this endpoint is accessed multiple times with the samekey
, each access creates an asset for the same uploaded file.
POST endpoints
- Add asset to Library –
POST /v3/assets
- Add version to a Library Asset –
POST /v3/assets/{asset_id}/versions
- Add asset to a Task –
POST /v3/tasks/{id}/assets
- Add draft to a Task Asset –
POST /v3/tasks/{task_id}/assets/{asset_id}/drafts
Updated 9 months ago