Choose a guide
Audience delivery
Upload hashed emails and deliver them into a new or existing Pinterest audience.
Conversion events
Upload conversion events and send them to the Pinterest Conversions API.
Invite a partner
Send an invite link to someone who manages another Pinterest account, so you can deliver audiences and conversion events to it.
Prerequisites
What you need depends on the guide you follow:API key
Create the key under Settings → API Keys with read and write ondatasets and connections, write on uploads, and read on installations. Add read and write on webhooks if you want delivery notifications. See API Keys for the procedure and the Permissions Reference for what each resource covers.
Create it from a shared team account rather than a personal login, so the integration keeps working when someone changes roles.
Pinterest Connector installed
The Pinterest Connector is app20. Find your installation of it:
"app_id": 20, install the Pinterest Connector from the Narrative Marketplace.
A connected Pinterest profile
A connector profile holds the Pinterest authorization that every delivery uses. One profile reaches every ad account that the approving Pinterest user can access. To deliver to your own Pinterest ad account, create a profile and approve Narrative on Pinterest once, as described in Connect your Pinterest account. To deliver to an account someone else owns, invite a partner instead. The partner’s approval creates the profile.Set up API access
The guides talk to two hosts, and each takes its own credential:Get an installation token
The Pinterest connector authenticates requests with an installation token, which you get by exchanging your API key. Use the installation ID from Pinterest Connector installed:access_token as $INSTALLATION_TOKEN. It lasts about three hours, so request a new one at the start of each run of your integration.
Confirm that both hosts answer:
api.narrative.io and the installation token to pinterest.narrativeconnectors.com.
Connect your Pinterest account
Connect your Pinterest account once. Every delivery after that runs from your API key.1
Create a profile
In Narrative, go to Installed Apps → Pinterest Connector. In the Profiles tab, click Add profile, enter a profile name, and click Create profile.
2
Approve Narrative on Pinterest
Click Connect to Pinterest, sign in to the Pinterest account that can reach your ad accounts, and approve Narrative. The profile shows Connected once Pinterest confirms.
url in a browser before expires_at, sign in to Pinterest with a login that can reach your ad accounts, and approve Narrative’s request to read and manage your ads. The profile then uses your Pinterest authorization. Find your profile to check user_account and token_expires_at.
Renew the authorization
A profile’s Pinterest authorization lasts until the profile’stoken_expires_at. Renew it before that date to keep deliveries running. Send the same POST /profiles/{profile_id}/connect request, open the new url, and approve Narrative again with the same Pinterest login. In Narrative, the Update token button on the profile does the same. The profile keeps its ID and connections.
Find your profile
GET /profiles lists every Pinterest profile in your company. To read one:
status is enabled. user_account shows the Pinterest user the profile acts as, and token_expires_at shows when its Pinterest authorization runs out. To renew it before that date, see Renew the authorization. For a profile a partner connected, send a reconnect invite. Record the profile id.
List your ad accounts
Audiences and conversion events go to a Pinterest ad account. List the ad accounts the profile can reach:page_size and pass the bookmark from each response to get the next page:
null bookmark means you have the last page. Record the id of the ad account you want to deliver to.
What the connection does
A connection’squick_settings pick the interface and set how the connection delivers. The fields depend on the interface.
New audience (audience_first_party_new)
The connector creates a customer list and an audience on it in Pinterest when you create the connection.
Existing audience (audience_first_party_existing)
The connection keeps the
write_mode it was created with.
Conversion events (conversion_events)
Each event names its ad account in
pinterest_ad_account_id, so the connection has no ad account setting. The connection sends events up to 7 days old.
Existing and new rows
A connection delivers every snapshot written to the dataset after the connection is created. Thehistorical_data_enabled quick setting decides whether the connection also delivers data that was already in the dataset when you created it:
- With
historical_data_enabledset totrue, the connection first delivers data already in the dataset, then keeps delivering new snapshots as they land. - With
historical_data_enabledset tofalse, the connection delivers only snapshots written after it was created.
historical_data_enabled delivers the dataset’s snapshots from the 30 days before the connection was created, as one delivery. After that, each new snapshot is delivered as it lands.
What an audience delivery does depends on write_mode:
appenduploads the delivery’s members into the audience’s customer list. Members stay in the list.overwriteuploads the delivery’s members into a new customer list named<audience name> - <yyyy-mm-dd>. Once Pinterest marks the new list ready, the audience switches to it, so the audience holds only the members of the latest delivery. Earlier customer lists stay in the ad account.
overwrite connection replaces the audience with each snapshot, so pair it with a dataset whose own write_mode is overwrite. Each snapshot of that dataset holds the full audience.
A conversion connection sends each event in each snapshot it delivers. Uploading the same events again in a new snapshot sends them again.
Delivery notifications
The Pinterest Connector reports each delivery as an app webhook event. Subscribe a webhook to app20 to receive them:
secret to verify each delivery. The connector sends these events:
Read a subscription with
GET /webhooks/{webhook_id}, or list all of them with GET /webhooks. To stop the notifications, delete the subscription:
Related content
Pinterest Connector
Supported identifiers, profiles, and invites
Pinterest Conversions API Connector
The
pinterest_conversion_event attribute and its fieldsWebhook Event Reference
Subscription fields, delivery payloads, and verification
API Keys
Create and rotate keys for programmatic access

