Pinterest CAPI

What Is Pinterest CAPI?

Pinterest is a visual discovery and bookmarking platform where users can find, save, and share ideas and inspirations. It allows users to create and organize collections of images, known as "pins," into thematic boards. These pins can link back to the original source, making Pinterest a powerful tool for discovering new content, planning projects, and finding creative inspiration. The platform is widely used for ideas on fashion, recipes, home decor, and more, catering to both personal interests and professional marketing.

Pinterest Conversion API (CAPI) is a tool that helps businesses track user interactions on their websites more accurately by sending events directly from their servers to Pinterest. This API enables better measurement of conversion actions, such as purchases or sign-ups, without relying solely on browser-based tracking, which can be affected by ad blockers or cookie restrictions. By using CAPI, businesses can gain deeper insights into the performance of their Pinterest campaigns, improve ad targeting, and optimize their marketing strategies for better results.


Product Type: Advertising
Integration Type: Starter Kit & ID Sync
Event Source Type: Web, Mobile Browser, and Mobile App
Event Scope: Full-Funnel Events


Capabilities

  • Sends server-side conversion events directly to Pinterest's Conversions API, reducing the impact of ad blockers and cookie restrictions.
  • Supports full-funnel events including page, product, cart, and order lifecycle actions.
  • Sends hashed user identifiers (email, city, state, zip, country, external ID) for privacy-safe matching.
  • Captures the epik click ID via the sync for attribution.
  • Derives the action source (web, app_ios, or app_android) from event context.
  • Supports batch delivery of up to 500 events per request.

Considerations

  • Authentication uses a Bearer conversion access token scoped to your Pinterest ad account.
  • Each event must include either the hashed email (em) or the IP address and user agent combination for Pinterest to match it to a user.
  • Additional hashed match identifiers — mobile advertising ID (hashed_maid), phone (ph), gender (ge), date of birth (db), last name (ln), and first name (fn) — can be added as Global or Event Specific mappings to improve match rates. These are recommended on checkout events at minimum.

Identity Sync

Sync Details

  • Captures the epik click ID value used for conversion attribution.
  • Required by Pinterest to associate events with prior ad clicks.
  • Without this sync, conversions may not be accurately attributed in reporting.

Starter Kit Setup Guide

1. Deploy the Pinterest CAPI Sync

  • To collect the sync values (e.g., epik), you must implement a Pinterest CAPI ID sync. Refer to the following documentation to complete the setup: Pinterest CAPI - ID Sync Guide.

2. Gather Credentials

  • Ad Account ID & Access Token: In Pinterest Business Manager, go to Conversions > API for Conversions, select "Conversion access token," and click Generate new token. Your Ad Account ID is displayed alongside the new token.
  • Pixel ID: In Pinterest Business Manager, go to Conversions > Tag Manager, then use "Install the Pinterest tag manually" to view your Tag ID. This ID is used as your Pixel ID in the sync.

3. Add a Pinterest CAPI Integration

  • From the integration library, add a Pinterest CAPI integration. Then, fill out the Connection Parameters:
Connection ParameterDescription
AD_ACCOUNT_IDYour Pinterest ad account ID.
ACCESS_TOKENYour conversion access token.

4. Configure Event Mapping

  • MetaRouter provides all of the event mappings that Pinterest CAPI integrations typically require. You may add custom events, parameters, or mappings in accordance with Pinterest CAPI's API documentation.

5. Deploy to Pipeline

  • In the Pipelines tab, add your Pinterest CAPI integration.
  • Select the correct integration revision.
  • Click Add Integration to finalize deployment.

Event Mappings

Global

Global mappings will be applied to all events. If your parameter names do not match the Expected Inputs provided, you will need to overwrite the Inputs provided with your own.

Output KeyDescriptionExpected Input
partner_name RequiredString: The third-party partner name responsible for sending the event to the Conversions API on behalf of the advertiser.Enrichment – 'MetaRouter'
action_source RequiredString: Describes the source of the action or event (web, app_ios, or app_android).Expression – derived from event context
event_time RequiredInteger: The timestamp of when the event occurred, in Unix time (seconds).Expression – converts the event timestamp to seconds since epoch
event_id RequiredString: A unique identifier for the event, used for deduplication.messageId
event_source_urlString: The URL of the webpage where the event occurred.context.page.url
user_data.em RequiredArray: User email address, SHA-256 hashed.Expression – hashes trimmed, lowercased traits.email
user_data.client_ip_address RequiredString: The IP address of the user.context.ip
user_data.client_user_agent RequiredString: The user agent string of the user's browser.context.userAgent
user_data.ctArray: User city, SHA-256 hashed.Expression – hashes traits.city
user_data.stArray: User state, SHA-256 hashed.Expression – hashes traits.state
user_data.zpArray: User zip code, SHA-256 hashed.Expression – hashes traits.zipcode
user_data.countryArray: User country, SHA-256 hashed.Expression – hashes traits.country
user_data.external_id Highly RecommendedArray: An external ID for the user (hashed), used to match user data with other systems.Expression – hashes anonymousId
user_data.click_id Highly RecommendedString: A unique identifier for the user's click, used for tracking ad clicks.context.providers.pinterestCAPI.epik

