PHPackages                             cyber-duck/pardot-api - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. cyber-duck/pardot-api

ActiveLibrary

cyber-duck/pardot-api
=====================

PHP package to interact with the Pardot API

2.0.0(5y ago)143.7k24[2 issues](https://github.com/Cyber-Duck/Pardot-API/issues)2MITPHP

Since Jan 31Pushed 2y ago7 watchersCompare

[ Source](https://github.com/Cyber-Duck/Pardot-API)[ Packagist](https://packagist.org/packages/cyber-duck/pardot-api)[ Docs](https://github.com/cyber-duck/pardot-api)[ RSS](/packages/cyber-duck-pardot-api/feed)WikiDiscussions main Synced yesterday

READMEChangelog (1)Dependencies (1)Versions (3)Used By (2)

Pardot-API
==========

[](#pardot-api)

PHP package to interact with the Pardot API

[![Latest Stable Version](https://camo.githubusercontent.com/e8cc0290d1e2fc9b6a8ac3fd874ac68a36932a45842e2439c894606757dd0acc/68747470733a2f2f706f7365722e707567782e6f72672f63796265722d6475636b2f706172646f742d6170692f762f737461626c65)](https://packagist.org/packages/cyber-duck/pardot-api)[![Latest Unstable Version](https://camo.githubusercontent.com/1ce29cdbafe0afe14073379a7dcf176b6ca34f90991964c339ada0213eab9f9f/68747470733a2f2f706f7365722e707567782e6f72672f63796265722d6475636b2f706172646f742d6170692f762f756e737461626c65)](https://packagist.org/packages/cyber-duck/pardot-api)[![Total Downloads](https://camo.githubusercontent.com/3f282d129520e3e6b891c0c5d43c4497e34c4ffa385dfe10aeb5ad22ca93b168/68747470733a2f2f706f7365722e707567782e6f72672f63796265722d6475636b2f706172646f742d6170692f646f776e6c6f616473)](https://packagist.org/packages/cyber-duck/pardot-api)[![License](https://camo.githubusercontent.com/bd55142073c89714956a149ad2e9b73af1a1c5bea974dd069e147fe9a2755308/68747470733a2f2f706f7365722e707567782e6f72672f63796265722d6475636b2f706172646f742d6170692f6c6963656e7365)](https://packagist.org/packages/cyber-duck/pardot-api)

Author: [Andrew Mc Cormack](https://github.com/Andrew-Mc-Cormack)

Pardot API PHP Library
----------------------

[](#pardot-api-php-library)

A library to integrate with the Pardot API through PHP objects

This library simplifies the process of authentication and querying the Pardot API and provides access to all of the v4 API features.

Latest Version 2.0.0 supports Salesforce SSO authentication.

### Setup

[](#setup)

To initalise the Pardot API object pass your user email, password, client id, client secret and business unit id credentials. Any subsequent request to fetch data from the API will automatically perform the authentication actions before trying to fetch data.

```
use CyberDuck\PardotApi\PardotApi;

$pardot = new PardotApi(
    'EMAIL',
    'PASSWORD',
    'CLIENT_ID',
    'CLIENT_SECRET',
    'BUSINESS_UNIT_ID',
);
```

Querying the API
----------------

[](#querying-the-api)

You can call the query method on an any pardot object passing the object, operator, and data array (optional)

```
$result = $pardot->request('campaign', 'read/id/1');

$result = $pardot->request('campaign', 'query', ['created_after' => 'today']);
```

Object Methods
--------------

[](#object-methods)

The PardotApi instance has functions which correspond to the object types in Pardot to simplify calls to the API. When calling one of these functions a query object is returned (-&gt;campaigns() returns a CampaignsQuery object). These returned objects in turn have functions corresponding to different object actions such as query, create, update, insert, delete etc. The full list of objects available are as follows:

### Account methods

[](#account-methods)

```
$pardot->account()->read(); // retrieves current account information
```

### Campaign methods

[](#campaign-methods)

```
$pardot->campaign()->query([...]); // queries and returns a filtered list
$pardot->campaign()->create([...]); // creates an object using passed array data
$pardot->campaign()->read(1); // queries an object by ID
$pardot->campaign()->update(1, [...]); // updates an object by ID using passed array data
```

### Custom Fields methods

[](#custom-fields-methods)

```
$pardot->customField()->query([...]); // queries and returns a filtered list
$pardot->customField()->create([...]); // creates an object using passed array data
$pardot->customField()->read(1); // queries an object by ID
$pardot->customField()->update(1, [...]); // updates an object by ID using passed array data
$pardot->customField()->delete(1); // deletes an object by ID
```

### Custom Redirects methods

[](#custom-redirects-methods)

```
$pardot->customRedirect()->query([...]); // queries and returns a filtered list
$pardot->customRedirect()->read(1); // queries an object by ID
```

### Dynamic Content methods

[](#dynamic-content-methods)

```
$pardot->dynamicContent()->query([...]); // queries and returns a filtered list
$pardot->dynamicContent()->read(1); // queries an object by ID
```

### Email Clicks methods

[](#email-clicks-methods)

```
$pardot->emailClick()->query([...]); // queries and returns a filtered list
```

### Email methods

[](#email-methods)

```
$pardot->email()->read(1); // queries an object by ID
$pardot->email()->stats(1); // Returns the statistical data for the list email
$pardot->email()->sendToID(1, [...]); // Sends a 1 to 1 email to an ID using an array of email config / data
$pardot->email()->sendToEmail('name@example.com', [...]); // Sends a 1 to 1 email to a email address an array of email config / data
$pardot->email()->send([...]); // send an email to a list of IDs
```

### Email Templates methods

[](#email-templates-methods)

```
$pardot->emailTemplate()->listOneToOne(); // Returns a list of email templates used in 1 to 1 emails
```

### Forms methods

[](#forms-methods)

```
$pardot->form()->query([...]); // queries and returns a filtered list
$pardot->form()->read(1); // queries an object by ID
```

### Lifecycle Histories methods

[](#lifecycle-histories-methods)

```
$pardot->lifecycleHistory()->query([...]); // queries and returns a filtered list
$pardot->lifecycleHistory()->read(1); // queries an object by ID
```

### Lifecycle Stages methods

[](#lifecycle-stages-methods)

```
$pardot->lifecycleStage()->query([...]); // queries and returns a filtered list
```

### List Memberships methods

[](#list-memberships-methods)

```
// @todo
```

### Lists methods

[](#lists-methods)

```
// @todo
```

### Opportunities methods

[](#opportunities-methods)

```
// @todo
```

### Prospect Accounts methods

[](#prospect-accounts-methods)

```
// @todo
```

### Prospects methods

[](#prospects-methods)

```
// @todo
```

### Tag Objects methods

[](#tag-objects-methods)

```
$pardot->tagObject()->query([...]); // queries and returns a filtered list
$pardot->tagObject()->read(1); // queries an object by ID
```

### Tags methods

[](#tags-methods)

```
$pardot->tag()->query([...]); // queries and returns a filtered list
$pardot->tag()->read(1); // queries an object by ID
```

### Users methods

[](#users-methods)

```
$pardot->user()->query([...]); // queries and returns a filtered list
$pardot->user()->read(1); // queries an object by ID
$pardot->user()->readByEmail('name@example.com'); // queries an object by email
```

### Visitor Activities methods

[](#visitor-activities-methods)

```
// @todo
```

### Visitors methods

[](#visitors-methods)

```
$pardot->visitor()->query([...]); // queries and returns a filtered list
$pardot->visitor()->read(1); // queries an object by ID
$pardot->visitor()->assign(1,2); // Assigns or reassigns the visitor by ID to a prospect ID.
```

### Visits methods

[](#visits-methods)

```
$pardot->visit()->query([...]); // queries and returns a filtered list
$pardot->visit()->read(1); // queries an object by ID
```

Debugging
---------

[](#debugging)

Error messages can be enabled by turning debugging on. Requests to the Pardot API will fail silently by default so as to prevent fatal application errors. Extra response checking should be conducted when implementing this library as most methods will return null when there is an issue with the API query.

```
$pardot->setDebug(true);
```

Output Type
-----------

[](#output-type)

You can change the output type to full, simple, mobile, or bulk. Defaults to full.

```
$pardot->setOuput('full');
```

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance17

Infrequent updates — may be unmaintained

Popularity29

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~725 days

Total

2

Last Release

1932d ago

Major Versions

1.0.0 → 2.0.02021-01-26

### Community

Maintainers

![](https://www.gravatar.com/avatar/0c45a99726cc30692bc4821cfc198df1f5de85b1a15f9b66a0bf739acbac0309?d=identicon)[cyber-duck](/maintainers/cyber-duck)

---

Top Contributors

[![claire-cyber-duck](https://avatars.githubusercontent.com/u/146204474?v=4)](https://github.com/claire-cyber-duck "claire-cyber-duck (2 commits)")

---

Tags

pardotpardot-apiphpphppardot

### Embed Badge

![Health badge](/badges/cyber-duck-pardot-api/health.svg)

```
[![Health](https://phpackages.com/badges/cyber-duck-pardot-api/health.svg)](https://phpackages.com/packages/cyber-duck-pardot-api)
```

###  Alternatives

[xeroapi/xero-php-oauth2

Xero official PHP SDK for oAuth2 generated with OpenAPI spec 3

1054.3M14](/packages/xeroapi-xero-php-oauth2)[mailchimp/transactional

458.9M16](/packages/mailchimp-transactional)[kinde-oss/kinde-auth-php

Kinde PHP SDK for authentication

2369.5k3](/packages/kinde-oss-kinde-auth-php)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
