Get Contacts that an Campaign was sent to

Hello

I am trying to get a list of contacts that a campaign was sent to.
I am currently able to get the list of contacts on a list but there does not seem to
be anyway to get a list of contacts that you know a campaign was sent to. Is that something
that is possible via the api?

1 Like

BrandonBraner1,
Did you ever figure this out? I am trying to accomplish the same thing.

Hi,

Just jumping in here real quick. You can run a search in the contacts section using the condition of ā€œHas been sentā€ and then specifying the campaign you want to filter by. More information about this can be found here: https://help.activecampaign.com/hc/en-us/articles/115000949804-How-can-I-find-contacts-that-were-sent-a-campaign-.

This method does not use our API though. Were you needing to specifically run an API call to pull this data? If so, let me know and I will look into this further for you.

Thank you,
Cody

Thanks Cody. I see your reply was in 2019, and things must have changed since then.
I followed the instructions and the result was my entire list, not the 11 or 12 people who were in my segment. After panicking, I checked the campaign list and see that it only went to 11 people. (I was trying to troubleshoot why 1 person in the segment didnā€™t receive the campaign. Since it was a small segment, I went through 1 by 1 and found the problem.)

I just came across this thread. Is it not possible to retrieve all contacts a campaign was sent to through the API?

Unfortunately, I donā€™t think this is possible.

Same problem. :man_facepalming:

Although I was able to get the contacts that did open the campaign.

  1. Get the campaigns
    /campaigns?orders[sdate]=DESC&limit=1

  2. Get the campaign links
    $linksUrl = $campaigns[index]['links']['links'];
    Do the request with $linksUrl. (/campaigns/{campaignId}/links)

Response:
$links = $linksResponse['links'];

  1. Search for items with: ā€˜linkā€™ => openā€™
    $linkDataUrl = $links[index]['links']['linkData'];

  2. Make the request with $linkDataUrl:

$linkData = $linkDataResponse['linkData'];

Loop through all the linkdataā€™s and get the contactId:
$contactId = $linkData[index]['contact']