Bulk Creative Operations

In addition to the single-creative endpoints, the Creative Library supports 3 bulk operations. They differ in scope (one account or many), in what they do, and in whether they are atomic.

OperationMethod and pathScopeAtomic
Bulk create creativesPOST /account_id/creatives/bulkOne account (in the path)Always. If any creative fails, none is created.
Bulk upsert creativesPOST /creatives/bulk?is_atomic=falseAny accounts (account_id per creative)Never. Each creative succeeds or fails on its own. is_atomic=false is required.
Bulk delete creativesDELETE /creatives/bulk?is_atomic=trueAny accounts (account_id per creative)Always. is_atomic=true is required.

Request and response shapes

Bulk create takes a plain collection of creative objects:

{
  "collection": [
    { "creative_type": "STATIC_IMAGE", "url": "...", "thumbnail_url": "...", "title": "..." },
    { "creative_type": "PERFORMANCE_VIDEO", "url": "...", "title": "...", "performance_video_data": { "video_url": "...", "fallback_url": "..." } }
  ]
}

Bulk upsert and bulk delete take an elements list. Each element wraps a creative in value and carries an error slot, which must be null in the request:

{
  "elements": [
    { "value": { "account_id": "demo-advertiser", "creative_type": "STATIC_IMAGE", "url": "...", "thumbnail_url": "...", "title": "..." }, "error": null },
    { "value": { "account_id": "demo-advertiser", "id": 4321000001, "title": "..." }, "error": null }
  ]
}

All 3 operations respond with the same elements shape, one element per request element in the same order. On success value is the resulting creative and error is null. In a non-atomic upsert, a failed element echoes the input in value and reports the failure in error:

{
  "elements": [
    {
      "value": { "id": 4321000021, "status": "ACTIVE", ... },
      "error": null
    },
    {
      "value": { "account_id": "demo-advertiser", "id": 4321000099, "title": "..." },
      "error": {
        "http_status": 404,
        "message": "Creative not found. Creative id : 4321000099"
      }
    }
  ]
}

The error object has http_status and message, plus offending_field when the error relates to a specific field.

🚧

Guidelines

  1. Limit each request to a maximum of 200 creatives.
  2. In bulk upsert, an element with an id is an update and an element without an id is a create. Read-only and per-type field rules are the same as for the single endpoints.
  3. account_id is required in every value of bulk upsert and bulk delete. Creative Library must be enabled for every account referenced.
  4. Bulk operations create, update and delete creatives. To create ads from the new creatives, assign them to campaigns; see Assigning creatives to campaigns.
  5. Bulk delete stops every ad of every deleted creative. See Deleting a creative.
📘

See also


Did this page help you?