Custom Field Object

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.

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

Custom Field Resources

Resource NameOperationDescription
Custom Field CreatePOSTCreate a custom field.
Custom Field ReadGETRequest detailed information for a single custom field.
Custom Field UpdatePOSTUpdate a custom field's value.
Custom Field DeletePOST or DELETEDelete a custom field.
Custom Field QueryGETRequest 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

Parameters

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

ParameterTypeDescription
namestringThe name of the custom field.
field_idstringThe 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.

Custom Field Delete

Delete a custom field specified by custom field ID.

URI

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

Example

Delete the custom field with ID 5746xx.

Custom Field Read

Request information about the specified custom field.

URI

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

Example

Request the information for the custom field with 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.

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

URI

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:

ParameterTypeOptionsDescription
created_afterstringtoday, 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/4/do/query?created_after=2019-12-31 24:59:59.
created_beforestringtoday, 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/4/do/query?created_before=today.
id_greater_thanintegerAny positive integerRequests custom fields that have an ID greater than the specified number.
id_less_thanintegerAny positive integerReturns 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.

ParameterTypeOptionsDescription
limitintegerAny integer from 1 through 200The number of custom fields to return. Default value is 200.
offsetintegerAny positive integerThe 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/4/do/query?offset=50&sort_by=created_at
sort_bystringcreated_at, id, probability, valueThe field by which the results are sorted. See Sort Order.
sort_orderstringascending, descendingThe 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.

ValueDefault Sort OrderDescription
created_atdescendingSort the results by the custom fields' created_at timestamps.
idascendingSort the results by the custom fields' id fields.
nameascendingSort 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

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:

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

TagDescription
<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.

XML Response for Custom Field Read

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