Manage ads
Pause or resume Pinterest campaigns, ad groups and Promoted Pins, change a budget, rename an ad group, and delete or archive.
Change Promoted Pins that already exist: switch delivery on and off, change the budget, rename an ad group, and delete. Targeting and creative cannot change after creation.
Pause or resume
PUT /v1/ads/campaigns/{campaignId}/status switches one campaign's own on/off switch. Its ad groups and Promoted Pins keep their own switches.
const { data: paused } = await zernio.adcampaigns.updateAdCampaignStatus({
path: { campaignId: '626746010001' },
body: { status: 'paused', platform: 'pinterest' }
});Response (200):
{ "status": "paused", "platformCampaignStatus": null, "statusReadAt": null, "updated": 1, "skipped": 0 }Zernio does not read a Pinterest campaign's status back, so platformCampaignStatus and statusReadAt are always null, and the write always goes out.
Resuming a campaign lets each ad group and Promoted Pin deliver again only if its own switch is on. Switch those with PUT /v1/ads/ad-sets/{adSetId}/status or PUT /v1/ads/{adId}/status, which take the same body.
Change the budget
PUT /v1/ads/{adId} takes status and budget. The budget is written to the Promoted Pin's ad group.
curl -X PUT "https://zernio.com/api/v1/ads/66f0a1b2c3d4e5f6a7b8c9d0" \
-H "Authorization: Bearer $ZERNIO_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "budget": { "amount": 40, "type": "daily" } }'amount is in whole currency units, with a $5 minimum.
Rename an ad group
PUT /v1/ads/ad-sets/{adSetId} with name renames the Pinterest ad group. The new name is stored right away, so GET /v1/ads/tree returns it without a sync.
Delete
| Call | On Pinterest |
|---|---|
DELETE /v1/ads/{adId} | Archives the Promoted Pin and marks it cancelled. Zernio keeps it for history. A Pinterest error here is not returned, so check the ad in Pinterest if it matters. |
DELETE /v1/ads/ad-sets/{adSetId} | Archives the ad group, which stays readable for reporting. Its ads are marked cancelled. |
DELETE /v1/ads/campaigns/{campaignId} | Archives the campaign: Pinterest has no campaign delete. |
When Zernio holds no ads for the campaign, it first asks Pinterest whether the campaign still has ad groups. If it does, the answer is 409 and nothing changes. Otherwise the campaign is archived and its ads are cancelled.
If it fails
| Error | Cause | Fix |
|---|---|---|
501 with code feature_not_available | targeting or creative sent to PUT /v1/ads/{adId} | Change status or budget, and recreate the ad for anything else. |
409 with code invalid_resource_state | Zernio holds no ads for the campaign, and Pinterest still has ad groups in it | Sync the ad account and delete the campaign again, or delete its ad groups first. |
403 with code ads_allowance_exceeded | The team has no payment method on file and has reached 500 live ads | Add a card to resume. |
502 with code platform_api_error | Pinterest rejected the request | Read platformError for Pinterest's own payload. |
Related
- Pause or resume a campaign: every field of the status call.
- Update ad: status and budget edits.
- Delete a campaign: the archive and its checks.
- Media & Limits: what Pinterest Ads cannot do.