openapi: 3.0.3
info:
version: 5.13.0
title: Pinterest User 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: User
paths:
/user_account:
get:
summary: Get user account
description: 'Get account information for the "operation user_account"
- By default, the "operation user_account" is the token user_account.
If using Business Access: Specify an ad_account_id to use the owner of that ad_account as the "operation user_account". See Understanding Business Access for more information.'
tags:
- User
operationId: user_account/get
security:
- pinterest_oauth2:
- user_accounts:read
x-ratelimit-category: org_read
x-sandbox: enabled
parameters:
- $ref: '#/components/parameters/query_ad_account_id'
responses:
'200':
description: response
content:
application/json:
schema:
$ref: '#/components/schemas/Account'
'403':
description: Not authorized to access the user account.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
code: 403
message: Not authorized to access the user account.
default:
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/user_account/analytics:
get:
summary: Get user account analytics
description: 'Get analytics for the "operation user_account"
- By default, the "operation user_account" is the token user_account.
Optional: Business Access: Specify an ad_account_id to use the owner of that ad_account as the "operation user_account".'
tags:
- User
operationId: user_account/analytics
security:
- pinterest_oauth2:
- user_accounts:read
x-ratelimit-category: org_analytics
x-sandbox: disabled
parameters:
- $ref: '#/components/parameters/query_start_date'
- $ref: '#/components/parameters/query_end_date'
- $ref: '#/components/parameters/query_from_claimed_content'
- $ref: '#/components/parameters/query_pin_format'
- $ref: '#/components/parameters/query_app_types'
- $ref: '#/components/parameters/query_content_type'
- $ref: '#/components/parameters/query_source'
- $ref: '#/components/parameters/query_metric_types'
- $ref: '#/components/parameters/query_split_field_user_account'
- $ref: '#/components/parameters/query_ad_account_id'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/AnalyticsResponse'
description: Success
'400':
description: Invalid user accounts analytics parameters.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
code: 400
message: Invalid user accounts analytics parameters.
'403':
description: Not authorized to access the user account analytics.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
code: 403
message: Not authorized to access the user account analytics.
default:
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/user_account/analytics/top_pins:
get:
summary: Get user account top pins analytics
description: 'Gets analytics data about a user''s top pins (limited to the top 50).
- By default, the "operation user_account" is the token user_account.
Optional: Business Access: Specify an ad_account_id to use the owner of that ad_account as the "operation user_account".'
tags:
- User
operationId: user_account/analytics/top_pins
security:
- pinterest_oauth2:
- pins:read
- user_accounts:read
x-ratelimit-category: org_analytics
x-sandbox: disabled
parameters:
- $ref: '#/components/parameters/query_start_date'
- $ref: '#/components/parameters/query_end_date'
- $ref: '#/components/parameters/query_sort_by'
- $ref: '#/components/parameters/query_from_claimed_content'
- $ref: '#/components/parameters/query_pin_format'
- $ref: '#/components/parameters/query_app_types'
- $ref: '#/components/parameters/query_content_type'
- $ref: '#/components/parameters/query_source'
- $ref: '#/components/parameters/query_metric_types'
- $ref: '#/components/parameters/query_num_of_pins'
- $ref: '#/components/parameters/query_created_in_last_n_days'
- $ref: '#/components/parameters/query_ad_account_id'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/TopPinsAnalyticsResponse'
description: Success
'403':
description: Not authorized to access the user account analytics.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
code: 403
message: Not authorized to access the user account analytics.
default:
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/user_account/analytics/top_video_pins:
get:
summary: Get user account top video pins analytics
description: 'Gets analytics data about a user''s top video pins (limited to the top 50).
- By default, the "operation user_account" is the token user_account.
Optional: Business Access: Specify an ad_account_id to use the owner of that ad_account as the "operation user_account".'
tags:
- User
operationId: user_account/analytics/top_video_pins
security:
- pinterest_oauth2:
- pins:read
- user_accounts:read
x-ratelimit-category: org_analytics
x-sandbox: disabled
parameters:
- $ref: '#/components/parameters/query_start_date'
- $ref: '#/components/parameters/query_end_date'
- $ref: '#/components/parameters/query_video_pin_sort_by'
- $ref: '#/components/parameters/query_from_claimed_content'
- $ref: '#/components/parameters/query_pin_format'
- $ref: '#/components/parameters/query_app_types'
- $ref: '#/components/parameters/query_content_type'
- $ref: '#/components/parameters/query_source'
- $ref: '#/components/parameters/query_video_pin_metric_types'
- $ref: '#/components/parameters/query_num_of_pins'
- $ref: '#/components/parameters/query_created_in_last_n_days'
- $ref: '#/components/parameters/query_ad_account_id'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/TopVideoPinsAnalyticsResponse'
description: Success
'403':
description: Not authorized to access the user account analytics.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
code: 403
message: Not authorized to access the user account analytics.
default:
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/user_account/businesses:
get:
summary: List linked businesses
description: Get a list of your linked business accounts.
operationId: linked_business_accounts/get
security:
- pinterest_oauth2:
- user_accounts:read
x-ratelimit-category: org_read
x-sandbox: enabled
responses:
'200':
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/LinkedBusiness'
description: Success
default:
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: Unexpected error
tags:
- User
/user_account/followers:
get:
summary: List followers
description: Get a list of your followers.
operationId: followers/list
security:
- pinterest_oauth2:
- user_accounts:read
x-ratelimit-category: ads_read
x-sandbox: enabled
parameters:
- $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/UserSummary'
description: Success
'400':
description: Invalid user id
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
code: 400
message: Invalid user id
default:
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
tags:
- User
/user_account/following:
get:
summary: List following
description: Get a list of who a certain user follows.
operationId: user_following/get
security:
- pinterest_oauth2:
- user_accounts:read
x-ratelimit-category: org_read
x-sandbox: disabled
parameters:
- $ref: '#/components/parameters/query_bookmark'
- $ref: '#/components/parameters/query_page_size'
- $ref: '#/components/parameters/query_user_following_feed_type'
- $ref: '#/components/parameters/query_explicit_following'
- $ref: '#/components/parameters/query_ad_account_id'
responses:
'200':
description: response
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/Paginated'
- type: object
properties:
items:
description: Users
items:
$ref: '#/components/schemas/UserSummary'
default:
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
tags:
- User
/user_account/following/boards:
get:
summary: List following boards
description: Get a list of the boards a user follows. The request returns a board summary object array.
operationId: boards_user_follows/list
security:
- pinterest_oauth2:
- user_accounts:read
x-ratelimit-category: org_read
x-sandbox: enabled
parameters:
- $ref: '#/components/parameters/query_bookmark'
- $ref: '#/components/parameters/query_page_size'
- $ref: '#/components/parameters/query_explicit_following'
- $ref: '#/components/parameters/query_ad_account_id'
responses:
'200':
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/Paginated'
- type: object
properties:
items:
type: array
items:
$ref: '#/components/schemas/Board'
description: Success
'400':
description: Invalid user id
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
code: 400
message: Invalid user id
default:
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
tags:
- User
/user_account/following/{username}:
post:
summary: Follow user
description: 'This endpoint is currently in beta and not available to all apps. Learn more.
Use this request, as a signed-in user, to follow another user.'
tags:
- User
operationId: follow_user/update
security:
- pinterest_oauth2:
- user_accounts:write
x-ratelimit-category: org_write
x-sandbox: enabled
parameters:
- $ref: '#/components/parameters/path_username'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/FollowUserRequest'
description: Follow a user.
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/UserSummary'
description: Success
'404':
description: User not found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
examples:
UserNotFound:
value:
code: 30
message: User not found.
default:
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: Unexpected error
/user_account/websites:
post:
summary: Verify website
description: Verify a website as a signed-in user.
tags:
- User
operationId: verify_website/update
security:
- pinterest_oauth2:
- user_accounts:write
x-ratelimit-category: org_write
x-sandbox: disabled
requestBody:
description: Verify a website.
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/UserWebsiteVerifyRequest'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/UserWebsiteSummary'
description: Success
default:
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: Unexpected error
get:
summary: Get user websites
description: Get user websites, claimed or not
tags:
- User
operationId: user_websites/get
security:
- pinterest_oauth2:
- user_accounts:read
parameters:
- $ref: '#/components/parameters/query_bookmark'
- $ref: '#/components/parameters/query_page_size'
responses:
'200':
description: Success
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/Paginated'
- type: object
properties:
items:
type: array
items:
$ref: '#/components/schemas/UserWebsiteSummary'
'403':
description: Not authorized to access the user website list.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
code: 403
message: Not authorized to access the user website list.
default:
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
x-ratelimit-category: org_read
x-sandbox: disabled
delete:
summary: Unverify website
description: Unverifu a website verified by the signed-in user.
tags:
- User
operationId: unverify_website/delete
security:
- pinterest_oauth2:
- user_accounts:write
x-ratelimit-category: org_write
x-sandbox: disabled
parameters:
- $ref: '#/components/parameters/query_website'
responses:
'204':
description: Successfully unverified website
'404':
description: Website not in user list.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
code: 404
message: Website not in user list.
default:
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/user_account/websites/verification:
get:
summary: Get user verification code for website claiming
description: Get verification code for user to install on the website to claim it.
tags:
- User
operationId: website_verification/get
security:
- pinterest_oauth2:
- user_accounts:read
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/UserWebsiteVerificationCode'
description: Success
'403':
description: Not authorized to access the user verification code for website claiming.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
code: 403
message: Not authorized to access the user verification code for website claiming.
default:
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: Unexpected error
x-ratelimit-category: org_read
x-sandbox: disabled
components:
schemas:
TopVideoPinsAnalyticsResponse:
type: object
properties:
date_availability:
type: object
properties:
latest_available_timestamp:
type: number
example: 1649116799000
is_realtime:
type: boolean
example: false
pins:
type: array
items:
description: Array with metrics, status, and pin id for the requested metric
type: object
properties:
metrics:
description: The metric name and daily value for each requested metric
type: object
additionalProperties:
type: number
example:
IMPRESSION: 7
QUARTILE_95_PERCENT_VIEW: 2
SAVE: 1
VIDEO_10S_VIEW: 5
VIDEO_AVG_WATCH_TIME: 86989
VIDEO_MRC_VIEW: 2
VIDEO_START: 2
VIDEO_V50_WATCH_TIME: 173979
OUTBOUND_CLICK: 2
data_status:
type: object
additionalProperties:
$ref: '#/components/schemas/DataStatus'
pin_id:
description: The pin id
type: string
example: '642396334344813594'
sort_by:
type: string
enum:
- SAVE
- IMPRESSION
- OUTBOUND_CLICK
- VIDEO_MRC_VIEW
- VIDEO_AVG_WATCH_TIME
- VIDEO_V50_WATCH_TIME
- QUARTILE_95_PERCENT_VIEW
- VIDEO_10S_VIEW
- VIDEO_START
example: IMPRESSION
FollowUserRequest:
title: FollowUserRequest
type: object
properties:
auto_follow:
title: auto_follow
type: boolean
description: Whether this request comes as result of auto-follow after clicking on a link. Follow links can be used by partners on their site or in emails. Only selected partners can be followed this way. We verify that partner can be auto-followed.
default: false
example: false
Account:
type: object
readOnly: true
properties:
account_type:
description: Type of account
type: string
enum:
- PINNER
- BUSINESS
id:
description: User account ID.
type: string
pattern: ^\d+$
example: '2783136121146311751'
profile_image:
type: string
website_url:
type: string
username:
type: string
about:
description: Profile about description.
type: string
business_name:
type: string
nullable: true
board_count:
type: integer
readOnly: true
nullable: true
example: 14
description: 'User account board count.
**Note**: Board count on user account level may differ from counts found elsewhere due to attribution of collaborative Boards.'
pin_count:
type: integer
readOnly: true
nullable: true
example: 339
description: User account pin count. This includes both created and saved pins.
follower_count:
type: integer
readOnly: true
nullable: true
example: 10
description: User account follower count.
following_count:
type: integer
readOnly: true
nullable: true
example: 347
description: User account following count.
monthly_views:
type: integer
readOnly: true
nullable: true
example: 163
description: User account monthly views.
UserFollowingFeedType:
description: Specifies the type of followees to be kept when filtering them.
enum:
- ALL
- RANKED
- CREATOR_ONLY
- RANKED_CREATOR_ONLY
example: CREATOR_ONLY
title: UserFollowingFeedType
type: string
default: ALL
Error:
title: Error
type: object
properties:
code:
type: integer
message:
type: string
required:
- code
- message
AnalyticsResponse:
type: object
additionalProperties:
$ref: '#/components/schemas/AnalyticsMetricsResponse'
LinkedBusiness:
title: LinkedBusiness
type: object
properties:
username:
title: username
type: string
description: Username
example: username
image_small_url:
title: image_small_url
type: string
description: image_small_url
example: https://www.example.com/dj23454f53dfk2324.jpg
image_medium_url:
title: image_medium_url
type: string
description: image_medium_url
example: https://www.example.com/dj23454f53dfk2324.jpg
image_large_url:
title: image_large_url
type: string
description: image_large_url
example: https://www.example.com/dj23454f53dfk2324.jpg
image_xlarge_url:
title: image_xlarge_url
type: string
description: image_xlarge_url
example: https://www.example.com/dj23454f53dfk2324.jpg
TopPinsAnalyticsResponse:
type: object
properties:
date_availability:
type: object
properties:
latest_available_timestamp:
type: number
example: 1649116799000
is_realtime:
type: boolean
example: false
pins:
type: array
items:
description: Array with metrics, status, and pin id for the requested metric
type: object
properties:
metrics:
$ref: '#/components/schemas/Metrics'
data_status:
type: object
additionalProperties:
$ref: '#/components/schemas/DataStatus'
pin_id:
description: The pin id
type: string
example: '642396334344813594'
sort_by:
type: string
enum:
- ENGAGEMENT
- SAVE
- IMPRESSION
- OUTBOUND_CLICK
- PIN_CLICK
example: IMPRESSION
Paginated:
type: object
properties:
items:
type: array
items:
type: object
bookmark:
type: string
nullable: true
required:
- items
UserSummary:
title: UserSummary
type: object
properties:
username:
title: username
type: string
description: Username
example: username
type:
title: type
type: string
description: Always "user"
example: user
BoardOwner:
title: Board owner
type: object
properties:
username:
type: string
readOnly: true
UserWebsiteVerifyRequest:
title: User website verification request
description: User website verification request
type: object
properties:
website:
type: string
example: pintest-website-12345678.test/test_1
verification_method:
type: string
default: METATAG
enum:
- FILENAME
- METATAG
- DNSTXT
Board:
title: Board
description: Board
type: object
properties:
id:
type: string
readOnly: true
example: '549755885175'
created_at:
type: string
description: Date and time of board creation.
readOnly: true
format: date-time
example: '2020-01-01T20:10:40-00:00'
board_pins_modified_at:
type: string
description: Date and time of last board pins modified.
readOnly: true
format: date-time
example: '2020-01-01T20:10:40-00:00'
name:
type: string
example: Summer Recipes
description:
type: string
nullable: true
example: My favorite summer recipes
collaborator_count:
type: integer
description: Count of collaborators on the board.
minimum: 0
readOnly: true
example: 17
pin_count:
type: integer
description: Count of pins on the board.
minimum: 0
readOnly: true
example: 5
follower_count:
type: integer
description: Board follower count.
readOnly: true
minimum: 0
example: 13
media:
type: object
readOnly: true
description: Board media.
properties:
image_cover_url:
type: string
nullable: true
description: Board cover image.
example: https://i.pinimg.com/400x300/fd/cd/d5/fdcdd5a6d8a80824add0d054125cd957.jpg
pin_thumbnail_urls:
type: array
description: Board pin thumbnail urls.
items:
type: string
example:
- https://i.pinimg.com/150x150/b4/57/10/b45710f1ede96af55230f4b43935c4af.jpg
- https://i.pinimg.com/150x150/dd/ff/46/ddff4616e39c1935cd05738794fa860e.jpg
- https://i.pinimg.com/150x150/84/ac/59/84ac59b670ccb5b903dace480a98930c.jpg
- https://i.pinimg.com/150x150/4c/54/6f/4c546f521be85e30838fb742bfff6936.jpg
owner:
allOf:
- $ref: '#/components/schemas/BoardOwner'
type: object
readOnly: true
privacy:
type: string
default: PUBLIC
description: Privacy setting for a board. Learn more about secret boards and protected boards
enum:
- PUBLIC
- PROTECTED
- SECRET
required:
- name
AnalyticsDailyMetrics:
type: object
properties:
data_status:
$ref: '#/components/schemas/DataStatus'
date:
description: 'Metrics date (UTC): YYYY-MM-DD.'
example: '2019-12-01'
type: string
metrics:
$ref: '#/components/schemas/Metrics'
AnalyticsMetricsResponse:
type: object
properties:
summary_metrics:
description: The metric name and value over the requested period for each requested metric
type: object
additionalProperties:
type: number
example:
CLOSEUP: 1
CLOSEUP_RATE: 0
ENGAGEMENT: 1
ENGAGEMENT_RATE: 0
IMPRESSION: 240
OUTBOUND_CLICK: 20
OUTBOUND_CLICK_RATE: 0.08
PIN_CLICK: 37
PIN_CLICK_RATE: 0.15
PROFILE_VISIT: 0
QUARTILE_95_PERCENT_VIEW: 8
SAVE: 20
SAVE_RATE: 0.18
VIDEO_10S_VIEW: 2
VIDEO_AVG_WATCH_TIME: 2507.75
VIDEO_MRC_VIEW: 20
VIDEO_START: 29
VIDEO_V50_WATCH_TIME: 10031
daily_metrics:
description: Array with the requested daily metric records
items:
$ref: '#/components/schemas/AnalyticsDailyMetrics'
type: array
UserWebsiteSummary:
title: UserWebsiteSummary
type: object
properties:
website:
title: website
type: string
description: Website with path or domain only
example: mysite.test
status:
title: status
type: string
description: Status of the verification process
example: success
verified_at:
title: verified_at
type: string
description: UTC timestamp when the verification happened - sometimes missing
example: '2022-12-14T21:03:01.602000'
DataStatus:
description: Metrics availablity, e.g., "READY".
example: READY
type: string
enum:
- PROCESSING
- READY
- ESTIMATE
- BEFORE_BUSINESS_CREATED
- BEFORE_DATA_RETENTION_PERIOD
- BEFORE_PIN_DATA_RETENTION_PERIOD
- BEFORE_METRIC_START_DATE
- BEFORE_CORE_METRIC_START_DATE
- BEFORE_PIN_FORMAT_METRIC_START_DATE
- BEFORE_AUDIENCE_METRIC_START_DATE
- BEFORE_AUDIENCE_MONTHLY_METRIC_START_DATE
- BEFORE_VIDEO_METRIC_START_DATE
- BEFORE_CONVERSION_METRIC_START_DATE
- PURCHASERS_METRIC_SMALLER_THAN_THRESHOLD
- IN_BAD_TAG_DATE
- BEFORE_PUBLISHED_METRIC_START_DATE
- BEFORE_ASSIST_METRIC_START_DATE
- BEFORE_PIN_CREATED
- BEFORE_ACCOUNT_CLAIMED
- BEFORE_DEMOGRAPHIC_FILTERS_START_DATE
- AUDIENCE_SEGMENT_SMALLER_THAN_THRESHOLD
- AUDIENCE_TOTAL_SMALLER_THAN_THRESHOLD
- BEFORE_PRODUCT_GROUP_FILTER_START_DATE
Metrics:
description: The metric name and daily value for each requested metric
type: object
additionalProperties:
type: number
example:
CLOSEUP: 1
CLOSEUP_RATE: 0
ENGAGEMENT: 1
ENGAGEMENT_RATE: 0
IMPRESSION: 240
OUTBOUND_CLICK: 20
OUTBOUND_CLICK_RATE: 0.08
PIN_CLICK: 37
PIN_CLICK_RATE: 0.15
QUARTILE_95_PERCENT_VIEW: 8
SAVE: 20
SAVE_RATE: 0.18
VIDEO_10S_VIEW: 2
VIDEO_AVG_WATCH_TIME: 2507.75
VIDEO_MRC_VIEW: 20
VIDEO_START: 29
VIDEO_V50_WATCH_TIME: 10031
UserWebsiteVerificationCode:
title: UserWebsiteVerificationCode
type: object
properties:
verification_code:
title: verification_code
type: string
description: Code to check against the user claiming the website
example: e1edcc1a43976c646367e9c6c9a9b7b6
dns_txt_record:
title: dns_txt_record
type: string
description: DNS TXT record to check against for the website to be claimed
example: pinterest-site-verification=e1edcc1a43976c646367e9c6c9a9b7b6
metatag:
title: metatag
type: string
description: Metatag the verification process searchs for the website to be claimed
example:
filename:
title: filename
type: string
description: File expected to find on the website being claimed
example: pinterest-e1edc.html
file_content:
title: file_content
type: string
description: A full html file to upload to the website in order for it to be claimed
parameters:
query_video_pin_metric_types:
description: 'Metric types to get video data for, default is all. '
explode: false
in: query
name: metric_types
required: false
schema:
items:
enum:
- IMPRESSION
- SAVE
- VIDEO_MRC_VIEW
- VIDEO_AVG_WATCH_TIME
- VIDEO_V50_WATCH_TIME
- QUARTILE_95_PERCENT_VIEW
- VIDEO_10S_VIEW
- VIDEO_START
- OUTBOUND_CLICK
type: string
type: array
style: form
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
query_video_pin_sort_by:
description: Specify sorting order for video metrics
explode: false
in: query
name: sort_by
required: true
schema:
enum:
- IMPRESSION
- SAVE
- OUTBOUND_CLICK
- VIDEO_MRC_VIEW
- VIDEO_AVG_WATCH_TIME
- VIDEO_V50_WATCH_TIME
- QUARTILE_95_PERCENT_VIEW
- VIDEO_10S_VIEW
- VIDEO_START
type: string
query_ad_account_id:
name: ad_account_id
description: Unique identifier of an ad account.
in: query
schema:
type: string
pattern: ^\d+$
maxLength: 18
query_num_of_pins:
name: num_of_pins
in: query
schema:
type: integer
minimum: 1
maximum: 50
default: 10
description: Number of pins to include, default is 10. Max is 50.
example: 25
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_from_claimed_content:
description: Filter on Pins that match your claimed domain.
in: query
name: from_claimed_content
required: false
schema:
default: BOTH
enum:
- OTHER
- CLAIMED
- BOTH
type: string
query_sort_by:
description: Specify sorting order for metrics
explode: false
in: query
name: sort_by
required: true
schema:
enum:
- ENGAGEMENT
- IMPRESSION
- OUTBOUND_CLICK
- PIN_CLICK
- SAVE
type: string
query_bookmark:
name: bookmark
description: Cursor used to fetch the next page of items
in: query
required: false
schema:
type: string
query_app_types:
description: Apps or devices to get data for, default is all.
in: query
name: app_types
required: false
schema:
default: ALL
enum:
- ALL
- MOBILE
- TABLET
- WEB
type: string
query_content_type:
description: Filter to paid or organic data. Default is all.
in: query
name: content_type
required: false
schema:
default: ALL
enum:
- ALL
- PAID
- ORGANIC
type: string
query_source:
description: Filter to activity from Pins created and saved by your, or activity created and saved by others from your claimed accounts
in: query
name: source
required: false
schema:
default: ALL
enum:
- ALL
- YOUR_PINS
- OTHER_PINS
type: string
query_pin_format:
description: Pin formats to get data for, default is all.
in: query
name: pin_format
required: false
schema:
default: ALL
enum:
- ALL
- ORGANIC_IMAGE
- ORGANIC_PRODUCT
- ORGANIC_VIDEO
- ADS_STANDARD
- ADS_PRODUCT
- ADS_VIDEO
- ADS_IDEA
- PRODUCT
- REGULAR
- VIDEO
type: string
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_created_in_last_n_days:
name: created_in_last_n_days
in: query
schema:
type: integer
enum:
- 30
description: Get metrics for pins created in the last "n" days.
example: 30
path_username:
name: username
description: A valid username
in: path
required: true
schema:
type: string
pattern: (?!^\d+$)^.+$
example: username
query_explicit_following:
description: Whether or not to include implicit user follows, which means followees with board follows. When explicit_following is True, it means we only want explicit user follows.
in: query
name: explicit_following
required: false
schema:
type: boolean
default: false
query_user_following_feed_type:
description: Thrift param specifying what type of followees will be kept. Default to include all followees.
in: query
name: feed_type
required: false
schema:
type: string
$ref: '#/components/schemas/UserFollowingFeedType'
default: ALL
query_website:
description: Website with path or domain only
in: query
name: website
required: true
schema:
type: string
example: mysite.test
query_split_field_user_account:
description: How to split the data into groups. Not including this param means data won't be split.
required: false
in: query
explode: false
name: split_field
schema:
default: NO_SPLIT
enum:
- NO_SPLIT
- APP_TYPE
- OWNED_CONTENT
- SOURCE
- PIN_FORMAT
type: string
query_metric_types:
description: 'Metric types to get data for, default is all. '
explode: false
in: query
name: metric_types
required: false
schema:
items:
enum:
- ENGAGEMENT
- ENGAGEMENT_RATE
- IMPRESSION
- OUTBOUND_CLICK
- OUTBOUND_CLICK_RATE
- PIN_CLICK
- PIN_CLICK_RATE
- SAVE
- SAVE_RATE
type: string
type: array
style: form
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