Pinterest API
The Pinterest REST API v5 for managing ads, ad groups, ad accounts, audiences, billing, boards, board sections, pins, catalogs, and analytics on Pinterest.
The Pinterest REST API v5 for managing ads, ad groups, ad accounts, audiences, billing, boards, board sections, pins, catalogs, and analytics on Pinterest.
openapi: 3.0.3
info:
version: 5.13.0
title: Pinterest 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_accounts
description: >-
View analytical information about advertising.
- name: ad_groups
description: View, create or update ad groups.
- name: ads
description: View, create or update ads.
- name: audience_insights
description: View audience insights.
- name: audiences
description: View, create, or update audiences.
- name: billing
description: View, create, or update information related to billing.
- name: boards
description: View, create, update, or delete information about boards.
- name: bulk
description: Create, update, or download ads-related entities in bulk.
- name: campaigns
description: View, create or update campaigns.
- name: catalogs
description: Manage information about shopping product catalogs and items.
- name: conversion_events
description: Submit conversion events via the Pinterest API.
- name: conversion_tags
description: View, create, or update conversion tags.
- name: customer_lists
description: View, create, or update customer lists.
- name: integrations
description: View, create, or update commerce integrations.
- name: keywords
description: View, create or update keywords.
- name: lead_ads
description: View, create, or update lead ads.
- name: lead_forms
description: View lead forms.
- name: leads_export
description: Create and export leads information from lead ads.
- name: media
description: Register and manage media uploads.
- name: oauth
description: Generate and refresh OAuth access tokens.
- name: order_lines
description: View order lines.
- name: pins
description: View, create, update, or delete information about Pins.
- name: product_group_promotions
description: View, create, update, or delete information about promoted product groups.
- name: product_groups
description: View, create, update, or delete information about product groups.
- name: resources
description: >-
View metadata about available metrics and targeting options in the
Pinterest API.
- name: search
description: Search for Pins and boards owned by the current user.
- name: targeting_template
description: View, create or update targeting templates.
- name: terms
description: View related and suggested terms for ads targeting.
- name: terms_of_service
description: View Advertising Terms Of Service.
- name: user_account
description: View user accounts associated with a given access token.
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
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
- Accounts
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
- Accounts
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
- Accounts
/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
- Accounts
- Groups
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>
<strong>Note:</strong>
- '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/>
<p>Microcurrency is used to track very small transactions, based on the
currency set in the advertisers profile.</p>
<p>A microcurrency unit is 10^(-6) of the standard unit of currency
selected in the advertisers profile.</p>
<p><strong>Equivalency equations</strong>, using dollars as an example currency:</p>
<ul>
<li>$1 = 1,000,000 microdollars</li>
<li>1 microdollar = $0.000001 </li>
</ul>
<p><strong>To convert between currency and microcurrency</strong>, using
dollars as an example currency:</p>
<ul>
<li>To convert dollars to microdollars, mutiply dollars by 1,000,000</li>
<li>To convert microdollars to dollars, divide microdollars by 1,000,000</li>
</ul>
- 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.
- 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
- Accounts
- Groups
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
- Accounts
- Groups
/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
- Accounts
- Groups
- Analytics
/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
- Accounts
- Groups
- Analytics
/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.
Potential audience size estimates the number of people you may be able
to reach per month with your campaign.
It is based on historical advertising data and the targeting criteria
you select.
It 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
- Accounts
- Groups
- Audience
- Ad_groups
/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
- Accounts
- Groups
/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
- Accounts
- Previews
- 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:
- Listed campaign ids or ad group ids or ad ids
- Listed entity statuses <p/>
If no filter is provided, all ads in the ad account are returned. <p/>
<strong>Note:</strong><p/>
Provide only campaign_id or ad_group_id or ad_id. Do not provide more
than one type. <p/>
Review status is provided for each ad; if review_status is REJECTED, the
rejected_reasons field will contain additional information.
For 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
- Accounts
- 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:
- Ad
- Accounts
- 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:
- Ad
- Accounts
- Ads
/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
- Accounts
- Ads
- Analytics
/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
# --- truncated at 32 KB (1066 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/pinterest/refs/heads/main/openapi/pinterest-openapi-original.yml