An Account Engagement campaign tracks the first interaction that a person has with your online marketing materials. Associate your assets to an Account Engagement campaign to organize and track your marketing efforts. Learn more about Account Engagement campaigns in Salesforce Help.
Include the authentication header with every request. For information on how to authenticate, see Authentication.
Replace <ID> with the Account Engagement ID of the campaign.
Example
Request information for the campaign with ID 12341xxx.
1/api/campaign/version/4/do/read/id/12345
Campaign Query
Request information about the campaigns that match the specified criteria. You can specify which campaigns and which fields to request. A maximum of 200 campaigns are returned, unless you specify the output as mobile. If you specify the output as mobile, then all campaigns are returned.
Note: To request information about a specific campaign, use Campaign Read.
URI
1/api/campaign/version/4/do/query?...
Parameters to Select Campaigns
Use these parameters to specify which campaigns are returned. Parameters can be used in any combination and in any order unless otherwise specified.
Request campaigns created after the specified date and time. Example: To request forms created in 2020, use /api/campaigns/version/4/do/query?created_after=2019-12-31 24:59:59.
Request campaigns created before the specified date and time. Doesn’t include campaigns created at the specified time. <custom_time>Example: to request campaigns created before today (but not created today), use /api/campaign/version/4/do/query?created_before=today.
id_greater_than
integer
Any positive integer
Request campaigns that have an Account Engagement ID greater than the specified number.
id_less_than
integer
Any positive integer
Returns campaigns that have an Account Engagement ID less than the specified number.
Request campaigns that were last updated before the specified date and time.
Parameters to Specify Which Results Are Returned
Use these parameters to specify which campaign fields are returned, and how the campaigns are sorted.
Parameter
Type
Possible Values
Description
limit
integer
Any integer from 1 through 200.
The number of campaigns to return. Default value is 200.
offset
integer
Any positive integer
The number of campaigns to omit from the response (the number to “skip over”). Example: Retrieve a list of campaigns, omitting the 50 most recently updated campaigns. Sort the query by the updated_at field and use offset=50: api/campaign/version/4/do/query?sort_by=updated_at&offset=50
sort_by
string
created_at, id, name, updated_at,cost
The field by which the results are sorted. See Sort Order.
sort_order
string
ascending, descending
The sort order. The default value depends on which sort_by value you specify. See Sort Order.
Sort Order
Use sort_by to specify which field Account Engagement uses to sort the results. Different fields have different default sort orders.
Value
Default Sort Order
Description
created_at
descending
Sort the results by the campaigns’ created_at timestamps.
id
ascending
Sort the results by the campaigns’ id fields.
name
ascending
Sort the results by the campaigns’ name fields.
updated_at
descending
Sort the results by the campaigns’ updated_at timestamps.
cost
descending
Sort the results by the campaigns’ cost fields.
Request a list of campaigns, sorted in ascending order by cost.
Update a campaign’s information, including campaign fields. Fields that aren’t specified in the request aren’t changed. To clear a field, use a null value.
Returns an updated version of the campaign.
URI
1/api/campaign/version/4/do/update/id/<ID>?...
Replace <ID> with the Account Engagement ID of the campaign.
Parameters
You can use any campaign field as a parameter. For a list of campaign fields, see Object Field References.
Example
To update a campaign’s name to “March Webinar” and reset the cost as blank, use the following POST command:
1POST /api/campaign/version/4/do/update/id/1234XXX? HTTP/1.12Host: pi.pardot.com3Authorization: Bearer<ACCESS TOKEN>4Pardot-Business-Unit-Id:<BUSINESS UNIT ID>56name=March Webinar&cost=
XML Response
The XML response for a query request contains information about multiple campaigns. The XML response for a read request contains information about a single campaign.
Parent tag. Contains the campaigns that match the parameters specified in your query.
<total_results>
The number of campaigns selected by the query. Note: The query request returns a maximum of 200 campaigns. If your query matches more than 200 campaigns, you can make several requests to retrieve all matching records.
<campaign>
The information for a single campaign. For information about campaign fields, see Campaign.