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

Folders

The API access to the Folder object 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/folders/<id>?<params> Admin > Folders > View ability
Query GET https://pi.pardot.com/api/v5/objects/folders?<params> Admin > Folders > 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 The name of the folder.
parentFolderId Integer ID of the folder containing this folder. This value will be null when the folder is a root folder and doesn't have a parent.
path String The names of each folder from the root folder separated with forward slashes (/).
usePermissions Boolean True if the folder is configured to use permissions.
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.
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.
parentFolder Folder JSON object representing the folder for this object. See documentation for Folder for fields.

Folder Query

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

Sortable Fields

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

Filtering Results

When executing a query for folders, 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 folders where ID is equal to the given integer value.
idGreaterThan Returns any folders where ID is greater than the specified value, non-inclusive.
idGreaterThanOrEqualTo Returns any folders where ID is greater than or equal to the specified value.
idLessThan Returns any folders where ID is less than the specified value, non-inclusive.
idLessThanOrEqualTo Returns any folders where ID is less than or equal to the specified value.
parentFolderId Returns any folders where the parentFolderId is equal to the given integer value.
parentFolderIdGreaterThan Returns any folders where the parentFolderId is greater than the specified value, non-inclusive.
parentFolderIdGreaterThanOrEqualTo Returns any folders where the parentFolderId is greater than or equal to the specified value.
parentFolderIdLessThan Returns any folders where the parentFolderId is less than the specified value, non-inclusive.
parentFolderIdLessThanOrEqualTo Returns any folders where the parentFolderId is less than or equal to the specified value.
parentFolderIdIsNull Returns any folders where the parentFolderId is null.
parentFolderIdIsNotNull Returns any folders where the parentFolderId is not null.

Example request:

GET /api/v5/objects/folders?fields=id,name,parentFolder.id,parentFolder.name&parentFolderId=1723 HTTP/1.1
Host: pi.localhost.com
Authorization: Bearer <access-token>

Example response

HTTP/1.1 200 OK
Content-Type: application/json
{
    "values": [
        {
            "id": 9872,
            "name": "Example Folder 1",
            "parentFolder": {
                "id": 1723,
                "name": "Files"
            }
        },
        {
            "id": 10348,
            "name": "Example Folder 2",
            "parentFolder": {
                "id": 1723,
                "name": "Files"
            }
        }
    ]
}