Upsert creatives
const url = 'https://portal.staging.arago-tech.com/creatives';const options = { method: 'PUT', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"creatives":[{"format":"FORMAT_HTML","height":250,"language":"FR","name":"HTML creative","source_url":"https://example.com/banner.png","width":300},{"format":"FORMAT_JSON","height":627,"language":"FR","metadata":{"call_to_action":"Click here","description":"Description of the creative","icon_image_url":"https://example.com/icon.png","sponsored_by":"Sponsored by XYZ","title":"Title of the creative"},"name":"Native creative","source_url":"https://example.com/main.png","width":1200}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://portal.staging.arago-tech.com/creatives \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: application/json' \ --data '{ "creatives": [ { "format": "FORMAT_HTML", "height": 250, "language": "FR", "name": "HTML creative", "source_url": "https://example.com/banner.png", "width": 300 }, { "format": "FORMAT_JSON", "height": 627, "language": "FR", "metadata": { "call_to_action": "Click here", "description": "Description of the creative", "icon_image_url": "https://example.com/icon.png", "sponsored_by": "Sponsored by XYZ", "title": "Title of the creative" }, "name": "Native creative", "source_url": "https://example.com/main.png", "width": 1200 } ] }'Creates or updates multiple creatives.
Authorizations
Section titled “Authorizations”Request Body
Section titled “Request Body”The request to creates or updates creatives
The request to creates or updates creatives
object
List of creatives to create or update. If the creative ID is provided, the existing creative will be updated. Otherwise, a new creative will be created. The format field is required: FORMAT_HTML for a standard HTML creative or FORMAT_JSON for a native (JSON) creative.
Creative details for upsert.
The creative format is set with the required format field: HTML (FORMAT_HTML) for a display creative or native (JSON) (FORMAT_JSON) for a native creative.
For a valid native creative, set format to FORMAT_JSON and provide source_url (used as the native main image), width and height (the main image dimensions, matched against the native impression’s main image within a 10% tolerance) and the native asset fields in metadata. The fields map to the OpenRTB Native 1.2 response assets as follows: source_url -> main image, metadata.icon_image_url -> icon image, metadata.title -> title, metadata.sponsored_by -> data (sponsored), metadata.description -> data (desc), metadata.call_to_action -> data (cta). Assets are omitted when their field is empty.
object
The creative unique identifier. If not provided, a new creative will be created.
Example
63e2d42a27ad5f2b345ca123Tags associated with the creative. Each tag must be 3 to 255 characters and must not contain only whitespace (NOT_BLANK). Tags are not trimmed.
Example
[ "tag1", "tag2", "tag3"]The name of the creative. Must not contain only whitespace (NOT_BLANK). Length is checked before surrounding whitespace is trimmed on write; the response returns the stored name.
Example
Creative nameThe original URL of the creative
Example
https://example.com/image.pngThe URL of the creative thumbnail. Must point to a jpeg, jpg, png or gif image.
Example
https://example.com/thumbnail.jpgThe dynamic content optimization unique identifier for the creative
Example
63e2d42a27ad5f2b345ca123The width of the creative. Width and height must both be zero or both be positive. Leaving width, height and aspect_ratio at zero makes the creative eligible for every slot size with usable dimensions.
Example
100The height of the creative. Width and height must both be zero or both be positive. Leaving width, height and aspect_ratio at zero makes the creative eligible for every slot size with usable dimensions.
Example
100Free-form metadata as key/value pairs. Any key may be set, and none is required. For a native (JSON) creative (format set to FORMAT_JSON), the well-known keys title, sponsored_by, description, call_to_action, icon_image_url, icon_width and icon_height are rendered into the OpenRTB Native response. When set, icon_image_url must be a valid URI and icon_width / icon_height must be positive integers. Any other key is stored and returned verbatim.
object
The language of the creative
Example
FRThe format of the creative. Required: set FORMAT_HTML for a display creative or FORMAT_JSON for a native creative.
Example
FORMAT_HTMLThe aspect ratio of the creative (width / height). Computed from non-zero width and height when omitted. An explicit ratio restricts matching even without dimensions. Leaving width, height and aspect_ratio at zero makes the creative eligible for every slot size with usable dimensions.
Example
1.7777777777777777Example
[ { "format": "FORMAT_HTML", "height": 250, "language": "FR", "name": "HTML creative", "source_url": "https://example.com/banner.png", "width": 300 }, { "format": "FORMAT_JSON", "height": 627, "language": "FR", "metadata": { "call_to_action": "Click here", "description": "Description of the creative", "icon_image_url": "https://example.com/icon.png", "sponsored_by": "Sponsored by XYZ", "title": "Title of the creative" }, "name": "Native creative", "source_url": "https://example.com/main.png", "width": 1200 }]Responses
Section titled “ Responses ”A successful response.
Response containing a list of upserted creatives.
object
List of upserted creatives
Creative details
object
The unique identifier of the creative in hexadecimal format
Tags associated with the creative
The name of the creative
The original URL of the creative
The URL of the creative thumbnail
The URL of the generated creative
The unique identifier of the dynamic content optimization of the creative
Indicates whether the creative is currently generating
The width of the creative
The height of the creative
The aspect ratio of the creative (width / height). Explicitly set or computed from non-zero dimensions. Leaving width, height and aspect_ratio at zero makes the creative eligible for every slot size with usable dimensions.
Free-form metadata of the creative as key/value pairs. Any key may be set, and none is required.
object
The UTC last updated date of the creative
The UTC created date of the creative
The format of the creative
The language of the creative
Example
{ "creatives": [ { "format": "FORMAT_HTML", "height": 100, "id": "63e2d42a27ad5f2b345ca123", "language": "FR", "metadata": { "brand_color": "#ff0000", "call_to_action": "Click here", "description": "Description of the creative", "icon_height": "50", "icon_image_url": "https://example.com/icon.png", "icon_width": "50", "sponsored_by": "Sponsored by XYZ", "title": "Title of the creative" }, "name": "Creative name", "width": 100 } ]}Bad request
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
object
Example
{ "error": { "code": "UNAUTHORIZED", "message": "Unauthorized" }}Internal server error
object
Example
{ "error": { "code": "INTERNAL_ERROR", "message": "Internal server error" }}default
Section titled “default”An unexpected error response.
object
object
Examplegenerated
{ "code": 1, "message": "example", "details": [ { "@type": "example" } ]}