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.

The API to access the dynamic content object follows the conventions described in Version 5 Overview.

Supported Operations 

OperationHTTP VerbURL FormatAbility Requirements
ReadGEThttps://pi.pardot.com/api/v5/objects/dynamic-contents/<id>?<params>Content > Dynamic Content > View
QueryGEThttps://pi.pardot.com/api/v5/objects/dynamic-contents?<params>Content > Dynamic Content > View
CreatePOSThttps://pi.pardot.com/api/v5/objects/dynamic-contents?<params>Content > Dynamic Content > Create
Add TagPOSThttps://pi.pardot.com/api/v5/objects/dynamic-contents/<id>/do/addTagContent > Dynamic Content > Create AND Marketing > Segmentation > Tags > Create
Remove TagPOSThttps://pi.pardot.com/api/v5/objects/dynamic-contents/<id>/do/removeTagContent > Dynamic Content > Create AND Marketing > Segmentation > Tags > Create

Fields 

Required Fields 

FieldTypeDescription
nameStringDynamic Content’s name. Must be unique.
basedOnProspectApiFieldIdStringThe name of the Account Engagement prospect field that the Dynamic Content is mapped to. On standard fields the value is the name of the field. For example, “firstName”. If mapping to a custom field, the value is the field name followed by __c. For example, the custom field “foodChoice” becomes “foodChoice__c”.

Optional Fields 

FieldTypeDescription
baseContentStringThe default content that shows when the prospect doesn’t meet the criteria for a variation.
folderIdIntegerID of the folder containing this object. Uses the asset type’s uncategorized folder if not specified on create.
trackerDomainIdIntegerThe ID of the tracker domain associated with this object. Uses the default tracker domain if not specified on create.

Read-Only Fields 

FieldTypeDescription
idIntegerAccount Engagement ID for this dynamic content.
embedCodeStringThe code used to embed the dynamic content into a web page.
embedUrlStringThe URL to embed this dynamic content.
basedOnEnumThe kind field that dynamic content is based on. Values are “default”, “custom”, “grade”, and “score”.
tagReplacementLanguageEnumMerge language of the dynamic content. Can be "pml", "hml", or "undetermined".
createdAtDateTimeTime the dynamic content was created; reported in API user’s timezone.
updatedAtDateTimeTime the dynamic content was last updated; reporting in API user’s timezone.
isDeletedBooleanWhen true, the object is in the recycle bin in Account Engagement.
createdByIdIntegerID of the user who created this object.
updatedByIdIntegerID of the user who last updated this object.
createdByUserUser object representing the user who created this object. See documentation for User for fields.
updatedByUserUser object representing the user who last updated this object. See documentation for User for fields.
campaignCampaignCampaign object representing the campaign that was set on Create. See documentation for Campaign for fields.
folderFolderJSON object representing the folder for this object. See documentation for Folder for fields.
trackerDomainTracker DomainTracker Domain object representing the tracker domain associated with the email template. See documentation for Tracker Domain for fields.

Dynamic Content Read 

Retrieve a single dynamic content following the conventions described in the Version 5 Overview.

Example request:

1GET /api/v5/objects/dynamic-contents/1?fields=id,name,createdAt,updatedAt,baseContent,basedOn,embedCode,embedUrl
2Host: pi.pardot.com
3Authorization: Bearer <access-token>

Example response:

1HTTP/1.1 200 OK
2Content-Type: application/json
1{
2  "id": 1000,
3  "baseContent": "This is the default content.",
4  "basedOn": "grade",
5  "createdAt": "2021-11-29T14:31:30-08:00",
6  "embedCode": "<script type=\"text/javascript\" src=\"https://www3.lenoxsoft.com/dcjs/10000/500/dc.js\"></script>",
7  "embedUrl": "https://www3.lenoxsoft.com/dcjs/1000/500/dc.js",
8  "name": "Dynamic Content",
9  "updatedAt": "2021-11-29T14:31:30-08:00"
10}

Dynamic Content Query 

Retrieve a collection of dynamic content following the conventions described in the Version 5 Overview.

Sortable Fields 

  • id
  • createdAt
  • updatedAt

Filtering Results 

When executing a query, the following parameters can be used to filter the returned results. These parameters can be specified in the request along with any shared parameters defined in Version 5 Overview. When specifying more than one parameter, all parameters must match the record in order for it to be returned in the results.

