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

User Resources

User resources tell you about the Pardot users in your organization. Learn more about users in Salesforce Help.

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

Resource Name Operation Description
User Query GET Request information for users that match the specified criteria.
User Read GET Request information for a single user.

User Query

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

URI

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

Parameters to Select User Records

Use these parameters to specify the users to return. Parameters can be used in any combination and in any order unless otherwise specified.

Notes:

Parameter Type Possible Values Description
created_after string today, yesterday, last_7_days, this_month, last_month,<custom_time> Request users created after the specified time. Example: To request forms created in 2020, use /api/user/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 users created before the specified time. Doesn’t include users created at the specified time. Example: To request users created before today (but not created today), use /api/user/version/3/do/query?created_before=today.
id_greater_than integer Any positive integer Request users that have an ID greater than the specified number.
id_less_than integer Any positive integer Request users that have an ID less than the specified number.

Parameters to Specify Which Results Are Returned

Use these parameters to specify the user fields to return, and how the users are sorted.

Parameter Type Possible Values Description
limit integer Any integer from 1 through 200. The number of users to return. Default value is 200.
offset integer Any positive integer The number of users to omit from the response (the number to "skip over"). Example: Retrieve a list of users, omitting the 50 most recently updated records. Sort the query by the created_at field and use offset=50: /api/user/version/3/do/query?sort_by=created_at&offset=50
sort_by string created_at, id 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 sort_by 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 users' created_at timestamps.
id ascending Sort the results by the users' id fields.

User Read

Request information for a single user. You can request a user by email or by Pardot ID.

URI

/api/user/version/3/do/read/id/<ID>

Replace <ID> with the Pardot ID of the user.

/api/user/version/3/do/read/email/<email>

Replace <email> with the user's email.

Example

Request information about the user with Pardot ID 1234.

/api/user/version/3/do/read/id/1234

XML Response

The XML response for a query request contains information for multiple users. The XML response for a read request contains information for a single user.

XML Response for a User Query

<rsp stat="ok" version="1.0">
    <result>
        <total_results>...</total_results>
        <user>...</user>
        <user>...</user>
        <user>...</user>
    </result>
</rsp>
Tag Description
<result> Parent tag. Contains information about the users that match the parameters specified in your query.
<total_results> Contains the number of users selected by the query. Note The query request returns a maximum of 200 users. If your query matches more than 200 records, you can make several requests to retrieve all matching records.
<user> The information about a single user. See User in Object Field References for a complete description of fields.

XML Response for a User Read

<rsp stat="ok" version="1.0">
  <user>
    <id>17</id>
    <name>Gillian Bennet</name>
    <embedCode>
         <script type="text/javascript" src="http://www2.pardot.com/this.js"></script>
    </embedCode>
    <embedUrl>http://www2.pardot.com/this.js</embedUrl>
    <baseContent><p class="title">This is User</p></baseContent>
    <basedOn>Custom Field: CRM System</basedOn>
    <variation>
        <comparison>some text</comparison>
        <content>
            <h1 class="title"><img src="http://www2.pardot.com/picture.png" width="498" height="79" alt="picture.png" title="picture.png" /></h1>
        </content>
    </variation>
    <variation>
        <comparison>is SugarCRM</comparison>
        <content>
            <p><img src="http://www2.pardot.com/picture.png" width="560" height="73" alt="picture.png" title="picture.png" /></p>
        </content>
    </variation>
    <created_at>2012-04-13 10:19:54</created_at>
    <updated_at>2012-05-23 02:55:34</updated_at>
  </user>
</rsp>
Tag Description
<user> The information about a single user. See User in Object Field References for a description of fields.