2
votes

I am using ActiveCampaign API to list all contacts from account, but API returns only contacts which has at-least one lists assigned. My account contains around 159 contacts with 'has records' tag assigned, out of which 133 contacts has no lists assigned. When I run API call, it will return only 26 contacts (With atleast one lists assigned). I even tried 'filters[listid]' params.

I need to fetch all the contacts even if they don't have any lists assigned to them. Is there any way to achieve this?

Here is sample API call

$ac = new ActiveCampaign(<ACTIVECAMPAIGN_URL>, <ACTIVECAMPAIGN_API_KEY>);
$params = array(
    'api_key' => <ACTIVECAMPAIGN_API_KEY>,
    'api_action' => 'contact_list',
    'api_output' => 'json',
    'filters[tagname]' => 'has records',
    'full' => '0',
    'page' => '2'

);

$results = (array) $ac->api('contact/list?'.http_build_query($params), $params);
2

2 Answers

3
votes

Along with posting this question on stackoverflow, I also contacted ActiveCampaign for the same and I got the reply from them. Currently they are not supporting this feature to fetch contacts has no lists assigned.

Here is the reply from ActiveCampaign enter image description here

1
votes

ActiveCampaign's v3 API allows you to GET a list of all contacts regardless of subscription status (List all contacts documentation).

curl --request GET \
--url https:///:account.api-us1.com/api/3/contacts

Be sure to include your API key in your call!