Unofficial PHP Wrapper for ActiveCampaign API v3.
composer require crazyfactory/activecampaign-v3-php
$client = new Client(
null,
$api_url,
$api_token,
$event_tracking_actid,
$event_tracking_key
);
Or with a custom HTTP client
$client = new Client(
new \GuzzleHttp\Client([
'base_uri' => $api_url,
'headers' => [
'User-Agent' => \CrazyFactory\ActiveCampaignClient\Client::LIB_USER_AGENT,
\CrazyFactory\ActiveCampaignClient\Client::HEADER_AUTH_KEY => $api_token,
'Accept' => 'application/json'
]
])
);
$contacts = new Contacts($client);
$contact = $contacts->create([
'email' => 'CONTACT_EMAIL',
'firstName' => 'CONTACT_FIRST_NAME',
'lastName' => 'CONTACT_LAST_NAME'
]);
- Contacts
- Deals
- Lists
- Organizations
- EventTracking
- SiteTracking
Official API docs: https://developers.activecampaign.com/reference