ads

Create ad preview with pin or image

Changed on

Create an ad preview given an ad account ID and either an existing organic pin ID or the URL for an image to be used to create the Pin and the ad.

If you are creating a preview from an existing Pin, that Pin must be promotable: that is, it must have a clickthrough link and meet other requirements. (See Ads Overview.)

You can view the returned preview URL on a webpage or iframe for 7 days, after which the URL expires. Collection ads are not currently supported ad preview.

post/ad_accounts/{ad_account_id}/ad_previews

Request

Path parameters

ad_account_idstring required

Unique identifier of an ad account.

Request body

OR
OR

Example request

{
  "image_url": "https://somewebsite.com/someimage.jpg",
  "title": "My Preview Image"
}

Response

The request has succeeded.

urlstring

Preview URL, expires in 7 days. Can be used in an iframe. For example: https://ads.pinterest.com/ad-preview/74667c814dd2b19/ The preview object ID/key is the last param - 74667c814dd2b19

Example response

{
  "url": "https://ads.pinterest.com/ad-preview/58f1a0e9ab0bd0f99462a0e4c5dd7e8297888c8a36331e88f757abe8f0295d31/"
}

Changes

    • breaking

      removed subschema #1: AdPreviewCreateFromImage subschema #2: AdPreviewCreateFromPin subschema #3: AdPreviewShopping from the request body oneOf list

    • info

      added to the request body oneOf list

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the success response with the status

    • breaking

      added subschema #2 to the / request property allOf list

    • breaking

      the request property / became not nullable

    • breaking

      removed the enum value BOOK_NOW of the request property /

    • breaking

      removed the enum value GET_DEAL of the request property /

    • breaking

      removed the enum value ON_SALE of the request property /

    • breaking

      removed the enum value SHOP_NOW of the request property /

    • breaking

      removed the enum value undefined of the request property /

    • breaking

      the / request property type changed from string to no type

    • info

      added the new REGULAR enum value to the request property /