Dynamic Content Object

Dynamic content personalizes parts of your website based on what you know about a viewer. Learn more about dynamic content in Salesforce Help.

Include the authentication header with every request. For information on how to authenticate, see Authentication.

Dynamic Content Resources

Resource NameOperationDescription
Dynamic Content QueryGETRequest information for dynamic content that matches the specified criteria.
Dynamic Content ReadGETRequest information for a single dynamic content record.

Dynamic Content Query

Request information for the dynamic content records that match the specified criteria. You can specify the dynamic content records and fields to request. A maximum of 200 records are returned. To return all dynamic content records, specify the output as mobile.

URI

Parameters to Select Dynamic Content Records

Use these parameters to specify the dynamic content records to return. Parameters can be used in any combination and in any order unless otherwise specified.

Notes:

ParameterTypePossible ValuesDescription
created_afterstringtoday, yesterday, last_7_days, this_month, last_month,<custom_time>Request dynamic content records created after the specified time. Example: To request forms created in 2020, use /api/dynamicContent/version/3/do/query?created_after=2019-12-31 24:59:59.
created_beforestringtoday, yesterday, last_7_days, this_month, last_month, <custom_time>Request dynamic content records created before the specified time. Doesn’t include dynamic content records created at the specified time. Example: To request dynamic content records created before today (but not created today), use /api/dynamicContent/version/3/do/query?created_before=today.
id_greater_thanintegerAny positive integerRequest dynamic content records that have an ID greater than the specified number.
id_less_thanintegerAny positive integerRequest dynamic content records that have an ID less than the specified number.
updated_afterstringtoday, yesterday, last_7_days, this_month, last_month, <custom_time>Request dynamic content records that were last updated after the specified time.
updated_beforestringtoday, yesterday, last_7_days, this_month, last_month, <custom_time>Request dynamic content records that were last updated before the specified time.

Parameters to Specify Which Results Are Returned

Use these parameters to specify the dynamic content fields to return, and how the dynamic content records are sorted.

ParameterTypePossible ValuesDescription
limitintegerAny integer from 1 through 200.The number of dynamic content records to return. Default value is 200.
offsetintegerAny positive integerThe number of dynamic content records to omit from the response (the number to "skip over"). Example: Retrieve a list of dynamic content records, omitting the 50 most recently updated records. Sort the query by the updated_at field and use offset=50: /api/dynamicContent/version/3/do/query?sort_by=updated_at&offset=50
sort_bystringcreated_at, id, updated_atThe field by which the results are sorted. See Sort Order.
sort_orderstringascending, descendingThe version/3. The default value depends on which sort_by parameter you specify. See Sort Order.

Sort Order

Use sort_by to specify which field Pardot uses to sort the results. Different fields have different default sort orders.

ValueDefault Sort OrderDescription
created_atdescendingSort the results by the dynamic content records' created_at timestamps.
idascendingSort the results by the dynamic content records' id fields.
updated_atdescendingSort the results by the dynamic content records' updated_at timestamps.

Dynamic Content Read

Request information for a single dynamic content record.

URI

Replace <ID> with the Pardot ID of the dynamic content record.

Example

Request information about the dynamic content record with ID 1234.

XML Response

The XML response for a query request contains information for multiple dynamic content records. The XML response for a read request contains information for a single dynamic content record.

XML Response for a Dynamic Content Query

TagDescription
<result>Parent tag. Contains the dynamic content records that match the parameters specified in your query.
<total_results>Contains the number of dynamic content records selected by the query. Note The query request returns a maximum of 200 dynamic content records. If your query matches more than 200 records, you can make several requests to retrieve all matching records.
<dynamicContent>The information about a single dynamic content record. See Dynamic Content in Object Field References for a complete description of fields.

XML Response for a Dynamic Content Read

TagDescription
<dynamicContent>The information about a single dynamic content record. See Dynamic Content in Object Field References for a description of fields.