Skip to content

Upload asset file

POST
/creatives/asset
curl --request POST \
--url https://portal.staging.arago-tech.com/creatives/asset \
--header 'Authorization: <Authorization>' \
--header 'Content-Type: application/json' \
--data '{ "file": { "content": "R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7", "name": "creative.gif" } }'

Uploads a creative asset file (main image, native icon, video, …) and returns its public URL. The returned URL can then be referenced when upserting a creative, for example as its source_url or as a native metadata.icon_image_url. Only images and videos are accepted; the content must match the file extension.

The request to upload an asset file

Media typeapplication/json
Upload asset request

The request to upload an asset file

object
file
required
File

The asset file to upload (png, jpeg, jpg, gif or mp4). This can be a main creative image, a native asset such as the icon image, or a video.

object
name
required
name

The file name, with extension, of the media

string
Example
image.png
content
required
Content

The binary content of the file

string format: byte
Example
{
"content": "R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",
"name": "creative.gif"
}

A successful response.

Media typeapplication/json
Upload asset response

The public URL of the uploaded asset file

object
url
URL

The public URL of the uploaded asset file

string
Example
{
"url": "https://cdn.example.com/bucket/owner_user_id/<hash>/creative.png"
}

Bad request

Media typeapplication/json
object
Example
{
"error": {
"code": "BAD_REQUEST",
"details": [
{
"code": "MAX_ITEMS",
"field": "line_items",
"message": "value must contain no more than 3000 item(s)",
"params": {
"max": "3000"
}
}
],
"message": "Bad request"
}
}

Unauthorized

Media typeapplication/json
object
Example
{
"error": {
"code": "UNAUTHORIZED",
"message": "Unauthorized"
}
}

Internal server error

Media typeapplication/json
object
Example
{
"error": {
"code": "INTERNAL_ERROR",
"message": "Internal server error"
}
}

An unexpected error response.

Media typeapplication/json
object
code
integer format: int32
message
string
details
Array<object>
object
@type
string
key
additional properties
any
Examplegenerated
{
"code": 1,
"message": "example",
"details": [
{
"@type": "example"
}
]
}