Forms

The API to access the Form object collection follows the conventions described in Version 5 Overview.

Supported Operations

Operation HTTP Verb URL Format Ability Requirements
Read GET https://pi.pardot.com/api/v5/objects/forms/<id>?<params> Marketing > Forms > Forms > View ability
Query GET https://pi.pardot.com/api/v5/objects/forms?<params> Marketing > Forms > Forms > View ability

Fields

Required Editable Fields

None.

Optional Editable Fields

None.

Read-Only Fields

Field Type Description
id Integer ID of the object.
name String Name of the object for identification in Pardot.
campaignId Integer The ID of the campaign associated with this object.
embedCode String HTML code to embed this form in an iframe
salesforceId String ID of the Salesforce object representing this object.
layoutTemplateId Integer The ID of the layout template associated with this object
submitButtonText String The label used for the submit button
beforeFormContent String The HTML text displayed above the form
afterFormContent String The HTML text displayed below the form
thankYouContent String The HTML text displayed after the form is submitted
thankYouCode String Thank you code is typically Javascript used to call other systems like Google Conversion Tracking
isAlwaysDisplay Boolean Always display form after submission. Disable the 10 minute waiting period after submitting a form
redirectLocation String Redirect to this URL instead of showing the "thank you" content
isUseRedirectLocation Boolean When redirect location is valid and enabled
fontSize String Possible values: default, 8pt, 10pt, 12pt, 14pt , 18pt, 24pt, 36pt
fontFamily String Possible values: default, "Helvetica, Arial, Sans-serif", "Georgia, Times, Times New Roman, Serif", "Tahoma, Trebuchet MS, Verdana, Helvetica, Arial, Sans-serif", "Courier New, Courier, Monospace"
fontColor String 6 digit number in hexadecimal format (i.e. #123456)
labelAlignment String Possible values: default, above, left
radioAlignment String Possible values: default, horizontal, stacked
checkboxAlignment String Possible values: default, horizontal, stacked
requiredCharacter String Possible values: default , *
isCookieless Boolean Kiosk/Data Entry Mode: Do not cookie browser as submitted prospect
showNotProspect Boolean Include "Not you?" link to allow visitors to reset the form. Valid when isCookieless is not set.
isCaptchaEnabled Boolean Enable explicit bot protecting using reCAPTCHA
isDeleted Boolean True if the object is in the recycle bin in Pardot.
trackerDomainId Integer The ID of the tracker domain associated with this object.
createdAt DateTime Creation time of the object.
updatedAt DateTime Last update time of the object.
createdById Integer ID of the User who created this object.
updatedById Integer ID of the User who last updated this object.
folderId Integer ID of the folder containing this object.
createdBy User User object representing the user who created this object. See documentation for User for fields.
updatedBy User User object representing the user who last updated this object. See documentation for User for fields.
layoutTemplate LayoutTemplate Layout Template object representing the layout template associated with this object. See documentation for Layout Template for fields.
trackerDomain TrackerDomain Tracker Domain object representing the tracker domain associated with this object. See documentation for Tracker Domain for fields. A null value indicates that the object will use the default tracker domain for the account.
campaign Campaign Campaign object representing the campaign associated with this object. See documentation for Campaign for fields.
folder Folder Folder object representing the folder containing this object. See documentation for Folder for fields.

Form Read

Retrieve a single form object following the conventions described in the Version 5 Overview.

Example request:

GET /api/v5/objects/forms/101?fields=id,name,isDeleted,thankYouContent,submitButtonText,campaign.name,createdBy.username,updatedBy.username,createdAt,updatedAt
Host: pi.pardot.com
Authorization: Bearer <access-token>

Example response:

HTTP/1.1 200 OK
Content-Type: application/json
{
    "id": 101,
    "name": "Standard Form",
    "isDeleted": false,
    "thankYouContent": "<p>Thank you for filling out the form. We will get back to you shortly.</p>",
    "submitButtonText": "Submit",
    "campaign": {
        "name": "My Campaign"
    },
    "createdAt": "2020-09-29T09:36:56-04:00",
    "updatedAt": "2020-09-29T09:36:56-04:00",
    "createdBy": {
        "username": "jsmith@example.com"
    },
    "updatedBy": {
        "username": "jsmith@example.com"
    }
}

Form Query

Retrieving a collection of forms follows the conventions described in Version 5 Overview.

Sortable Fields

When executing a query, the following fields can be specified. See the conventions for query described in the Version 5 Overview.

Example request:

GET /api/v5/objects/forms?fields=id,name,isDeleted,thankYouContent,submitButtonText,campaign.name,createdBy.username,updatedBy.username,createdAt,updatedAt
Host: pi.pardot.com
Authorization: Bearer <access-token>

Example response:

HTTP/1.1 200 OK
Content-Type: application/json
{
    "values": [
        {
            "id": 101,
            "name": "Standard Form",
            "isDeleted": false,
            "thankYouContent": "<p>Thank you for filling out the form. We will get back to you shortly.</p>",
            "submitButtonText": "Submit",
            "campaign": {
                "name": "My Campaign"
            },
            "createdAt": "2020-09-29T09:36:56-04:00",
            "updatedAt": "2020-09-29T09:36:56-04:00",
            "createdBy": {
                "username": "jsmith@example.com"
            },
            "updatedBy": {
                "username": "jsmith@example.com"
            }
        }
    ]
}

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.

Parameter Description
id Returns any forms where ID is equal to the given integer value.
idGreaterThan Returns any forms where ID is greater than the specified value, non-inclusive.
idGreaterThanOrEqualTo Returns any forms where ID is greater than or equal to the specified value.
idLessThan Returns any forms where ID is less than the specified value, non-inclusive.
idLessThanOrEqualTo Returns any forms where ID is less than or equal to the specified value.

Example request:

GET /api/v5/objects/forms?fields=id,name&orderBy=id desc&idGreaterThan=150&idLessThan=200
Host: pi.pardot.com
Authorization: Bearer <access-token>

Example response:

HTTP/1.1 200 OK
Content-Type: application/json
{
    "values": [
        {
            "id": 168,
            "name": "Spring Intake Form"
        },
        {
            "id": 151,
            "name": "Contact Form"
        }
    ]
}