openapi: 3.0.3 info: version: 5.13.0 title: Pinterest Ads API description: This is the description of your API. contact: name: Pinterest, Inc. url: https://developers.pinterest.com/ license: name: MIT url: https://spdx.org/licenses/MIT termsOfService: https://developers.pinterest.com/terms/ servers: - url: https://api.pinterest.com/v5 tags: - name: Ads paths: /ad_accounts/{ad_account_id}/ad_previews: post: summary: Create ad preview with pin or image description: '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.' tags: - Ads operationId: ad_previews/create security: - pinterest_oauth2: - ads:write x-ratelimit-category: ads_write x-sandbox: enabled parameters: - $ref: '#/components/parameters/path_ad_account_id' requestBody: description: Create ad preview with pin or image. required: true content: application/json: schema: $ref: '#/components/schemas/AdPreviewRequest' responses: '200': description: Successful ad preview creation. content: application/json: schema: $ref: '#/components/schemas/AdPreviewURLResponse' '400': description: Invalid Pin parameters response content: application/json: schema: $ref: '#/components/schemas/Error' examples: InvalidPinUrl: value: code: 1 message: Whoops! It looks like you entered an invalid URL. Try creating a Pin again with a valid URL. default: description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' /ad_accounts/{ad_account_id}/ads: get: summary: List ads description: "List ads that meet the filters provided:\n - Listed campaign ids or ad group ids or ad ids\n - Listed entity statuses \nIf no filter is provided, all ads in the ad account are returned. \nNote:\nProvide only campaign_id or ad_group_id or ad_id. Do not provide more than one type. \nReview status is provided for each ad; if review_status is REJECTED, the rejected_reasons field will contain additional information.\nFor more, see Pinterest advertising standards." operationId: ads/list security: - pinterest_oauth2: - ads:read x-ratelimit-category: ads_read x-sandbox: enabled parameters: - $ref: '#/components/parameters/path_ad_account_id' - $ref: '#/components/parameters/query_campaign_ids' - $ref: '#/components/parameters/query_ad_group_ids' - $ref: '#/components/parameters/query_ad_ids' - $ref: '#/components/parameters/query_entity_statuses' - $ref: '#/components/parameters/query_page_size' - $ref: '#/components/parameters/query_order' - $ref: '#/components/parameters/query_bookmark' responses: '200': content: application/json: schema: allOf: - $ref: '#/components/schemas/Paginated' - type: object properties: items: type: array items: $ref: '#/components/schemas/AdResponse' description: Success '400': description: Invalid ad account ads parameters. content: application/json: schema: $ref: '#/components/schemas/Error' example: code: 400 message: Invalid ad account ads parameters. default: description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' tags: - Ads post: description: Create multiple new ads. Request must contain ad_group_id, creative_type, and the source Pin pin_id. operationId: ads/create security: - pinterest_oauth2: - ads:write x-ratelimit-category: ads_write x-sandbox: enabled parameters: - $ref: '#/components/parameters/path_ad_account_id' requestBody: content: application/json: schema: items: $ref: '#/components/schemas/AdCreateRequest' maxItems: 30 minItems: 1 type: array description: List of ads to create, size limit [1, 30]. required: true responses: '200': content: application/json: schema: $ref: '#/components/schemas/AdArrayResponse' description: Success default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Unexpected error summary: Create ads tags: - Ads patch: description: Update multiple existing ads operationId: ads/update security: - pinterest_oauth2: - ads:write x-ratelimit-category: ads_write x-sandbox: enabled parameters: - $ref: '#/components/parameters/path_ad_account_id' requestBody: content: application/json: schema: items: $ref: '#/components/schemas/AdUpdateRequest' maxItems: 30 minItems: 1 type: array description: List of ads to update, size limit [1, 30] required: true responses: '200': content: application/json: schema: $ref: '#/components/schemas/AdArrayResponse' description: Success default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Unexpected error summary: Update ads tags: - Ads /ad_accounts/{ad_account_id}/ads/analytics: get: summary: Get ad analytics description: 'Get analytics for the specified ads in the specifiedad_account_id, filtered by the specified options.
- The token''s user_account must either be the Owner of the specified ad account, or have one of the necessary roles granted to them via Business Access: Admin, Analyst, Campaign Manager.
- If granularity is not HOUR, the furthest back you can are allowed to pull data is 90 days before the current date in UTC time and the max time range supported is 90 days.
- If granularity is HOUR, the furthest back you can are allowed to pull data is 8 days before the current date in UTC time and the max time range supported is 3 days.'
operationId: ads/analytics
security:
- pinterest_oauth2:
- ads:read
x-ratelimit-category: ads_analytics
x-sandbox: enabled
parameters:
- $ref: '#/components/parameters/path_ad_account_id'
- $ref: '#/components/parameters/query_start_date'
- $ref: '#/components/parameters/query_end_date'
- $ref: '#/components/parameters/query_ad_ids_required'
- $ref: '#/components/parameters/query_columns'
- $ref: '#/components/parameters/query_granularity'
- $ref: '#/components/parameters/query_conversion_attribution_click_window_days'
- $ref: '#/components/parameters/query_conversion_attribution_engagement_window_days'
- $ref: '#/components/parameters/query_conversion_attribution_view_window_days'
- $ref: '#/components/parameters/query_conversion_attribution_conversion_report_time'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/AdsAnalyticsResponse'
description: Success
'400':
description: Invalid ad account ads analytics parameters.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
code: 400
message: Invalid ad account ads analytics parameters.
default:
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
tags:
- Ads
/ad_accounts/{ad_account_id}/ads_credit/discounts:
get:
summary: Get ads credit discounts
description: 'Returns the list of discounts applied to the account.
This endpoint might not be available to all apps. Learn more.'
operationId: ads_credits_discounts/get
security:
- pinterest_oauth2:
- ads:read
- billing:read
x-ratelimit-category: ads_read
x-sandbox: disabled
tags:
- Ads
parameters:
- $ref: '#/components/parameters/path_ad_account_id'
- $ref: '#/components/parameters/query_bookmark'
- $ref: '#/components/parameters/query_page_size'
responses:
'200':
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/Paginated'
- type: object
properties:
items:
type: array
items:
$ref: '#/components/schemas/AdsCreditDiscountsResponse'
description: Success
default:
description: Unexpected error.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/ad_accounts/{ad_account_id}/ads_credit/redeem:
post:
summary: Redeem ad credits
description: 'Redeem ads credit on behalf of the ad account id and apply it towards billing.
This endpoint might not be available to all apps. Learn more.'
tags:
- Ads
operationId: ads_credit/redeem
security:
- pinterest_oauth2:
- ads:write
- billing:write
x-ratelimit-category: ads_write
x-sandbox: disabled
parameters:
- $ref: '#/components/parameters/path_ad_account_id'
requestBody:
description: Redeem ad credits request.
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/AdsCreditRedeemRequest'
responses:
'200':
description: Successfully redeemed ad credits.
content:
application/json:
schema:
$ref: '#/components/schemas/AdsCreditRedeemResponse'
'400':
description: Error thrown when unable to redeem offer code.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
examples:
ValidationError:
value:
code: 15
message: Unable to redeem offer code. Try again later.
default:
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/ad_accounts/{ad_account_id}/ads/targeting_analytics:
get:
summary: Get targeting analytics for ads
description: 'Get targeting analytics for one or more ads. For the requested ad(s) and metrics,
the response will include the requested metric information (e.g. SPEND_IN_DOLLAR) for the requested target type
(e.g. "age_bucket") for applicable values (e.g. "45-49").
- The token''s user_account must either be the Owner of the specified ad account, or have one
of the necessary roles granted to them via
Business Access: Admin, Analyst, Campaign Manager.
- If granularity is not HOUR, the furthest back you can are allowed to pull data is 90 days before the current date in UTC time and the max time range supported is 90 days.
- If granularity is HOUR, the furthest back you can are allowed to pull data is 8 days before the current date in UTC time and the max time range supported is 3 days.'
operationId: ad_targeting_analytics/get
security:
- pinterest_oauth2:
- ads:read
x-ratelimit-category: ads_analytics
x-sandbox: enabled
parameters:
- $ref: '#/components/parameters/path_ad_account_id'
- $ref: '#/components/parameters/query_ad_ids_required'
- $ref: '#/components/parameters/query_start_date'
- $ref: '#/components/parameters/query_end_date'
- $ref: '#/components/parameters/query_targeting_types'
- $ref: '#/components/parameters/query_columns'
- $ref: '#/components/parameters/query_granularity'
- $ref: '#/components/parameters/query_conversion_attribution_click_window_days'
- $ref: '#/components/parameters/query_conversion_attribution_engagement_window_days'
- $ref: '#/components/parameters/query_conversion_attribution_view_window_days'
- $ref: '#/components/parameters/query_conversion_attribution_conversion_report_time'
- $ref: '#/components/parameters/query_attribution_types'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/MetricsResponse'
description: Success
default:
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: Unexpected error
tags:
- Ads
/ad_accounts/{ad_account_id}/ads/{ad_id}:
get:
summary: Get ad
description: 'Get a specific ad given the ad ID. If your pin is rejected, rejected_reasons will
contain additional information from the Ad Review process.
For more information about our policies and rejection reasons see the Pinterest advertising standards.'
operationId: ads/get
security:
- pinterest_oauth2:
- ads:read
x-ratelimit-category: ads_read
x-sandbox: enabled
parameters:
- $ref: '#/components/parameters/path_ad_account_id'
- $ref: '#/components/parameters/path_ad_id'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/AdResponse'
description: Success
default:
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: Unexpected error
tags:
- Ads
components:
schemas:
QuizPinResult:
description: The result, and link out, based on the users choice.
example:
organic_pin_id: pinId
android_deep_link: https://www.pinterest.com/
ios_deep_link: https://www.pinterest.com/
destination_url: https://www.pinterest.com/
type: object
nullable: true
properties:
organic_pin_id:
type: string
android_deep_link:
type: string
ios_deep_link:
type: string
destination_url:
type: string
result_id:
type: number
AdsAnalyticsResponse:
type: array
items:
type: object
properties:
AD_ID:
description: The ID of the ad that this metrics belongs to.
type: string
pattern: ^\d+$
DATE:
description: Current metrics date. Only returned when granularity is a time-based value (`DAY`, `HOUR`, `WEEK`, `MONTH`)
type: string
format: date
required:
- AD_ID
additionalProperties: true
example:
DATE: '2021-04-01'
AD_ID: '547602124502'
SPEND_IN_DOLLAR: 30
TOTAL_CLICKTHROUGH: 216
EntityStatus:
type: string
description: Entity status
example: ACTIVE
enum:
- ACTIVE
- PAUSED
- ARCHIVED
- DRAFT
- DELETED_DRAFT
AdPreviewRequest:
oneOf:
- example:
image_url: https://somewebsite.com/someimage.jpg
title: My Preview Image
properties:
image_url:
description: Image URL.
example: https://somewebsite.com/someimage.jpg
title: image_url
type: string
title:
description: Title displayed below ad.
example: My Preview Image
title: title
type: string
required:
- image_url
- title
title: AdPreviewCreateFromImage
type: object
- example:
pin_id: '7389479023'
properties:
pin_id:
description: Pin ID.
example: '7389479023'
title: pin_id
type: string
required:
- pin_id
title: AdPreviewCreateFromPin
type: object
Error:
title: Error
type: object
properties:
code:
type: integer
message:
type: string
required:
- code
- message
QuizPinQuestion:
description: A specific quiz inquiry.
example:
question_id: 1
question_text: Where do you thrive?
options:
- text: Hangout vibes
- text: Time to party!
- text: Keeping it lowkey
type: object
nullable: true
properties:
question_id:
type: number
question_text:
type: string
options:
type: array
items:
$ref: '#/components/schemas/QuizPinOption'
Exception:
title: Generic exception class to be used within schemas
type: object
properties:
code:
type: integer
example: 2
description: Exception error code.
message:
type: string
example: Advertiser not found.
description: Exception message.
AdCreateRequest:
type: object
allOf:
- $ref: '#/components/schemas/AdCommon'
- $ref: '#/components/schemas/AdPinId'
- type: object
title: Request schema for creating ads
required:
- ad_group_id
- pin_id
- creative_type
AdsCreditDiscountsResponse:
type: object
properties:
active:
description: True if the offer code is currently active.
type: boolean
example: true
advertiser_id:
description: Advertiser ID the offer was applied to.
type: string
pattern: ^\d+$
example: '12312451231'
discountType:
description: The type of discount of this credit
type: string
nullable: true
enum:
- COUPON
- CREDIT
- COUPON_APPLIED
- CREDIT_APPLIED
- MARKETING_OFFER_CREDIT
- MARKETING_OFFER_CREDIT_APPLIED
- GOODWILL_CREDIT
- GOODWILL_CREDIT_APPLIED
- INTERNAL_CREDIT
- INTERNAL_CREDIT_APPLIED
- PREPAID_CREDIT
- PREPAID_CREDIT_APPLIED
- SALES_INCENTIVE_CREDIT
- SALES_INCENTIVE_CREDIT_APPLIED
- CREDIT_EXPIRED
- FUTURE_CREDIT
- REFERRAL_CREDIT
- INVOICE_SALES_INCENTIVE_CREDIT
- INVOICE_SALES_INCENTIVE_CREDIT_APPLIED
- PREPAID_CREDIT_REFUND
- null
discountInMicroCurrency:
description: The discount applied in the offers currency value.
type: number
nullable: true
example: 125000000
discountCurrency:
type: string
nullable: true
description: Currency value for the discount.
example: USD
title:
description: Human readable title of the offer code.
type: string
nullable: true
example: Ads Credits
remainingDiscountInMicroCurrency:
type: number
nullable: true
description: The credits left to spend.
example: 125000000
AdUpdateRequest:
type: object
allOf:
- $ref: '#/components/schemas/AdCommon'
- type: object
title: AdUpdateRequest
properties:
id:
type: string
example: '687195134316'
pattern: ^\d+$
description: The ID of this ad.
title: id
pin_id:
type: string
description: Pin ID. This field may only be updated for draft ads.
example: '394205773611545468'
pattern: ^\d+$
nullable: true
required:
- id
MetricsResponse:
properties:
data:
items:
type: object
type: array
example:
- targeting_type: KEYWORD
targeting_value: christmas decor ideas
metrics:
AD_GROUP_ID: 2680067996745
DATE: '2022-04-26'
SPEND_IN_DOLLAR: 240
- targeting_type: APPTYPE
targeting_value: iphone
metrics:
AD_GROUP_ID: 2680067996745
DATE: '2022-04-26'
SPEND_IN_DOLLAR: 240
- targeting_type: APPTYPE
targeting_value: ipad
metrics:
AD_GROUP_ID: 2680067996745
DATE: '2022-04-26'
SPEND_IN_DOLLAR: 240
- targeting_type: APPTYPE
targeting_value: web
metrics:
AD_GROUP_ID: 2680067996745
DATE: '2022-04-26'
SPEND_IN_DOLLAR: 240
- targeting_type: APPTYPE
targeting_value: web_mobile
metrics:
AD_GROUP_ID: 2680067996745
DATE: '2022-04-26'
SPEND_IN_DOLLAR: 240
- targeting_type: APPTYPE
targeting_value: android_mobile
metrics:
AD_GROUP_ID: 2680067996745
DATE: '2022-04-26'
SPEND_IN_DOLLAR: 240
- targeting_type: APPTYPE
targeting_value: android_tablet
metrics:
AD_GROUP_ID: 2680067996745
DATE: '2022-04-26'
SPEND_IN_DOLLAR: 240
- targeting_type: GENDER
targeting_value: female
metrics:
AD_GROUP_ID: 2680067996745
DATE: '2022-04-26'
SPEND_IN_DOLLAR: 240
- targeting_type: LOCATION
targeting_value: 500
metrics:
AD_GROUP_ID: 2680067996745
DATE: '2022-04-26'
SPEND_IN_DOLLAR: 240
- targeting_type: PLACEMENT
targeting_value: SEARCH
metrics:
AD_GROUP_ID: 2680067996745
DATE: '2022-04-26'
SPEND_IN_DOLLAR: 240
- targeting_type: COUNTRY
targeting_value: US
metrics:
AD_GROUP_ID: 2680067996745
DATE: '2022-04-26'
SPEND_IN_DOLLAR: 240
- targeting_type: TARGETED_INTEREST
targeting_value: Food and Drinks
metrics:
AD_GROUP_ID: 2680067996745
DATE: '2022-04-26'
SPEND_IN_DOLLAR: 240
- targeting_type: PINNER_INTEREST
targeting_value: Chocolate Cookies
metrics:
AD_GROUP_ID: 2680067996745
DATE: '2022-04-26'
SPEND_IN_DOLLAR: 240
- targeting_type: AUDIENCE_INCLUDE
targeting_value: 254261234567
metrics:
AD_GROUP_ID: 2680067996745
DATE: '2022-04-26'
SPEND_IN_DOLLAR: 240
- targeting_type: GEO
targeting_value: US:94102
metrics:
AD_GROUP_ID: 2680067996745
DATE: '2022-04-26'
SPEND_IN_DOLLAR: 240
- targeting_type: AGE_BUCKET
targeting_value: 45-49
metrics:
AD_GROUP_ID: 2680067996745
DATE: '2022-04-26'
SPEND_IN_DOLLAR: 240
- targeting_type: REGION
targeting_value: US-CA
metrics:
AD_GROUP_ID: 2680067996745
DATE: '2022-04-26'
SPEND_IN_DOLLAR: 240
type: object
Paginated:
type: object
properties:
items:
type: array
items:
type: object
bookmark:
type: string
nullable: true
required:
- items
CreativeType:
type: string
description: Ad creative type enum. For update, only draft ads may update creative type. Note: SHOP_THE_PIN has been deprecated. Please use COLLECTION instead.
enum:
- REGULAR
- VIDEO
- SHOPPING
- CAROUSEL
- MAX_VIDEO
- SHOP_THE_PIN
- COLLECTION
- IDEA
- SHOWCASE
- QUIZ
example: REGULAR
title: CreativeType
AdPinId:
type: object
properties:
pin_id:
description: Pin ID.
example: '394205773611545468'
type: string
pattern: ^\d+$
AdArrayResponse:
type: object
properties:
items:
type: array
items:
$ref: '#/components/schemas/AdArrayResponseElement'
title: AdArrayResponse
TrackingUrls:
description: Third-party tracking URLs. Up to three tracking URLs - with a max length of 2,000 - are supported for each event type. Tracking URLs set at the ad group or ad level can override those set at the campaign level. For more information, see Third-party and dynamic tracking.
example:
impression:
- URL1
- URL2
click:
- URL1
- URL2
engagement:
- URL1
- URL2
buyable_button:
- URL1
- URL2
audience_verification:
- URL1
- URL2
type: object
nullable: true
properties:
impression:
type: array
items:
type: string
click:
type: array
items:
type: string
engagement:
type: array
items:
type: string
buyable_button:
type: array
items:
type: string
audience_verification:
type: array
items:
type: string
ConversionReportAttributionType:
type: string
description: Attribution type. Refers to the Pinterest Tag endpoints
example: INDIVIDUAL
enum:
- INDIVIDUAL
- HOUSEHOLD
QuizPinOption:
description: ' This field contains multiple options to a quiz question.'
example:
id: 1
text: Where do you thrive?
type: object
nullable: true
properties:
id:
type: number
text:
type: string
PinPromotionSummaryStatus:
type: string
description: Summary status for pin promotions
example: APPROVED
enum:
- APPROVED
- PAUSED
- PENDING
- REJECTED
- ADVERTISER_DISABLED
- ARCHIVED
- DRAFT
- DELETED_DRAFT
AdArrayResponseElement:
type: object
properties:
data:
$ref: '#/components/schemas/AdResponse'
exceptions:
$ref: '#/components/schemas/Exception'
QuizPinData:
description: This field includes all quiz data including questions, options, and results.
example:
questions:
- question_id: 1
question_text: Where do you thrive?
options:
- text: Hangout vibes
- text: Time to party!
- text: Keeping it lowkey
- question_id: 2
question_text: Where would you nap?
options:
- text: Hammock in the mountains
- text: Beach towel in the sand
- text: Tent under the stars
- question_id: 2
question_text: Who are you taking?
options:
- text: No onesolo trip!
- text: My best friend
- text: The family
results:
- organicPinId: '1234'
android_deep_link: https://www.pinterest.com/
iOS_deep_link: https://www.pinterest.com/
destination_url: https://www.pinterest.com/
result_id: 1
- organicPinId: '1234'
android_deep_link: https://www.pinterest.com/
iOS_deep_link: https://www.pinterest.com/
destination_url: https://www.pinterest.com/
result_id: 2
- organicPinId: '1234'
android_deep_link: https://www.pinterest.com/
iOS_deep_link: https://www.pinterest.com/
destination_url: https://www.pinterest.com/
result_id: 3
type: object
nullable: true
properties:
questions:
type: array
items:
$ref: '#/components/schemas/QuizPinQuestion'
results:
type: array
items:
$ref: '#/components/schemas/QuizPinResult'
AdsAnalyticsTargetingType:
type: string
description: Reporting targeting type
example: APPTYPE
enum:
- KEYWORD
- APPTYPE
- GENDER
- LOCATION
- PLACEMENT
- COUNTRY
- TARGETED_INTEREST
- PINNER_INTEREST
- AUDIENCE_INCLUDE
- GEO
- AGE_BUCKET
- REGION
- AGE_BUCKET_AND_GENDER
AdsCreditRedeemResponse:
type: object
properties:
success:
description: Returns true if the offer code was successfully applied(validateOnly=false) or can be applied(validateOnly=true).
type: boolean
example: false
errorCode:
description: Error code type if error occurs
type: integer
nullable: true
example: 2708
errorMessage:
description: Reason for failure
type: string
nullable: true
example: The offer has already been redeemed by this advertiser
AdCommon:
type: object
description: Creation fields
properties:
ad_group_id:
description: ID of the ad group that contains the ad.
example: '2680059592705'
type: string
pattern: ^(AG)?\d+$
android_deep_link:
description: Deep link URL for Android devices. Not currently available. Using this field will generate an error.
nullable: true
type: string
carousel_android_deep_links:
description: Comma-separated deep links for the carousel pin on Android.
type: array
nullable: true
items:
type: string
carousel_destination_urls:
description: Comma-separated destination URLs for the carousel pin to promote.
type: array
nullable: true
items:
type: string
carousel_ios_deep_links:
description: Comma-separated deep links for the carousel pin on iOS.
type: array
nullable: true
items:
type: string
click_tracking_url:
description: Tracking url for the ad clicks.
type: string
nullable: true
creative_type:
$ref: '#/components/schemas/CreativeType'
destination_url:
description: Destination URL.
type: string
nullable: true
ios_deep_link:
description: Deep link URL for iOS devices. Not currently available. Using this field will generate an error.
type: string
nullable: true
is_pin_deleted:
description: Is original pin deleted?
example: false
type: boolean
is_removable:
description: Is pin repinnable?
example: false
type: boolean
name:
description: Name of the ad - 255 chars max.
type: string
nullable: true
status:
$ref: '#/components/schemas/EntityStatus'
tracking_urls:
type: object
allOf:
- $ref: '#/components/schemas/TrackingUrls'
nullable: true
view_tracking_url:
description: Tracking URL for ad impressions.
type: string
nullable: true
lead_form_id:
description: Lead form ID for lead ad generation.
type: string
pattern: ^(AG)?\d+$
nullable: true
grid_click_type:
$ref: '#/components/schemas/GridClickType'
customizable_cta_type:
type: string
description: Select a call to action (CTA) to display below your ad. Available only for ads with direct links enabled. CTA options for consideration and conversion campaigns are LEARN_MORE, SHOP_NOW, BOOK_NOW, SIGN_UP, VISIT_WEBSITE, BUY_NOW, GET_OFFER, ORDER_NOW, ADD_TO_CART (for conversion campaigns with add to cart conversion events only)
example: LEARN_MORE
nullable: true
enum:
- GET_OFFER
- LEARN_MORE
- ORDER_NOW
- SHOP_NOW
- SIGN_UP
- SUBSCRIBE
- BUY_NOW
- CONTACT_US
- GET_QUOTE
- VISIT_WEBSITE
- APPLY_NOW
- BOOK_NOW
- REQUEST_DEMO
- REGISTER_NOW
- FIND_A_DEALER
- ADD_TO_CART
- WATCH_NOW
- READ_MORE
- null
quiz_pin_data:
type: object
allOf:
- $ref: '#/components/schemas/QuizPinData'
description: Before creating a quiz ad, you must create an organic Pin using POST/Create Pin for each result in the quiz. Quiz ads cannot be saved by a Pinner. Quiz ad results can be saved.
nullable: true
AdsCreditRedeemRequest:
type: object
required:
- offerCodeHash
- validateOnly
properties:
offerCodeHash:
description: Takes in a SHA256 hash of the offerCode.
example: 138e9e0ff7e38cf511b880975eb574c09aa9d5e1657590ab0431040da68caa67
type: string
pattern: ^[a-z0-9]*$
validateOnly:
description: If true, only validate if we can redeem offer code. Otherwise it will actually apply the offer code to the account
example: true
type: boolean
Granularity:
type: string
description: Granularity
enum:
- TOTAL
- DAY
- HOUR
- WEEK
- MONTH
AdPreviewURLResponse:
example:
url: https://ads.pinterest.com/ad-preview/58f1a0e9ab0bd0f99462a0e4c5dd7e8297888c8a36331e88f757abe8f0295d31/
properties:
url:
description: '''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: https://ads.pinterest.com/ad-preview/58f1a0e9ab0bd0f99462a0e4c5dd7e8297888c8a36331e88f757abe8f0295d31/
title: url
type: string
title: AdPreviewURLResponse
type: object
AdResponse:
type: object
allOf:
- $ref: '#/components/schemas/AdCommon'
- $ref: '#/components/schemas/AdPinId'
- type: object
properties:
ad_account_id:
description: The ID of the advertiser that this ad belongs to.
example: '549755885175'
type: string
pattern: ^\d+$
campaign_id:
description: ID of the ad campaign that contains this ad.
example: '626735565838'
type: string
pattern: ^\d+$
collection_items_destination_url_template:
description: Destination URL template for all items within a collections drawer.
type: string
nullable: true
created_time:
description: Pin creation time. Unix timestamp in seconds.
example: 1451431341
type: integer
id:
description: The ID of this ad.
example: '687195134316'
type: string
pattern: ^\d+$
rejected_reasons:
description: Enum reason why the pin was rejected. Returned if review_status is "REJECTED".
type: array
items:
type: string
description: ad disapproval reasons
enum:
- HASHTAGS
- PROMOTIONS_AND_PRICES
- TARGETING
- LANDING_PAGE
- CAPS_AND_SYMBOLS
- SHOCKING
- WEIGHT_LOSS
- PROHIBITED_PRODUCT
- AUTHENTICITY
- NUDITY
- CONFUSING_DESIGN
- URGENCY
- RATINGS
- APP
- ALCOHOL
- CONTESTS
- POLITICAL
- OTHER
- IMAGE
- NAR
- INCONSISTENT
- CLICKBAIT
- NO_DESCRIPTION
- LOW_QUALITY
- EXAGGERATED_CLAIMS
- PINTEREST_BRAND
- ALCOHOL_NO_SALE
- LANDING_PAGE_SPEED
- LANDING_PAGE_HARDWALL
- LANDING_PAGE_BROKEN
- LANDING_PAGE_QUALITY
- OUT_OF_STOCK
- IMAGE_LOW_QUALITY
- IMAGE_BUSY
- IMAGE_POORLY_EDITED
- IMAGE_BEFORE_AFTER
- UGC
- FAKE_BUTTONS
- WEAPONS
- SENSITIVE
- UNACCEPTABLE_BUSINESS
- SUSPICIOUS_CLAIMS
- PHARMA
- SUSPICIOUS_SUPPLEMENTS
- ILLEGAL_RECREATIONAL_DRUG
- LOW_QUALITY_LANDING_PAGE
- RESTRICTED_HEALTHCARE
- INCONSISTENT_LANG_FR
rejection_labels:
description: Text reason why the pin was rejected. Returned if review_status is "REJECTED".
type: array
items:
type: string
review_status:
type: string
description: Ad review status
example: PENDING
enum:
- OTHER
- PENDING
- REJECTED
- APPROVED
type:
description: Always "ad".
example: pinpromotion
type: string
updated_time:
description: Last update time. Unix timestamp in seconds.
example: 1451431341
type: integer
summary_status:
type: string
allOf:
- $ref: '#/components/schemas/PinPromotionSummaryStatus'
description: Ad summary status
GridClickType:
type: string
description: Where a user is taken after clicking on an ad in grid. Note: This parameter is read-only and is set to DIRECT_TO_DESTINATION by default for direct links supported ads. grid_click_type values provided will be ignored.
example: CLOSEUP
nullable: true
enum:
- CLOSEUP
- DIRECT_TO_DESTINATION
parameters:
query_ad_ids:
description: List of Ad Ids to use to filter the results.
in: query
name: ad_ids
required: false
schema:
type: array
items:
type: string
pattern: ^\d+$
minItems: 1
maxItems: 100
query_end_date:
description: 'Metric report end date (UTC). Format: YYYY-MM-DD. Cannot be more than 90 days past start_date.'
in: query
name: end_date
required: true
schema:
type: string
format: date
path_ad_account_id:
name: ad_account_id
description: Unique identifier of an ad account.
in: path
required: true
schema:
type: string
pattern: ^\d+$
maxLength: 18
query_targeting_types:
name: targeting_types
description: Targeting type breakdowns for the report. The reporting per targeting type