Assigning Creatives to Campaigns

A creative runs in a campaign only once it is assigned to it. Assigning creates an ad in the campaign: a regular campaign item whose content is copied from the creative and which points back to it through creative_id.

Assignment uses the existing campaign item endpoints.

Assign a creative to a campaign

Create a campaign item with only creative_id in the request body:

POST /backstage/api/1.0/demo-advertiser/campaigns/33/items
{
  "creative_id": 4321000001
}
{
  "id": "8765000101",
  "campaign_id": "33",
  "creative_id": "4321000001",
  "type": "ITEM",
  "url": "https://www.demo-advertiser.com/summer-sale",
  "thumbnail_url": "https://cdn.demo-advertiser.com/thumbnails/summer-sale.jpg",
  "title": "Summer sale: up to 50% off",
  "description": "Limited-time offer on the full summer collection",
  "cta": {
    "cta_type": "SHOP_NOW"
  },
  "approval_state": "PENDING",
  "is_active": true,
  "status": "PENDING_APPROVAL",
  ...
}

The new ad takes its content from the creative, plus its own copy of the creative's verification_pixel, viewability_tag and schedule (start_date, end_date, activity_schedule), and enters the normal item lifecycle: it is reviewed and, once approved, serves in the campaign. Repeat the request for each campaign the creative should run in.

🚧

Guidelines

  1. creative_id must be the only field in the request body. Passing any other field returns 400 (creative_id cannot be set with other fields). To change the ad afterwards, update the ad once it exists.
  2. A creative can be assigned to a campaign once. A second request for the same campaign returns 400 (Creative is already assigned to campaign).
  3. The creative must not be TERMINATED or NEED_TO_EDIT. Either returns 400; for a TERMINATED (deleted) creative, the message is Creative was not found. See Creative statuses.
  4. The creative must belong to the campaign's account. An unknown creative ID returns 404; a creative from another account returns 403.
  5. The creative type must match the campaign: display creatives go in display campaigns, native and motion (PERFORMANCE_VIDEO) creatives in native campaigns. Performance video campaigns accept only DISPLAY creatives with a video asset (HOSTED_VIDEO or VAST_VIDEO); any other creative returns 400 (Performance video campaign accepts only video creatives).
  6. If the creative has a schedule, it must fall within the campaign's dates. Otherwise the request returns 400 (Creative <id> cannot be assigned to campaign <id> because of its schedule).

Assign creatives to several campaigns at once

Bulk create items across campaigns also accepts library creatives. Send each item with only creative_id. Every item is created in every campaign listed in campaign_ids:

PUT /backstage/api/1.0/demo-advertiser/items/bulk
{
  "campaign_ids": [33, 270],
  "items": [
    { "creative_id": 4321000001 },
    { "creative_id": 4321000002 }
  ]
}

This request creates 4 ads: both creatives in campaign 33 and both in campaign 270.

🚧

Guidelines

  1. campaign_ids applies to the whole request. An item cannot target its own campaign: passing campaign_id (or any other field) on a creative_id item returns 400 (creative_id cannot be set with other fields). To assign different creatives to different campaigns, send one request per campaign.
  2. The creatives must belong to the same account as the campaigns. A creative from another account returns 403; an unknown creative ID returns 404.
  3. A TERMINATED or NEED_TO_EDIT creative returns 400 (offending_field: creative_id).
  4. A creative that is already assigned to one of the campaigns, or the same creative listed twice, returns 400.
  5. The request is atomic: if one ad cannot be created, none are created.

See where a creative is assigned

Get a creative returns the ads created from it in ads.ads, one entry per campaign:

{
  "id": 4321000001,
  "ads": {
    "ads": [
      {
        "id": 8765000101,
        "campaign_id": 33,
        "campaign_name": "Summer sale - US",
        "creative_id": 4321000001
      },
      {
        "id": 8765000270,
        "campaign_id": 270,
        "campaign_name": "Summer sale - UK",
        "creative_id": 4321000001
      }
    ]
  },
  ...
}

In the other direction, every ad returned by the campaign item endpoints carries creative_id when it was created from a creative.

Change a single ad

Ads created from a creative are kept in sync with it: updating the creative updates all of them. To change one ad only, update that ad through Update a campaign item.

  • Changing the ad's url to one that leads to the same landing page (for example, wrapping it in a tracking or redirect URL) changes that ad only. The ad stays linked to the creative.
  • Changing the ad's content (title, thumbnail_url, description, or a url that leads to a different landing page) depends on whether the creative is shared:
    • If the creative backs other ads too, the ad is detached: it gets its own new creative and no longer follows the original one. The other ads are not affected. The new creative follows the consolidation rules: if the edited content is identical to an existing creative in the library, the ad is attached to that creative instead.
    • If this is the creative's only ad, the creative itself is updated with the change. The ad stays linked to it. If the edit makes the creative identical to another creative, it is merged into it, and the ad moves to the matched creative.
  • Changing the ad's verification_pixel, viewability_tag, start_date, end_date or activity_schedule changes that ad only. The ad stays linked to the creative.
  • ai_disclosure is owned by the creative and cannot be changed on the ad (400). See AI Disclosure Object.

Remove an ad from a campaign

To stop a creative from running in one campaign, delete the ad with Delete a campaign item:

DELETE /backstage/api/1.0/demo-advertiser/campaigns/33/items/8765000101
{
  "id": "8765000101",
  "campaign_id": "33",
  "creative_id": "4321000001",
  "status": "STOPPED",
  ...
}
🚧

Removing an ad is permanent

The ad is stopped and cannot be restarted. To run the creative in that campaign again, assign it again; this creates a new ad with a new ID, and the previous ad's history is not carried over. The creative itself stays in the library and its other ads keep running.

To pause an ad temporarily instead, set is_active to false on the ad. See Pausing campaign items.

To remove the creative from all campaigns at once, delete the creative.

📘

See also


Did this page help you?