Skip to main content

Campaigns, ad groups and ads

These routes take and return Pinterest's own objects (same field names as Pinterest's API reference), so anything Pinterest supports on a campaign, ad group or ad can be sent.

  • Authentication: API key, Authorization: Apikey your-api-key-here
  • Base URL: https://api.upload-post.com/api/uploadposts/ads/pinterest
  • Ad account: X-Ads-Account-Id header (see Choosing the ad account)
  • Money: micro-currency of the ad account (1 EUR = 1000000)
Created paused

Every create call sets "status": "PAUSED" on the items that do not carry a status. Nothing spends until you resume it, or you send "status": "ACTIVE" on purpose. The answer says how many items were paused in born_paused.

List​

GET /campaigns
GET /ad-groups
GET /ads
NameDescription
entity_statusesACTIVE, PAUSED, ARCHIVED, DRAFT, DELETED_DRAFT (comma-separated)
campaign_idsFilter by campaign (ad groups and ads), comma-separated
ad_group_idsFilter by ad group (ad groups and ads)
ad_idsOnly these ads
page_size1 to 250
bookmarkNext page: the bookmark of the previous answer
orderASCENDING or DESCENDING
curl -G https://api.upload-post.com/api/uploadposts/ads/pinterest/campaigns \
-H 'Authorization: Apikey your-api-key-here' \
--data-urlencode 'entity_statuses=ACTIVE,PAUSED'
{
"success": true,
"ad_account_id": "549755885175",
"items": [
{"id": "626736533506", "name": "Spring sale", "status": "PAUSED", "objective_type": "AWARENESS", "daily_spend_cap": 25000000, "...": "..."}
],
"bookmark": null
}

Create a campaign​

POST /campaigns

Send one campaign as the body, or up to 30 in items.

curl -X POST https://api.upload-post.com/api/uploadposts/ads/pinterest/campaigns \
-H 'Authorization: Apikey your-api-key-here' \
-H 'Content-Type: application/json' \
-d '{"name": "Spring sale", "objective_type": "AWARENESS", "daily_spend_cap": 25000000}'
FieldRequiredDescription
nameYesCampaign name
objective_typeYesAWARENESS, CONSIDERATION, VIDEO_COMPLETION, WEB_CONVERSION, CATALOG_SALES, LEADS, APP_INSTALL
daily_spend_cap / lifetime_spend_capNoSpend cap in micro-currency (one or the other)
start_time / end_timeNoUnix seconds
statusNoLeave it out to create it paused

Any other field of Pinterest's campaign object (is_campaign_budget_optimization, tracking_urls...) is accepted.

{
"success": true,
"ad_account_id": "549755885175",
"items": [{"id": "626736533506", "name": "Spring sale", "status": "PAUSED", "...": "..."}],
"errors": [],
"born_paused": 1
}

errors lists the items Pinterest refused, with their position in your list and Pinterest's exceptions. The others were created.

Create an ad group​

POST /ad-groups
curl -X POST https://api.upload-post.com/api/uploadposts/ads/pinterest/ad-groups \
-H 'Authorization: Apikey your-api-key-here' \
-H 'Content-Type: application/json' \
-d '{
"campaign_id": "626736533506",
"name": "Spain, 25-44",
"billable_event": "IMPRESSION",
"budget_type": "DAILY",
"budget_in_micro_currency": 10000000,
"auto_targeting_enabled": true,
"targeting_spec": {"GEO": ["ES"], "AGE_BUCKET": ["25-34", "35-44"]}
}'

campaign_id, name and billable_event are required (IMPRESSION for awareness, CLICKTHROUGH for consideration, VIDEO_V_50_MRC for video completion). Targeting keys are Pinterest's: GEO, LOCATION, AGE_BUCKET, GENDER, LOCALE, INTEREST, KEYWORD, AUDIENCE_INCLUDE, AUDIENCE_EXCLUDE, TARGETING_STRATEGY... Their allowed values come from the targeting endpoints.

Create an ad​

POST /ads

An ad promotes a Pin. List the Pins the ad account can promote:

GET /pins?page_size=25&bookmark=
{"success": true, "items": [{"id": "813744226420795884", "title": "Linen shirt", "media_type": "image", "thumbnail_url": "https://i.pinimg.com/...", "link": "https://example.com/shirt"}], "bookmark": "..."}

Then create the ad:

curl -X POST https://api.upload-post.com/api/uploadposts/ads/pinterest/ads \
-H 'Authorization: Apikey your-api-key-here' \
-H 'Content-Type: application/json' \
-d '{"ad_group_id": "2680060704746", "creative_type": "REGULAR", "pin_id": "813744226420795884", "destination_url": "https://example.com/shirt"}'

ad_group_id, creative_type (REGULAR for an image Pin, VIDEO for a video Pin, CAROUSEL, COLLECTION, IDEA...) and pin_id are required. Pinterest reviews every ad (review_status).

Edit​

PATCH /campaigns/{campaign_id}
PATCH /ad-groups/{ad_group_id}
PATCH /ads/{ad_id}

Send only the fields to change. The status is never changed unless the body sets status.

curl -X PATCH https://api.upload-post.com/api/uploadposts/ads/pinterest/ad-groups/2680060704746 \
-H 'Authorization: Apikey your-api-key-here' \
-H 'Content-Type: application/json' \
-d '{"budget_in_micro_currency": 15000000}'

Pause, resume and archive​

POST /campaigns/{campaign_id}/pause    | /resume | /archive
POST /ad-groups/{ad_group_id}/pause | /resume | /archive
POST /ads/{ad_id}/pause | /resume | /archive
  • pause sets PAUSED.
  • resume sets ACTIVE: delivery and spend start once the campaign, the ad group and the ad are all active and the ad is approved.
  • archive sets ARCHIVED: Pinterest's way of removing it. An archived object cannot be resumed.
curl -X POST https://api.upload-post.com/api/uploadposts/ads/pinterest/campaigns/626736533506/resume \
-H 'Authorization: Apikey your-api-key-here'

Everything else​

Keywords, product group promotions, bulk create and update, ad previews and the rest of the ads API are in the full Pinterest Ads API.