Pinterest Ad API

The Ad API from Pinterest — 63 operation(s) for ad.

Operations 86

GET /ad_accounts List ad accounts #
POST /ad_accounts Create ad account #
GET /ad_accounts/{ad_account_id} Get ad account #
GET /ad_accounts/{ad_account_id}/ad_groups List ad groups #
POST /ad_accounts/{ad_account_id}/ad_groups Create ad groups #
PATCH /ad_accounts/{ad_account_id}/ad_groups Update ad groups #
GET /ad_accounts/{ad_account_id}/ad_groups/analytics Get ad group analytics #
GET /ad_accounts/{ad_account_id}/ad_groups/targeting_analytics Get targeting analytics for ad groups #
POST /ad_accounts/{ad_account_id}/ad_groups/audience_sizing Get audience sizing #
GET /ad_accounts/{ad_account_id}/ad_groups/{ad_group_id} Get ad group #
POST /ad_accounts/{ad_account_id}/ad_previews Create ad preview with pin or image #
GET /ad_accounts/{ad_account_id}/ads List ads #
POST /ad_accounts/{ad_account_id}/ads Create ads #
PATCH /ad_accounts/{ad_account_id}/ads Update ads #
GET /ad_accounts/{ad_account_id}/ads/analytics Get ad analytics #
GET /ad_accounts/{ad_account_id}/ads_credit/discounts Get ads credit discounts #
POST /ad_accounts/{ad_account_id}/ads_credit/redeem Redeem ad credits #
GET /ad_accounts/{ad_account_id}/ads/targeting_analytics Get targeting analytics for ads #
GET /ad_accounts/{ad_account_id}/ads/{ad_id} Get ad #
GET /ad_accounts/{ad_account_id}/analytics Get ad account analytics #
GET /ad_accounts/{ad_account_id}/audience_insights Get audience insights #
GET /ad_accounts/{ad_account_id}/audiences List audiences #
POST /ad_accounts/{ad_account_id}/audiences Create audience #
GET /ad_accounts/{ad_account_id}/audiences/{audience_id} Get audience #
PATCH /ad_accounts/{ad_account_id}/audiences/{audience_id} Update audience #
POST /ad_accounts/{ad_account_id}/audiences/custom Create custom audience #
POST /ad_accounts/{ad_account_id}/bid_floor Get bid floors #
GET /ad_accounts/{ad_account_id}/billing_profiles Get billing profiles #
POST /ad_accounts/{ad_account_id}/bulk/download Get advertiser entities in bulk #
POST /ad_accounts/{ad_account_id}/bulk/upsert Create/update ad entities in bulk #
GET /ad_accounts/{ad_account_id}/bulk/{bulk_request_id} Download advertiser entities in bulk #
GET /ad_accounts/{ad_account_id}/campaigns List campaigns #
POST /ad_accounts/{ad_account_id}/campaigns Create campaigns #
PATCH /ad_accounts/{ad_account_id}/campaigns Update campaigns #
GET /ad_accounts/{ad_account_id}/campaigns/analytics Get campaign analytics #
GET /ad_accounts/{ad_account_id}/campaigns/targeting_analytics Get targeting analytics for campaigns #
GET /ad_accounts/{ad_account_id}/campaigns/{campaign_id} Get campaign #
GET /ad_accounts/{ad_account_id}/conversion_tags Get conversion tags #
POST /ad_accounts/{ad_account_id}/conversion_tags Create conversion tag #
GET /ad_accounts/{ad_account_id}/conversion_tags/ocpm_eligible Get Ocpm eligible conversion tags #
GET /ad_accounts/{ad_account_id}/conversion_tags/page_visit Get page visit conversion tags #
GET /ad_accounts/{ad_account_id}/conversion_tags/{conversion_tag_id} Get conversion tag #
POST /ad_accounts/{ad_account_id}/customer_lists Create customer lists #
GET /ad_accounts/{ad_account_id}/customer_lists Get customer lists #
GET /ad_accounts/{ad_account_id}/customer_lists/{customer_list_id} Get customer list #
PATCH /ad_accounts/{ad_account_id}/customer_lists/{customer_list_id} Update customer list #
POST /ad_accounts/{ad_account_id}/events Send conversions #
GET /ad_accounts/{ad_account_id}/insights/audiences Get audience insights scope and type #
GET /ad_accounts/{ad_account_id}/keywords Get keywords #
POST /ad_accounts/{ad_account_id}/keywords Create keywords #
PATCH /ad_accounts/{ad_account_id}/keywords Update keywords #
GET /ad_accounts/{ad_account_id}/keywords/metrics Get country's keyword metrics #
GET /ad_accounts/{ad_account_id}/lead_forms Get lead forms #
GET /ad_accounts/{ad_account_id}/lead_forms/{lead_form_id} Get lead form by id #
POST /ad_accounts/{ad_account_id}/lead_forms/{lead_form_id}/test Create lead form test data #
POST /ad_accounts/{ad_account_id}/leads/subscriptions Create lead ads subscription #
GET /ad_accounts/{ad_account_id}/leads/subscriptions Get lead ads subscriptions #
GET /ad_accounts/{ad_account_id}/leads/subscriptions/{subscription_id} Get lead ads subscription #
DELETE /ad_accounts/{ad_account_id}/leads/subscriptions/{subscription_id} Delete lead ads subscription #
GET /ad_accounts/{ad_account_id}/mmm_reports Get advertiser Marketing Mix Modeling (MMM) report. #
POST /ad_accounts/{ad_account_id}/mmm_reports Create a request for a Marketing Mix Modeling (MMM) report #
GET /ad_accounts/{ad_account_id}/order_lines Get order lines #
GET /ad_accounts/{ad_account_id}/order_lines/{order_line_id} Get order line #
POST /ad_accounts/{ad_account_id}/product_group_promotions Create product group promotions #
PATCH /ad_accounts/{ad_account_id}/product_group_promotions Update product group promotions #
GET /ad_accounts/{ad_account_id}/product_group_promotions Get product group promotions #
GET /ad_accounts/{ad_account_id}/product_group_promotions/{product_group_promotion_id} Get a product group promotion by id #
GET /ad_accounts/{ad_account_id}/product_groups/analytics Get product group analytics #
GET /ad_accounts/{ad_account_id}/product_groups/catalogs Get catalog product groups #
GET /ad_accounts/{ad_account_id}/reports Get the account analytics report created by the async call #
POST /ad_accounts/{ad_account_id}/reports Create async request for an account analytics report #
DELETE /ad_accounts/{ad_account_id}/sandbox Delete ads data for ad account in API Sandbox #
GET /ad_accounts/{ad_account_id}/ssio/accounts Get Salesforce account details including bill-to information. #
POST /ad_accounts/{ad_account_id}/ssio/insertion_orders Create insertion order through SSIO. #
PATCH /ad_accounts/{ad_account_id}/ssio/insertion_orders Edit insertion order through SSIO. #
GET /ad_accounts/{ad_account_id}/ssio/insertion_orders/status Get insertion order status by ad account id. #
GET /ad_accounts/{ad_account_id}/ssio/insertion_orders/{pin_order_id}/status Get insertion order status by pin order id. #
GET /ad_accounts/{ad_account_id}/ssio/order_lines Get Salesforce order lines by ad account id. #
GET /ad_accounts/{ad_account_id}/targeting_analytics Get targeting analytics for an ad account #
GET /ad_accounts/{ad_account_id}/targeting_templates List targeting templates #
POST /ad_accounts/{ad_account_id}/targeting_templates Create targeting templates #
PATCH /ad_accounts/{ad_account_id}/targeting_templates Update targeting templates #
GET /ad_accounts/{ad_account_id}/templates List templates #
POST /ad_accounts/{ad_account_id}/templates/{template_id}/reports Create async request for an analytics report using a template #
GET /ad_accounts/{ad_account_id}/terms_of_service Get terms of service #
GET /resources/ad_account_countries Get ad accounts countries #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/pinterest-ad-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

