Pardot's developer content is getting a makeover! Starting July 12th, you’ll be redirected to our new site.

Custom Field Resources

Use custom fields to capture and track more data about your prospects. You can use custom fields in forms and sync the Pardot fields with Salesforce fields. Learn more about Pardot fields in Salesforce Help.

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

Resource Name Operation Description
Custom Field Create POST Create a custom field.
Custom Field Read GET Request detailed information for a single custom field.
Custom Field Update POST Update a custom field's value.
Custom Field Delete POST or DELETE Delete a custom field.
Custom Field Query GET Request information for the custom fields that match the specified criteria.

Custom Field Create

Create a custom field with the specified name and API name.

URI

/api/customField/version/3/do/create?...

Parameters

The following parameters are required to create a new custom field:

Parameter Type Description
name string The name of the custom field.
field_id string The API name of the custom field.

Parameters can include any editable field in the Custom Field object. For a list of fields in the Custom Field object, see Custom Field.

Example

Create a custom field of type integer with the name "Partner Level" and the API name "PARTNER_LEVEL_c," which doesn’t allow multiple values.

POST /api/customField/version/3/do/create? HTTP/1.1
Host: pi.pardot.com
Content-Type: application/x-www-form-urlencoded
Authorization: Bearer <ACCESS_TOKEN>
Pardot-Business-Unit-Id: <PARDOT_BUSINESS_UNIT_ID>

name=Partner Level&field_id=PARTNER_LEVEL__c&type=3&is_record_multiple_responses=false

Custom Field Delete

Delete a custom field specified by custom field ID.

URI

/api/customField/version/3/do/delete/id/<ID>

Replace <ID> with the ID of the custom field.

Example

Delete the custom field with ID 5746xx.

/api/customField/version/3/do/delete/id/5746xx

Custom Field Read

Request information about the specified custom field.

URI

/api/customField/version/3/do/read/id/<ID>?..

Replace <ID> with the ID of the custom field.

Example

Request the information for the custom field with ID 12341xxx

/api/customField/version/3/do/read/id/12341xxx

Custom Field Query

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

Note: To request information about a specific custom field, use Custom Field Read.

URI

/api/customField/version/3/do/query?...

Parameters to Select Custom Fields

Use these parameters to specify which custom fields are returned. Parameters can be used in any combination and any order unless otherwise specified.

Notes:

Parameter Type Options Description
created_after string today, yesterday, last_7_days, this_month, last_month,<custom_time> Request custom fields created after the specified time. Example: To request forms created in 2020, use /api/customField/version/3/do/query?created_after=2019-12-31 24:59:59.
created_before string today, yesterday, last_7_days, this_month, last_month, <custom_time> Request custom fields created before the specified date and time. Does not include custom fields created at the specified time. <custom_time> Example: to request custom fields created before today (but not created today), use /api/customField/version/3/do/query?created_before=today.
id_greater_than integer Any positive integer Requests custom fields that have an ID greater than the specified number.
id_less_than integer Any positive integer Returns custom fields that have an ID less than the specified number.

Parameters to Specify Which Results Are Returned

Use these parameters to specify which custom fields are returned, and how the custom fields are sorted.

Parameter Type Options Description
limit integer Any integer from 1 through 200 The number of custom fields to return. Default value is 200.
offset integer Any positive integer The number of custom fields to omit from the response (the number to "skip over"). Example: Retrieve a list of custom fields, omitting the 50 most recently updated custom fields. Sort the query by the updated_at field and use offset=50: /api/customField/version/3/do/query?offset=50&sort_by=created_at
sort_by string created_at, id, probability, value 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 parameter you specify. See Sort Order.

Sort Order

Use the sort_by parameter to specify which field Pardot 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 custom fields' created_at timestamps.
id ascending Sort the results by the custom fields' id fields.
name ascending Sort the results by the custom fields' name fields.
                                                                      |

Custom Field Update

Updates information for the specified custom field. Specify the custom field by custom field ID. Fields that are not specified in the request are not changed. To clear a field, use a null value.

Returns an updated version of the custom field.

URI

/api/customField/version/3/do/update/id/<ID>?...

Replace <ID> with the ID of the custom field.

Parameters

You can use any field in a Custom Field object as a parameter. For a list of fields in a Custom Field object, see Custom Field.

Example

To update a custom field's name to "CONTACTED", use the following POST command:

POST /api/customField/version/3/do/update/id/1234XXX? HTTP/1.1
Host: pi.pardot.com
Authorization: Bearer <ACCESS TOKEN>
Pardot-Business-Unit-Id: <BUSINESS UNIT ID>

name=CONTACTED&field_id=CONTACTED_C```

# XML Response

The XML response for a query request contains information about multiple custom fields. The XML response for a read request contains information about a single custom field.

## XML Response for Custom Field Query

... ... ... ...


| **Tag**           | **Description**                                                                                                                                                                                                                                 |
| ----------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `<result>`        | Parent tag. Contains the custom fields that match the parameters specified in your query.                                                                                                                                                       |
| `<total_results>` | The number of custom fields selected by the query. **Note:** The query request returns a maximum of 200 custom fields. If your query matches more than 200 custom fields, you can make several requests to retrieve all matching custom fields. |
| `<customField>`   | The information for a single custom field. See [Custom Field](../object-field-references.md#custom-field).                                                                                                                                          |

## XML Response for Custom Field Read

1070 Checkbox Field Checkbox_Field Checkbox 3 Alt_Email__c true false 2014-09-19 11:43:36 2014-11-19 05:04:17 ```

Tag Description
<customField> The information for a single custom field. See Custom Field.