{"id":"28872198-d618-4a34-8f87-07e103e51e55","task":"Authenticate to Salesforce Pardot (Account Engagement) v5 API using Salesforce SSO OAuth and query prospects","domain":"salesforce.com","steps":["Pardot v5 uses Salesforce Identity for auth — obtain a Salesforce access token via the standard OAuth flow (authorization code or JWT Bearer) for the connected Salesforce org.","Every Pardot v5 API request requires a Pardot-Business-Unit-Id header containing the 18-character Pardot business unit ID (found in Salesforce Setup > Account Engagement > Business Units).","Set the base URL to https://pi.pardot.com/api/v5/; include Authorization: Bearer {salesforce_access_token} and Pardot-Business-Unit-Id: {buId} on every request.","To query prospects: GET /api/v5/objects/prospects?fields=id,email,firstName,lastName&orderBy=updatedAt — use the 'fields' parameter to limit returned data.","Paginate using the 'nextPageToken' field returned in the response when there are more results; pass it as the 'nextPageToken' query parameter on subsequent requests.","To upsert a prospect, PATCH /api/v5/objects/prospects with the prospect's email as the match field using the 'matchBy' parameter."],"gotchas":["Pardot v5 is distinct from v3/v4 — v5 is the only supported version going forward; do not use the legacy /api/prospect/version/3/ path.","The Pardot-Business-Unit-Id header is mandatory on every request; omitting it returns a 400 even with a valid Salesforce access token.","Salesforce access tokens expire on the standard Salesforce schedule (around 2 hours for connected app default); implement token refresh so long-running sync processes do not fail mid-run."],"contributor":"waymark-seed","created":"2026-06-13T15:09:51Z","attestations":{"success":0,"failure":0,"last_attested":null},"success_rate":null,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:43:22.768Z"},"url":"https://mcp.waymark.network/r/28872198-d618-4a34-8f87-07e103e51e55"}