Dev GuideRecipesAPI ReferenceChangelog
Dev GuideAPI ReferenceChangelogUser GuideDev CommunityOptimizely AcademySubmit a ticketLog In
API Reference

POST /tasks/{id}/assets

This API allows you to add an asset to a task. There currently two mechanisms to add an asset - either by uploading an asset first and then calling this API (for only images, videos, and raw files), or by adding an asset from the library. The 'type' parameter in the request body will determine the mechanism used to add the asset. See Upload assets to upload an asset.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required

Unique identifier of the task

Body Params

Payload to add an asset. There are two mechanisms for adding assets to a task:

  • direct_upload - An asset that has been uploaded using the Upload assets endpoint.
  • fork_from_library - This will fork an existing asset from the library to the task. The type field is optional, and will default to direct_upload if not provided. Note: Renditions is currently not supported for library assets.
string

The mechanism for adding the asset to the task

string
required
length ≤ 100

Unique identifier of the file upload session. This is the upload_meta_fields.key field retrieved from the /v3/upload-url endpoint.

string
required
length between 1 and 100

Title of the asset

Responses

Language
Credentials
OAuth2
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json