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 specified ad_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
is independent from each other. ["AGE_BUCKET_AND_GENDER"] is in BETA and not yet available to all users. required: true explode: false in: query schema: items: $ref: '#/components/schemas/AdsAnalyticsTargetingType' maxItems: 15 minItems: 1 type: array query_conversion_attribution_click_window_days: name: click_window_days in: query schema: type: integer enum: - 0 - 1 - 7 - 14 - 30 - 60 default: 30 description: Number of days to use as the conversion attribution window for a pin click action. Applies to Pinterest Tag conversion metrics. Prior conversion tags use their defined attribution windows. If not specified, defaults to `30` days. example: 1 query_conversion_attribution_conversion_report_time: description: 'The date by which the conversion metrics returned from this endpoint will be reported. There are two dates associated with a conversion event: the date that the user interacted with the ad, and the date that the user completed a conversion event.' example: TIME_OF_AD_ACTION in: query name: conversion_report_time schema: type: string enum: - TIME_OF_AD_ACTION - TIME_OF_CONVERSION default: TIME_OF_AD_ACTION query_page_size: name: page_size description: Maximum number of items to include in a single page of the response. See documentation on Pagination for more information. in: query required: false schema: type: integer minimum: 1 maximum: 250 default: 25 query_bookmark: name: bookmark description: Cursor used to fetch the next page of items in: query required: false schema: type: string query_granularity: description: TOTAL - metrics are aggregated over the specified date range.
DAY - metrics are broken down daily.
HOUR - metrics are broken down hourly.
WEEKLY - metrics are broken down weekly.
MONTHLY - metrics are broken down monthly example: DAY in: query name: granularity required: true schema: $ref: '#/components/schemas/Granularity' query_order: description: 'The order in which to sort the items returned: ASCENDING or DESCENDING by ID. Note that higher-value IDs are associated with more-recently added items.' in: query name: order required: false schema: type: string example: ASCENDING enum: - ASCENDING - DESCENDING query_columns: description: 'Columns to retrieve, encoded as a comma-separated string. **NOTE**: Any metrics defined as MICRO_DOLLARS returns a value based on the advertiser profile''s currency field. For USD,($1/1,000,000, or $0.000001 - one one-ten-thousandth of a cent). it''s microdollars. Otherwise, it''s in microunits of the advertiser''s currency.
For example, if the advertiser''s currency is GBP (British pound sterling), all MICRO_DOLLARS fields will be in GBP microunits (1/1,000,000 British pound).
If a column has no value, it may not be returned' explode: false in: query name: columns required: true schema: items: type: string description: Reporting columns for sync reporting endpoints example: TOTAL_CONVERSIONS enum: - SPEND_IN_MICRO_DOLLAR - PAID_IMPRESSION - SPEND_IN_DOLLAR - CPC_IN_MICRO_DOLLAR - ECPC_IN_MICRO_DOLLAR - ECPC_IN_DOLLAR - CTR - ECTR - CAMPAIGN_NAME - PIN_ID - TOTAL_ENGAGEMENT - ENGAGEMENT_1 - ENGAGEMENT_2 - ECPE_IN_DOLLAR - ENGAGEMENT_RATE - EENGAGEMENT_RATE - ECPM_IN_MICRO_DOLLAR - REPIN_RATE - CTR_2 - CAMPAIGN_ID - ADVERTISER_ID - AD_ACCOUNT_ID - PIN_PROMOTION_ID - AD_ID - AD_GROUP_ID - CAMPAIGN_ENTITY_STATUS - CAMPAIGN_OBJECTIVE_TYPE - CPM_IN_MICRO_DOLLAR - CPM_IN_DOLLAR - AD_GROUP_ENTITY_STATUS - ORDER_LINE_ID - ORDER_LINE_NAME - CLICKTHROUGH_1 - REPIN_1 - IMPRESSION_1 - IMPRESSION_1_GROSS - CLICKTHROUGH_1_GROSS - OUTBOUND_CLICK_1 - CLICKTHROUGH_2 - REPIN_2 - IMPRESSION_2 - OUTBOUND_CLICK_2 - TOTAL_CLICKTHROUGH - TOTAL_IMPRESSION - TOTAL_IMPRESSION_USER - TOTAL_IMPRESSION_FREQUENCY - COST_PER_OUTBOUND_CLICK_IN_DOLLAR - TOTAL_ENGAGEMENT_SIGNUP - TOTAL_ENGAGEMENT_CHECKOUT - TOTAL_ENGAGEMENT_LEAD - TOTAL_CLICK_SIGNUP - TOTAL_CLICK_CHECKOUT - TOTAL_CLICK_ADD_TO_CART - TOTAL_CLICK_LEAD - TOTAL_VIEW_SIGNUP - TOTAL_VIEW_CHECKOUT - TOTAL_VIEW_ADD_TO_CART - TOTAL_VIEW_LEAD - TOTAL_CONVERSIONS - TOTAL_ENGAGEMENT_SIGNUP_VALUE_IN_MICRO_DOLLAR - TOTAL_ENGAGEMENT_CHECKOUT_VALUE_IN_MICRO_DOLLAR - TOTAL_CLICK_SIGNUP_VALUE_IN_MICRO_DOLLAR - TOTAL_CLICK_CHECKOUT_VALUE_IN_MICRO_DOLLAR - TOTAL_VIEW_SIGNUP_VALUE_IN_MICRO_DOLLAR - TOTAL_VIEW_CHECKOUT_VALUE_IN_MICRO_DOLLAR - TOTAL_WEB_SESSIONS - WEB_SESSIONS_1 - WEB_SESSIONS_2 - CAMPAIGN_LIFETIME_SPEND_CAP - CAMPAIGN_DAILY_SPEND_CAP - TOTAL_PAGE_VISIT - TOTAL_SIGNUP - TOTAL_CHECKOUT - TOTAL_CUSTOM - TOTAL_LEAD - TOTAL_SIGNUP_VALUE_IN_MICRO_DOLLAR - TOTAL_CHECKOUT_VALUE_IN_MICRO_DOLLAR - TOTAL_CUSTOM_VALUE_IN_MICRO_DOLLAR - PAGE_VISIT_COST_PER_ACTION - PAGE_VISIT_ROAS - CHECKOUT_ROAS - CUSTOM_ROAS - VIDEO_MRC_VIEWS_1 - VIDEO_3SEC_VIEWS_2 - VIDEO_P100_COMPLETE_2 - VIDEO_P0_COMBINED_2 - VIDEO_P25_COMBINED_2 - VIDEO_P50_COMBINED_2 - VIDEO_P75_COMBINED_2 - VIDEO_P95_COMBINED_2 - VIDEO_MRC_VIEWS_2 - VIDEO_LENGTH - ECPV_IN_DOLLAR - ECPCV_IN_DOLLAR - ECPCV_P95_IN_DOLLAR - TOTAL_VIDEO_3SEC_VIEWS - TOTAL_VIDEO_P100_COMPLETE - TOTAL_VIDEO_P0_COMBINED - TOTAL_VIDEO_P25_COMBINED - TOTAL_VIDEO_P50_COMBINED - TOTAL_VIDEO_P75_COMBINED - TOTAL_VIDEO_P95_COMBINED - TOTAL_VIDEO_MRC_VIEWS - TOTAL_VIDEO_AVG_WATCHTIME_IN_SECOND - TOTAL_REPIN_RATE - WEB_CHECKOUT_COST_PER_ACTION - WEB_CHECKOUT_ROAS - TOTAL_WEB_CHECKOUT - TOTAL_WEB_CHECKOUT_VALUE_IN_MICRO_DOLLAR - TOTAL_WEB_CLICK_CHECKOUT - TOTAL_WEB_CLICK_CHECKOUT_VALUE_IN_MICRO_DOLLAR - TOTAL_WEB_ENGAGEMENT_CHECKOUT - TOTAL_WEB_ENGAGEMENT_CHECKOUT_VALUE_IN_MICRO_DOLLAR - TOTAL_WEB_VIEW_CHECKOUT - TOTAL_WEB_VIEW_CHECKOUT_VALUE_IN_MICRO_DOLLAR - INAPP_CHECKOUT_COST_PER_ACTION - TOTAL_OFFLINE_CHECKOUT - IDEA_PIN_PRODUCT_TAG_VISIT_1 - IDEA_PIN_PRODUCT_TAG_VISIT_2 - TOTAL_IDEA_PIN_PRODUCT_TAG_VISIT - LEADS - COST_PER_LEAD - QUIZ_COMPLETED - QUIZ_COMPLETION_RATE - SHOWCASE_PIN_CLICKTHROUGH - SHOWCASE_SUBPAGE_CLICKTHROUGH - SHOWCASE_SUBPIN_CLICKTHROUGH - SHOWCASE_SUBPAGE_IMPRESSION - SHOWCASE_SUBPIN_IMPRESSION - SHOWCASE_SUBPAGE_SWIPE_LEFT - SHOWCASE_SUBPAGE_SWIPE_RIGHT - SHOWCASE_SUBPIN_SWIPE_LEFT - SHOWCASE_SUBPIN_SWIPE_RIGHT - SHOWCASE_SUBPAGE_REPIN - SHOWCASE_SUBPIN_REPIN - SHOWCASE_SUBPAGE_CLOSEUP - SHOWCASE_CARD_THUMBNAIL_SWIPE_FORWARD - SHOWCASE_CARD_THUMBNAIL_SWIPE_BACKWARD - SHOWCASE_AVERAGE_SUBPAGE_CLOSEUP_PER_SESSION - TOTAL_CHECKOUT_CONVERSION_RATE - TOTAL_VIEW_CATEGORY_CONVERSION_RATE - TOTAL_ADD_TO_CART_CONVERSION_RATE - TOTAL_SIGNUP_CONVERSION_RATE - TOTAL_PAGE_VISIT_CONVERSION_RATE - TOTAL_LEAD_CONVERSION_RATE - TOTAL_SEARCH_CONVERSION_RATE - TOTAL_WATCH_VIDEO_CONVERSION_RATE - TOTAL_UNKNOWN_CONVERSION_RATE - TOTAL_CUSTOM_CONVERSION_RATE type: array query_start_date: description: 'Metric report start date (UTC). Format: YYYY-MM-DD. Cannot be more than 90 days back from today.' in: query name: start_date required: true schema: type: string format: date query_conversion_attribution_engagement_window_days: name: engagement_window_days in: query description: Number of days to use as the conversion attribution window for an engagement action. Engagements include saves, closeups, link clicks, and carousel card swipes. Applies to Pinterest Tag conversion metrics. Prior conversion tags use their defined attribution windows. If not specified, defaults to `30` days. schema: type: integer enum: - 0 - 1 - 7 - 14 - 30 - 60 default: 30 query_ad_ids_required: description: List of Ad Ids to use to filter the results. in: query name: ad_ids required: true schema: type: array items: type: string pattern: ^\d+$ minItems: 1 maxItems: 100 query_entity_statuses: in: query name: entity_statuses required: false description: Entity status schema: type: array items: type: string example: ACTIVE enum: - ACTIVE - PAUSED - ARCHIVED - DRAFT - DELETED_DRAFT default: - ACTIVE - PAUSED query_conversion_attribution_view_window_days: name: view_window_days in: query description: Number of days to use as the conversion attribution window for a view action. Applies to Pinterest Tag conversion metrics. Prior conversion tags use their defined attribution windows. If not specified, defaults to `1` day. schema: type: integer enum: - 0 - 1 - 7 - 14 - 30 - 60 default: 1 query_ad_group_ids: description: List of Ad group Ids to use to filter the results. in: query name: ad_group_ids required: false schema: type: array items: type: string pattern: ^\d+$ minItems: 1 maxItems: 100 path_ad_id: name: ad_id description: Unique identifier of an ad. in: path required: true schema: type: string pattern: ^\d+$ maxLength: 18 query_campaign_ids: description: List of Campaign Ids to use to filter the results. in: query name: campaign_ids required: false schema: type: array items: type: string pattern: ^\d+$ maxLength: 18 minItems: 1 maxItems: 100 query_attribution_types: name: attribution_types description: List of types of attribution for the conversion report required: false explode: false in: query schema: $ref: '#/components/schemas/ConversionReportAttributionType' securitySchemes: pinterest_oauth2: type: oauth2 flows: authorizationCode: authorizationUrl: https://www.pinterest.com/oauth/ tokenUrl: https://api.pinterest.com/v5/oauth/token scopes: ads:read: See all of your advertising data, including ads, ad groups, campaigns etc. ads:write: Create, update, or delete ads, ad groups, campaigns etc. billing:read: See all of your billing data, billing profile, etc. billing:write: Create, update, or delete billing data, billing profiles, etc. biz_access:read: See business access data biz_access:write: Create, update, or delete business access data boards:read: See your public boards, including group boards you join boards:read_secret: See your secret boards boards:write: Create, update, or delete your public boards boards:write_secret: Create, update, or delete your secret boards catalogs:read: See all of your catalogs data catalogs:write: Create, update, or delete your catalogs data pins:read: See your public Pins pins:read_secret: See your secret Pins pins:write: Create, update, or delete your public Pins pins:write_secret: Create, update, or delete your secret Pins user_accounts:read: See your user accounts and followers user_accounts:write: Update your user accounts and followers conversion_token: type: http scheme: bearer description: This security scheme only applies to the conversion events endpoint (POST /ad_accounts/{ad_account_id}/events). This endpoint requires a bearer token generated via Ads Manager (ads.pinterest.com). basic: type: http scheme: basic x-tagGroups: - name: Pin and Boards tags: - pins - boards - media - aggregated_comments - aggregated_pin_data - user_account - name: Campaign Management tags: - ad_accounts - campaigns - ad_groups - ads - product_group_promotions - bulk - name: Targeting tags: - audiences - customer_lists - keywords - targeting_template - audience_insights - audience_sharing - name: Ad Formats tags: - lead_forms - lead_ads - leads_export - name: Billing tags: - billing - order_lines - terms_of_service - name: Business Access tags: - business_access_assets - business_access_invite - business_access_relationships - name: Conversions tags: - conversion_events - conversion_tags - name: Others tags: - integrations - oauth - resources - search - terms - name: Shopping tags: - catalogs - name: Deprecated tags: - product_groups