ParameterDescription
idReturns any dynamic content where ID is equal to the given integer value.
idListReturns any dynamic content where ID is included in the given list of values.
idGreaterThanReturns any dynamic content where ID is greater than the specified value, non-inclusive.
idGreaterThanOrEqualToReturns any dynamic content where ID is greater than or equal to the specified value.
idLessThanReturns any dynamic content where ID is less than the specified value, non-inclusive.
idLessThanOrEqualToReturns any dynamic content where ID is less than or equal to the specified value.
nameReturns any dynamic content where Name is equal to the given string value.
createdAtReturns any dynamic content where CreatedAt is equal to the given datetime value.
createdAtAfterReturns any dynamic content where CreatedAt is after the given datetime value, non-inclusive.
createdAtAfterOrEqualToReturns any dynamic content where CreatedAt is after or equal to the given datetime value.
createdAtBeforeReturns any dynamic content where CreatedAt is before the given datetime value, non-inclusive.
createdAtBeforeOrEqualToReturns any dynamic content where CreatedAt is before or equal to the given datetime value.
updatedAtReturns any dynamic content where UpdatedAt is equal to the given datetime value.
updatedAtAfterReturns any dynamic content where UpdatedAt is after the given datetime value, non-inclusive.
updatedAtAfterOrEqualToReturns any dynamic content where UpdatedAt is after or equal to the given datetime value.
updatedAtBeforeReturns any dynamic content where UpdatedAt is before the given datetime value, non-inclusive.
updatedAtBeforeOrEqualToReturns any dynamic content where UpdatedAt is before or equal to the given datetime value.
deletedDetermines whether to return deleted records. The value can be false (default), true, or all.

Example Request

1GET /api/v5/objects/dynamic-contents?orderBy=id&fields=id,name,updatedAt,basedOn?orderBy=id HTTP/1.1
2Host: pi.pardot.com
3Authorization: Bearer <access-token>

Example Response

1"values": [
2    {
3        "id": 1001,
4        "basedOn": "grade",
5        "name": "Dynamic Content",
6        "updatedAt": "2021-11-29T14:31:30-08:00",
7    },
8    {
9        "id": 1002,
10        "basedOn": "default",
11        "name": "CTO Call to Action Content",
12        "updatedAt": "2021-11-30T07:59:34-08:00",
13    },
14    {
15        "id": 1003,
16        "basedOn": "custom",
17        "name": "VP Content",
18        "updatedAt": "2021-11-30T08:00:51-08:00",
19    }
20]

Dynamic Content Create 

Create a single dynamic content following the conventions described in the Version 5 Overview.

Example request:

1POST /api/v5/objects/dynamic-contents?fields=id,name,folderId,baseContent,basedOn,basedOnProspectApiFieldId,embedCode,embedUrl,createdAt,updatedAt
2Host: pi.pardot.com
3Authorization: Bearer <access-token>
1{
2  "name": "Dynamic Content API Create",
3  "basedOnProspectApiFieldId": "foodChoice__c",
4  "baseContent": "This is the default content."
5}

Example response:

1HTTP/1.1 201 OK
2Content-Type: application/json
1{
2  "id": 1000,
3  "baseContent": "This is the default content.",
4  "basedOn": "custom",
5  "basedOnProspectApiFieldId": "foodChoice__c",
6  "createdAt": "2023-10-04T14:31:30-08:00",
7  "embedCode": "<script type=\"text/javascript\" src=\"https://www3.lenoxsoft.com/dcjs/10000/500/dc.js\"></script>",
8  "embedUrl": "https://www3.lenoxsoft.com/dcjs/1000/500/dc.js",
9  "folderId": 342,
10  "name": "Dynamic Content API Create",
11  "updatedAt": "2023-10-04T14:31:30-08:00"
12}

Add Tag 

Adds a Tag to the Dynamic Content object, which creates a TaggedObject.

Example Request

1POST https://pi.pardot.com/api/v5/objects/dynamic-contents/1000/do/addTag
2Host: pi.pardot.com
3Authorization: Bearer <access-token>
4Content-Type: application/json
5
6{
7  "tagId": 100
8}

Example Response

1HTTP/1.1 200 OK
2Content-Type: application/json
3{
4    "id": 610,
5    "createdAt": "2024-09-23T18:26:49-04:00",
6    "createdById": 250,
7    "objectId": 1000,
8    "objectType": "dynamic-content",
9    "tagId": 100
10}

Remove Tag 

Remove a tag from a Dynamic Content object. When you remove a tag, the associated TaggedObject record is deleted.

Example Request

1POST https://pi.pardot.com/api/v5/objects/dynamic-contents/1000/do/removeTag
2Host: pi.pardot.com
3Authorization: Bearer <access-token>
4Content-Type: application/json
5
6{
7  "tagId": 100
8}

Example Response

Returns code 204 no content.

Enums 

The object supports these enums.

Grade 

  • A+
  • A
  • A-
  • B+
  • B
  • B-
  • C+
  • C
  • C-
  • D
  • F