Event Specific

Page

Output KeyDescriptionExpected Input
event_name RequiredString: Name of the event.Enrichment – 'page_visit'

Products Searched

Output KeyDescriptionExpected Input
event_name RequiredString: Name of the event.Enrichment – 'search'
custom_data.search_string RequiredString: The search string used by the user.properties.query

Product List Viewed

Output KeyDescriptionExpected Input
event_name RequiredString: Name of the event.Enrichment – 'view_category'
custom_data.content_ids RequiredArray: List of product IDs in the event.Expression – maps product IDs from properties.products
custom_data.contents RequiredArray: Details of the contents, each with id, item_price, and quantity.Expression – maps properties.products to content objects

Product Viewed

Output KeyDescriptionExpected Input
event_name RequiredString: Name of the event.Enrichment – 'page_visit'
custom_data.currency RequiredString: Currency of the transaction.properties.currency (uppercased, default USD)
custom_data.value RequiredString: Total value of the transaction.Expression – price × quantity
custom_data.content_ids RequiredArray: List of product IDs in the event.Expression – builds from properties.product_id
custom_data.contents RequiredArray: Details of the contents, each with id, item_price, and quantity.Expression – builds from properties
custom_data.num_items RequiredInteger: Number of items in the transaction.properties.quantity

Product Added

Output KeyDescriptionExpected Input
event_name RequiredString: Name of the event.Enrichment – 'add_to_cart'
custom_data.currency RequiredString: Currency of the transaction.properties.currency (uppercased, default USD)
custom_data.value RequiredString: Total value of the transaction.Expression – price × quantity
custom_data.content_ids RequiredArray: List of product IDs in the event.Expression – builds from properties.product_id
custom_data.contents RequiredArray: Details of the contents, each with id, item_price, and quantity.Expression – builds from properties
custom_data.num_items RequiredInteger: Number of items in the transaction.properties.quantity

Cart Viewed

Output KeyDescriptionExpected Input
event_name RequiredString: Name of the event.Enrichment – 'page_visit'
custom_data.currency RequiredString: Currency of the transaction.properties.currency (uppercased)
custom_data.value RequiredString: Total value of the transaction.Expression – sums price × quantity across properties.products
custom_data.content_ids RequiredArray: List of product IDs in the cart.Expression – maps product IDs from properties.products
custom_data.contents RequiredArray: Details of the contents, each with id, item_price, and quantity.Expression – maps properties.products to content objects
custom_data.num_items RequiredInteger: Number of items in the cart.Expression – sums quantity across properties.products
custom_data.order_id RequiredString: Order ID of the transaction.properties.order_id

Order Completed

Output KeyDescriptionExpected Input
event_name RequiredString: Name of the event.Enrichment – 'checkout'
custom_data.currency RequiredString: Currency of the transaction.properties.currency (uppercased)
custom_data.value RequiredString: Total value of the transaction.Expression – sums price × quantity across properties.products
custom_data.content_ids RequiredArray: List of product IDs in the order.Expression – maps product IDs from properties.products
custom_data.contents RequiredArray: Details of the contents, each with id, item_price, and quantity.Expression – maps properties.products to content objects
custom_data.num_items RequiredInteger: Number of items in the order.Expression – sums quantity across properties.products
custom_data.order_id RequiredString: Order ID of the transaction.properties.order_id

Required & Recommended Identifiers

These identifiers must be mapped to Pinterest CAPI in order for successful user matching to occur. Without these IDs, any events sent to Pinterest CAPI may not be accurately reflected in reporting. For your convenience, required and recommended IDs are mapped as Global parameters to ensure they are added to every event.

AttributeExampleSync Injector Required?
em * Requiredd41d8cd98f00b204e9800998ecf8427eNo
client_ip_address * Required192.168.1.1No
client_user_agent * RequiredMozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36No
external_id Highly Recommended130161d0-8fee-4167-aa4d-d151eed27c6bNo
click_id Highly Recommendedabcdef1234567890Yes
ct Recommendedbb11df46c3c14b95b79b9e4c872c1e49f73eaa9570733e499cd4f36f9fbf2e6cNo
st Recommended995c9ffcc78411b9e53d206ec0a9a6f63b74b090e179dba1e4eafd922c1e95ffNo
zp Recommended49557a7a840fcb6f8d11d1b276844acdd71c1c6b46c9c6e0cc5b2f43ad5c3d57No
country Recommendede6fb06210fafc02fd7479ddbed2d042cc3a5155e0d3af5ed9da5760b31e020d6No

*Either the hashed email (em) or the IP address and user agent combination is required for user matching.


Integration Validation

Coordinate with your Pinterest representative, or use the Pinterest Ads dashboard, to confirm that events are being received and processed correctly on their backend.


Additional Pinterest CAPI Documentation