/marketing-growth:mcae-pardot-apifrom marketing-growth
Creates, reads, and queries Prospects, Visitors, Visitor Activities, and Form Handlers via the Account Engagement (Pardot) REST API v5 with OAuth authentication and cursor-based pagination.
Ships in marketing-growth. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
This skill activates when a practitioner or AI agent needs to integrate with the Account Engagement (Pardot) REST API v5 — covering authentication setup, Prospect CRUD, Visitor and Visitor Activity queries, Form Handler configuration, and cursor-based pagination. It does not cover Marketing Cloud Email Studio or Journey Builder APIs, nor does it cover Salesforce CRM object REST APIs.
Gather this context before working on anything in this domain:
https://pi.pardot.com/api/v5/objects/{object}.Pardot-Business-Unit-Id header with this value — omitting it causes 401 errors even with a valid OAuth token.Bearer token.API v5 uses the Salesforce OAuth 2.0 flow exclusively. You request a token from https://login.salesforce.com/services/oauth2/token (or the sandbox equivalent) using the Connected App's client_id and client_secret. The resulting access_token is sent as Authorization: Bearer {token}. Additionally, every request to pi.pardot.com must include the Pardot-Business-Unit-Id header. Missing either causes a 401. Tokens expire on the same schedule as Salesforce access tokens; implement token refresh using the refresh_token grant.
Prospects are the core marketing entity in Account Engagement. Email address must be unique per business unit — duplicate email POST requests will upsert the existing record rather than create a new one (behavior is configurable). You can query Prospects by email (?fields=id,email&[email protected]), by Salesforce CRM ID (?crmLeadFQN=Lead/{sfId} or ?crmContactFQN=Contact/{sfId}), or by Pardot internal ID. CRUD is available: GET, POST (create), PATCH (update), DELETE. Field names in v5 use camelCase JSON, not underscores.
Visitors represent anonymous tracking sessions identified by a tracking cookie set by the Pardot tracking pixel. A Visitor record is created automatically when an anonymous user loads a page with the pixel. Once the visitor submits a form or clicks a tracked email link, the Visitor is associated with a Prospect. Visitor Activity records capture every engagement event — email opens, email clicks, form submissions, page views, file downloads, custom redirects — and are queryable per visitor or prospect. Activity types are represented as integer codes in the type field (e.g., 1 = email click, 4 = form submission, 6 = page view).
API v5 does not support offset-based pagination. Instead, responses include a nextPageMark token in the response envelope when more pages exist. To retrieve the next page, include ?nextPageMark={value} in the subsequent request. The response also includes totalResults (total matching records) and nextPageUrl (convenience URL). Callers must follow nextPageMark iteratively; jumping to arbitrary offsets is not supported.
When to use: You have a form submission or external system event and need to ensure the prospect exists and is up to date in MCAE.
How it works:
https://pi.pardot.com/api/v5/objects/prospects with JSON body containing email and any field values.id field to confirm which Prospect was created or updated.crmLeadFQN: "Lead/{sfLeadId}" in the body.Why not the alternative: Querying first to check existence, then conditionally POSTing or PATCHing, is two round trips and introduces a race condition. The POST upsert pattern is atomic and recommended by Salesforce docs.
When to use: You need to export all engagement events for a prospect or date range, and the result set may exceed one page (default page size is 200, max is 200).
How it works:
https://pi.pardot.com/api/v5/objects/visitor-activities?fields=id,type,createdAt,prospectId&prospectId={id}&orderBy=createdAtnextPageMark.?nextPageMark={value} appended (keep all other filter params).nextPageMark is absent from the response.When to use: The company has an existing web form (on their own site, in a CMS, etc.) and wants submissions to create or update MCAE Prospects without migrating to a Pardot-hosted form.
How it works:
application/x-www-form-urlencoded).| Situation | Recommended Approach | Reason |
|---|---|---|
| Need to create or update a Prospect from backend code | POST to Prospects API v5 with JSON body | Supports all fields, returns full Prospect record, uses official API |
| External web form needs to submit into MCAE | Configure a Form Handler and POST form data to its endpoint | Designed for this use case; handles completion actions; no API credentials required in browser |
| Need all engagement history for a given Prospect | GET Visitor Activities filtered by prospectId with nextPageMark pagination | VisitorActivity is the canonical engagement event store |
| Need to match a Pardot Prospect to a Salesforce Lead | Query Prospect by crmLeadFQN=Lead/{sfId} | Avoids email-based ambiguity when multiple records exist |
| Authenticating from an external server-side system | Use Connected App OAuth Client Credentials flow | Avoids embedding user credentials; tokens can be refreshed automatically |
| Need to identify which BU a request targets | Include Pardot-Business-Unit-Id header on every request | Required header; missing it returns 401 regardless of token validity |
Step-by-step instructions for an AI agent or practitioner working on this task:
https://login.salesforce.com/services/oauth2/token with grant_type, client_id, client_secret. Extract the access_token from the response. Store the refresh_token for automated renewal.https://pi.pardot.com/api/v5/objects/{object}. Add headers: Authorization: Bearer {token}, Pardot-Business-Unit-Id: {buId}, Content-Type: application/json. Add query params (fields, filters) or JSON body for mutations.nextPageMark. Loop until no nextPageMark is present. Do not use offset parameters.details array for field-level messages.Run through these before marking work in this area complete:
https://pi.pardot.com/api/v5/objects/...), not v3 or v4Pardot-Business-Unit-Id header present on every requestnextPageMark cursor, not offset parametersdetails array, not just top-level messageNon-obvious platform behaviors that cause real production problems:
Pardot-Business-Unit-Id returns 401, not 400 — The error message does not say the header is missing; it looks identical to an invalid token error. Always verify this header is present before investigating token issues.id matches an existing record.GET /visitors?email=.... To find visits for a known Prospect, query VisitorActivities by prospectId instead.application/json) exclusively. v3/v4 used XML. Sending an Accept: application/xml header to v5 endpoints returns an error.| Artifact | Description |
|---|---|
| Authenticated API request pattern | Headers, base URL, and token acquisition flow |
| Prospect CRUD examples | Create, read, update, delete operations with sample payloads |
| Visitor Activity query | Paginated fetch of all engagement events for a Prospect |
| Form Handler configuration guide | Steps to create a Form Handler and wire an external form to it |
| Review checklist | Pre-completion verification checklist for API integrations |
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
pardot-api, account-engagement, api-v5, prospects, visitors, form-handlers
npx claudepluginhub skillmds/skillmd --plugin marketing-growth30 skills in this plugin
/adsOperate professional paid advertising across Google, Meta, YouTube, LinkedIn, TikTok, Microsoft, Apple, Amazon, Reddit, Pinterest, Snapchat, and X. Use for account intake, source-grounded audits, strategy, budget and measurement planning, creative production, experiments, reporting, monitoring, and explicitly approved campaign changes. Also trigger on PPC, paid social, retail media, attribution, tracking, landing pages, cross-platform conversion totals, negative keywords or search terms, beta-feature scoring, stale platform claims, API-token or credential setup, campaign deletion, and safe Claude Ads installation or uninstall./ads-appleAudit Apple Ads measurement, AdServices and AdAttributionKit, campaign and keyword structure, Search Match, App Store placements, custom product pages, bidding, budgets, MMP reconciliation, and policy. Use for Apple Ads, Apple Search Ads, App Store ads, Search Match, custom product pages, AdServices, or Apple app-install campaigns./ads-metaAudit Meta Ads measurement, Pixel and Conversions API, attribution, Facebook and Instagram creative, audiences, placements, automation, budgets, account structure, and policy. Use for Meta Ads, Facebook Ads, Instagram Ads, Advantage+, Pixel, CAPI, Events Manager, creative fatigue, or Meta campaign optimization./ads-xAudit X Ads measurement, X Pixel and Conversions API, campaign objectives, keyword and conversation targeting, creative, budgets, brand safety, app measurement, and reporting. Use for X Ads, Twitter Ads, promoted posts, X Pixel, X Conversions API, conversation targeting, or paid campaigns on X./apexApex - Senior Product Marketing Manager & CSO specializing in B2B/B2C IT Products & SaaS. Use for Go-To-Market strategies, product positioning, growth funnels, IT product copywriting, SEO content strategy, or marketing analytics. Also responds to 'Apex' or /apex command./brandBrand voice, visual identity, messaging frameworks, asset management, brand consistency. Activate for branded content, tone of voice, marketing assets, brand compliance, style guides.Other plugins' skills for the same job