agent-ads
01
Step 01

Authenticate

Pinterest requires an app ID, app secret, access token, and refresh token. Store them once in your OS credential store:

Primary command
Authenticate
bash
agent-ads pinterest auth set

Or set shell variables for the current process:

bash
export PINTEREST_ADS_APP_ID=your_app_id
export PINTEREST_ADS_APP_SECRET=your_app_secret
export PINTEREST_ADS_ACCESS_TOKEN=access-token
export PINTEREST_ADS_REFRESH_TOKEN=refresh-token

Refresh with:

bash
agent-ads pinterest auth refresh
02
Step 02

Verify your setup

Add --api to also exchange the refresh token and ping the Pinterest Ads API.

Primary command
Verify your setup
bash
agent-ads pinterest doctor

Add --api to also exchange the refresh token and ping the Pinterest Ads API.

03
Step 03

Discover your ad accounts

Primary command
Discover your ad accounts
bash
agent-ads pinterest ad-accounts list
04
Step 04

Explore campaigns

Primary command
Explore campaigns
bash
agent-ads pinterest campaigns list --ad-account-id 1234567890
05
Step 05

Pull a synchronous analytics report

Primary command
Pull a synchronous analytics report
bash
agent-ads pinterest analytics query \
  --ad-account-id 1234567890 \
  --level campaign \
  --start-date 2026-03-01 \
  --end-date 2026-03-16 \
  --columns IMPRESSION_1,CLICKTHROUGH_1,SPEND_IN_DOLLAR \
  --granularity DAY \
  --campaign-id 987654321
06
Step 06

Submit and wait for an async report

Primary command
Submit and wait for an async report
bash
agent-ads pinterest report-runs submit \
  --ad-account-id 1234567890 \
  --level CAMPAIGN \
  --start-date 2026-03-01 \
  --end-date 2026-03-16 \
  --granularity DAY \
  --columns IMPRESSION_1,CLICKTHROUGH_1,SPEND_IN_DOLLAR

agent-ads pinterest report-runs wait \
  --ad-account-id 1234567890 \
  --token report-token
Reference

Pinterest guides

1 guides — exact flags, auth details, and workflow notes.

Guide

Pinterest Guide

This is the provider guide for Pinterest Ads. Read this first when the user wants to work with Pinterest through agent-ads.

This is the provider guide for Pinterest Ads. Read this first when the user wants to work with Pinterest through agent-ads.

Start Here

TaskFirst command
Set up auth or inspect configagent-ads pinterest doctor
List accessible ad accountsagent-ads pinterest ad-accounts list
Explore campaigns, ad groups, or adsagent-ads pinterest campaigns list --ad-account-id <id>
Run synchronous analyticsagent-ads pinterest analytics query --ad-account-id <id> ...
Run async reportingagent-ads pinterest report-runs submit --ad-account-id <id> ...
Inspect audiencesagent-ads pinterest audiences list --ad-account-id <id>
Break down targeting performanceagent-ads pinterest targeting-analytics query --ad-account-id <id> ...

Auth Model

Pinterest uses four credential pieces:

CredentialPersistent storageShell override
App IDagent-ads pinterest auth setPINTEREST_ADS_APP_ID
App secretagent-ads pinterest auth setPINTEREST_ADS_APP_SECRET
Access tokenagent-ads pinterest auth setPINTEREST_ADS_ACCESS_TOKEN
Refresh tokenagent-ads pinterest auth setPINTEREST_ADS_REFRESH_TOKEN

agent-ads pinterest auth refresh exchanges the refresh token and updates the stored access token (and rotated refresh token, if Pinterest returns one).

Optional defaults:

Variable / configPurpose
PINTEREST_ADS_DEFAULT_AD_ACCOUNT_ID / providers.pinterest.default_ad_account_idDefault ad account for scoped commands

Command Model

  • ad-accounts list|get is account discovery.
  • campaigns list, adgroups list, and ads list stay provider-native and use Pinterest bookmark pagination.
  • analytics query wraps the synchronous analytics endpoints for ad_account, campaign, ad_group, ad, and ad_pin.
  • report-runs submit|status|wait wraps Pinterest async report creation and polling.
  • audiences list|get and targeting-analytics query cover the read-only audience and targeting surfaces included in v1.
  • Keep Pinterest commands provider-native. Do not remap them into Meta or TikTok naming.

Pagination

Pinterest list commands use bookmark pagination:

FlagMeaning
--bookmark <token>Resume from a Pinterest bookmark
--page-size <n>Items per API request
--allFollow all pages
--max-items <n>Stop after N items

Common Mistakes

  • Forgetting to set both app credentials and both tokens
  • Omitting --ad-account-id on scoped commands without setting a default
  • Using analytics query for workloads that are better handled by report-runs submit|wait
  • Expecting write operations; Pinterest support in agent-ads is read-only