pinterest-ad-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  version: 5.13.0
  title: Pinterest Ad 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: Ad
paths:
  /ad_accounts:
    get:
      summary: List ad accounts
      description: 'Get a list of the ad_accounts that the "operation user_account" has access to.

        - This includes ad_accounts they own and ad_accounts that are owned by others who have granted them <a href="https://help.pinterest.com/en/business/article/share-and-manage-access-to-your-ad-accounts">Business Access</a>.'
      tags:
      - Ad
      operationId: ad_accounts/list
      security:
      - pinterest_oauth2:
        - ads:read
      x-ratelimit-category: ads_read
      x-sandbox: enabled
      parameters:
      - $ref: '#/components/parameters/query_bookmark'
      - $ref: '#/components/parameters/query_page_size'
      - $ref: '#/components/parameters/query_include_shared_accounts'
      responses:
        '200':
          description: response
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/Paginated'
                - type: object
                  properties:
                    items:
                      description: Ad accounts
                      items:
                        $ref: '#/components/schemas/AdAccount'
        default:
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    post:
      summary: Create ad account
      description: 'Create a new ad account. Different ad accounts can support different currencies, payment methods, etc.

        An ad account is needed to create campaigns, ad groups, and ads; other accounts (your employees or partners) can be assigned business access and appropriate roles to access an ad account. <p/>

        You can set up up to 50 ad accounts per user. (The user must have a business account to create an ad account.) <p/>

        For more, see <a class="reference external" href="https://help.pinterest.com/en/business/article/create-an-advertiser-account">Create an advertiser account</a>.'
      tags:
      - Ad
      operationId: ad_accounts/create
      security:
      - pinterest_oauth2:
        - ads:write
      x-ratelimit-category: ads_write
      x-sandbox: enabled
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AdAccountCreateRequest'
        description: Ad account to create.
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdAccount'
          description: Success
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Unexpected error
  /ad_accounts/{ad_account_id}:
    get:
      summary: Get ad account
      description: Get an ad account
      operationId: ad_accounts/get
      security:
      - pinterest_oauth2:
        - ads:read
      x-ratelimit-category: ads_read
      x-sandbox: enabled
      parameters:
      - $ref: '#/components/parameters/path_ad_account_id'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdAccount'
          description: Success
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Unexpected error
      tags:
      - Ad
  /ad_accounts/{ad_account_id}/ad_groups:
    get:
      summary: List ad groups
      description: 'List ad groups based on provided campaign IDs or ad group IDs.(campaign_ids or ad_group_ids). <p/>

        <strong>Note:</strong><p/>

        Provide only campaign_id or ad_group_id. Do not provide both.'
      operationId: ad_groups/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_entity_statuses'
      - $ref: '#/components/parameters/query_page_size'
      - $ref: '#/components/parameters/query_order'
      - $ref: '#/components/parameters/query_bookmark'
      - $ref: '#/components/parameters/query_translate_interests_to_names'
      responses:
        '200':
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/Paginated'
                - type: object
                  properties:
                    items:
                      type: array
                      items:
                        $ref: '#/components/schemas/AdGroupResponse'
          description: Success
        '400':
          description: Invalid ad account group parameters.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                code: 400
                message: Invalid ad account group parameters.
        default:
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      tags:
      - Ad
    post:
      summary: Create ad groups
      description: "Create multiple new ad groups. All ads in a given ad group will have the same budget, bid, run dates, targeting, and placement (search, browse, other). For more information, <a href=\"https://help.pinterest.com/en/business/article/campaign-structure\" target=\"_blank\"> click here</a>.</p>\n<strong>Note:</strong>\n- 'bid_in_micro_currency' and 'budget_in_micro_currency' should be expressed in microcurrency amounts based on the currency field set in the advertiser's profile.<p/>\n<p>Microcurrency is used to track very small transactions, based on the currency set in the advertisers profile.</p>\n<p>A microcurrency unit is 10^(-6) of the standard unit of currency selected in the advertisers profile.</p>\n <p><strong>Equivalency equations</strong>, using dollars as an example currency:</p>\n<ul>\n  <li>$1 = 1,000,000 microdollars</li>\n  <li>1 microdollar = $0.000001 </li>\n</ul>\n<p><strong>To convert between currency and microcurrency</strong>, using dollars as an example currency:</p>\n<ul>\n  <li>To convert dollars to microdollars, mutiply dollars by 1,000,000</li>\n  <li>To convert microdollars to dollars, divide microdollars by 1,000,000</li>\n</ul>\n- Ad groups belong to ad campaigns. Some types of campaigns (e.g. budget optimization) have limits on the number of ad groups they can hold. If you exceed those limits, you will get an error message.\n- Start and end time cannot be set for ad groups that belong to CBO campaigns. Currently, campaigns with the following objective types: TRAFFIC, AWARENESS, WEB_CONVERSIONS, and CATALOG_SALES will default to CBO."
      operationId: ad_groups/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/AdGroupCreateRequest'
              maxItems: 30
              minItems: 1
              type: array
        description: List of ad groups to create, size limit [1, 30].
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdGroupArrayResponse'
          description: Success
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Unexpected error
      tags:
      - Ad
    patch:
      summary: Update ad groups
      description: Update multiple existing ad groups.
      operationId: ad_groups/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/AdGroupUpdateRequest'
              maxItems: 30
              minItems: 1
              type: array
        description: List of ad groups to update, size limit [1, 30].
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdGroupArrayResponse'
          description: Success
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Unexpected error
      tags:
      - Ad
  /ad_accounts/{ad_account_id}/ad_groups/analytics:
    get:
      summary: Get ad group analytics
      description: 'Get analytics for the specified ad groups in the specified <code>ad_account_id</code>, 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 <a href="https://help.pinterest.com/en/business/article/share-and-manage-access-to-your-ad-accounts">Business Access</a>: 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_groups/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_group_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/AdGroupsAnalyticsResponse'
          description: Success
        '400':
          description: Invalid ad account group analytics parameters.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                code: 400
                message: Invalid ad account group analytics parameters.
        default:
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      tags:
      - Ad
  /ad_accounts/{ad_account_id}/ad_groups/targeting_analytics:
    get:
      summary: Get targeting analytics for ad groups
      description: 'Get targeting analytics for one or more ad groups.

        For the requested ad group(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"). <p/>

        - 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

        <a href="https://help.pinterest.com/en/business/article/share-and-manage-access-to-your-ad-accounts">Business Access</a>: 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_groups_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_group_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:
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      tags:
      - Ad
  /ad_accounts/{ad_account_id}/ad_groups/audience_sizing:
    post:
      summary: Get audience sizing
      description: "Get potential audience size for an ad group with given targeting criteria. \nPotential audience size estimates the number of people you may be able to reach per month with your campaign. \nIt is based on historical advertising data and the targeting criteria you select.\nIt does not guarantee results or take into account factors such as bid, budget, schedule, seasonality or product experiments."
      operationId: ad_groups/audience_sizing
      security:
      - pinterest_oauth2:
        - ads:read
      x-ratelimit-category: ads_read
      x-sandbox: enabled
      parameters:
      - $ref: '#/components/parameters/path_ad_account_id'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AdGroupAudienceSizingRequest'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdGroupAudienceSizingResponse'
          description: Success
        '400':
          description: Invalid ad group audience sizing parameters.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                code: 400
                message: Invalid ad group audience sizing parameters.
        '403':
          description: No access to requested audience list or product group.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                code: 403
                message: You don't have access to the requested audience list or product group.
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Unexpected error
      tags:
      - Ad
  /ad_accounts/{ad_account_id}/ad_groups/{ad_group_id}:
    get:
      summary: Get ad group
      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 <a href="https://www.pinterest.com/_/_/policy/advertising-guidelines/"

        target="_blank">Pinterest advertising standards</a>.'
      operationId: ad_groups/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_group_id'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdGroupResponse'
          description: Success
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Unexpected error
      tags:
      - Ad
  /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. <p/>

        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 <a href="https://help.pinterest.com/en/business/article/promoted-pins-overview" target="_blank">Ads Overview</a>.) <p/>

        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:
      - Ad
      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 <p/>\nIf no filter is provided, all ads in the ad account are returned. <p/>\n<strong>Note:</strong><p/>\nProvide only campaign_id or ad_group_id or ad_id. Do not provide more than one type. <p/>\nReview status is provided for each ad; if review_status is REJECTED, the rejected_reasons field will contain additional information.\nFor more, see <a href=\"https://policy.pinterest.com/en/advertising-guidelines\">Pinterest advertising standards</a>."
      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:
      - Ad
    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:
      - Ad
    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:
      - Ad
  /ad_accounts/{ad_account_id}/ads/analytics:
    get:
      summary: Get ad analytics
      description: 'Get analytics for the specified ads in the specified <code>ad_account_id</code>, 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 <a href="https://help.pinterest.com/en/business/article/share-and-manage-access-to-your-ad-accounts">Business Access</a>: 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:
      - Ad
  /ad_accounts/{ad_account_id}/ads_credit/discounts:
    get:
      summary: Get ads credit discounts
      description: 'Returns the list of discounts applied to the account.


        <strong>This endpoint might not be available to all apps. <a href=''/docs/new/about-beta-access/''>Learn more</a>.</strong>'
      operationId: ads_credits_discounts/get
      security:
      - pinterest_oauth2:
        - ads:read
        - billing:read
      x-ratelimit-category: ads_read
      x-sandbox: disabled
      tags:
      - Ad
      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.


        <strong>This endpoint might not be available to all apps. <a href=''/docs/new/about-beta-access/''>Learn more</a>.</strong>'
      tags:
      - Ad
      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"). <p/>

        - 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

        <a href="https://help.pinterest.com/en/business/article/share-and-manage-access-to-your-ad-accounts">Business Access</a>: 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:
      - Ad
  /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 <a href="https://www.pinterest.com/_/_/policy/advertising-guidelines/"

        target="_blank">Pinterest advertising standards</a>.'
      operationId: ads/get
      security:
      - pinterest_oauth2:
        - ads:read
      x-ratelimit

# --- truncated at 32 KB (450 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/pinterest/refs/heads/main/openapi/pinterest-ad-api-openapi.yml