Skip to main content

Full Pinterest Ads API

Besides the campaign routes, Upload-Post exposes every ads operation of Pinterest API v5 (223 operations of Pinterest's official OpenAPI description 5.32.0) through one gateway:

GET | POST | PATCH | DELETE  /api/uploadposts/ads/pinterest/api/{route}

{route} is the path of Pinterest's API reference without the leading slash and without ad_accounts/{ad_account_id}/: the ad account goes in the X-Ads-Account-Id header, never in the URL. The query parameters and the JSON body are Pinterest's own.

PinterestUpload-Post
GET /v5/ad_accounts/{ad_account_id}/audiencesGET /api/uploadposts/ads/pinterest/api/audiences
POST /v5/ad_accounts/{ad_account_id}/keywordsPOST /api/uploadposts/ads/pinterest/api/keywords
GET /v5/ad_accounts/{ad_account_id}GET /api/uploadposts/ads/pinterest/api/ad_account
GET /v5/resources/targeting/{targeting_type}GET /api/uploadposts/ads/pinterest/api/resources/targeting/{targeting_type}

Where Pinterest takes an ad_account_id query parameter (Business Access, terms, resources), Upload-Post fills it in with the account in use.

curl -X POST https://api.upload-post.com/api/uploadposts/ads/pinterest/api/keywords \
-H 'Authorization: Apikey your-api-key-here' \
-H 'X-Ads-Account-Id: 549755885175' \
-H 'Content-Type: application/json' \
-d '{"parent_id": "2680060704746", "keywords": [{"value": "linen shirt", "match_type": "PHRASE"}]}'
{
"success": true,
"operation": "keywords/create",
"ad_account_id": "549755885175",
"data": {"keywords": [{"id": "2886364308355", "value": "linen shirt", "match_type": "PHRASE"}], "errors": []}
}

data is Pinterest's answer as is. GET /api/uploadposts/ads/pinterest/api lists every accepted operation (method, route, Pinterest path, permissions, whether it is available).

What is checked before Pinterest is called​

  • The operation exists (404 unknown_endpoint, or 405 with the allowed methods).
  • Every query parameter, path parameter and body field is checked against Pinterest's description: unknown names, missing required fields, enums, number ranges, dates and list sizes (400 invalid_parameter / invalid_body). A mistake costs no Pinterest call.
  • The ads connection has the permission the operation needs (403 pinterest_ads_scope_missing; reconnect the ad account).
  • Deletes need confirm=true (400 confirmation_required).

Created paused, here too​

POST campaigns, POST ad_groups, POST ads, POST product_group_promotions and the create part of POST bulk/upsert get "status": "PAUSED" on every item without a status. The answer carries born_paused.

What you can reach​

AreaRoutes (examples)
Campaigns, ad groups, adscampaigns, ad_groups, ads, ad_groups/audience_sizing, bid_floor, ad_previews, campaigns/delivery_estimates
Shoppingproduct_group_promotions, product_groups/analytics, promotions
Keywordskeywords, keywords/metrics, terms/suggested, terms/related
Audiencesaudiences, customer_lists, customer_lists/{customer_list_id}/uploads, customer_segments, audience_insights, audiences/shared/...
Conversionsconversion_tags, conversion_tags/{conversion_tag_id}, conversion_tags/ocpm_eligible, events (Conversions API), advertiser_defined_events
Reportsanalytics, campaigns/analytics, ad_groups/analytics, ads/analytics, pins/analytics, targeting_analytics, reports, templates, mmm_reports
Targeting valuesresources/targeting/{targeting_type}, resources/targeting/interests/{interest_id}, resources/ad_account_countries, resources/delivery_metrics, targeting_templates
Bulkbulk/upsert, bulk/download, bulk/{bulk_request_id}
Billingbilling_profiles, ssio/..., order_lines
Business Accessbusinesses/{business_id}/..., business_access/..., media_library/...
Experiments and schedulesab_tests, schedules

Catalogs (feeds, items, product groups) are not part of the ads gateway: they are in the Pinterest API gateway.

Targeting values​

curl https://api.upload-post.com/api/uploadposts/ads/pinterest/api/resources/targeting/GEO \
-H 'Authorization: Apikey your-api-key-here'

targeting_type is APPTYPE, GENDER, LOCALE, AGE_BUCKET, LOCATION, GEO, INTEREST, KEYWORD, AUDIENCE_INCLUDE, AUDIENCE_EXCLUDE, SHOPPING_RETARGETING and the others of Pinterest's reference. Answers are cached for 5 minutes.

Beta and restricted operations​

Some operations are in beta or restricted at Pinterest (lead forms and lead exports, labels, conversion deletion requests and segments, delivery estimates, entity history, business analytics, shared audiences, billing profiles and ads credit, MSOT events, RMN, integrations, publisher blocklists...). Pinterest must approve them for Upload-Post's app before they work: until then they answer 503 with code: pinterest_ads_feature_disabled without calling Pinterest. GET /api/uploadposts/ads/pinterest/api marks them with beta: true and available.

Limits​

  • A daily number of Pinterest Ads calls per Upload-Post account (429 pinterest_ads_rate_limited).
  • Pinterest's own rate limits (per user and app: about 1,000 reads, 400 writes and 300 analytics calls a minute). After a 429 from Pinterest, Upload-Post waits the Retry-After before calling Pinterest again for that account.
  • Writes are sent once. If Pinterest does not answer, the call returns 502 write_outcome_unknown: check Pinterest Ads Manager before retrying.