I have been working with the V3 API and trying to get a list of new subscribers and unsubscribed. I can get a list of active (subscribes), but not unsubscribed. In fact, the only status that will pull anything with the "GET contacts collection" method is "all".
I also tried the bulk export endpoint, but I am unable to get unsubscribed there. A file is created with either 0 records or if it has records, every cell in the file is blank.
Also, when I try to pull additional records using the "cursor" link, I don't get a new "cursor_id" with each page that I pull. I have no idea if that is how it is supposed to work or not. I am not confident that I am in fact retrieving the next page when the cursor_id does not change.
Can anyone tell me how to get just the unsubscribed?
Hello B2ED,
Thank you for reaching out to Constant Contact API Developer Support. My team is here to assist outside software developers with questions about building into Constant Contact's API.
If you are developing your own application for integration using our V3 API to gather all contacts unsubscribed via Constant Contact, the easiest way to pull this data is by calling the Contacts endpoint.
To only capture active contacts that have unsubscribed, you can call:
GET
https://api.cc.email/v3/contacts?limit=500&status=unsubscribed
However, to also capture contacts previously unsubscribed that have been deleted, you'd want to add the deleted value to the status parameter and then parse your results for contacts with "permission_to_send": "unsubscribed" from the results, as it will return all unsubscribed and all deleted contacts:
GET
https://api.cc.email/v3/contacts?limit=500&status=unsubscribed,deleted
If more than 500 results are returned, at the bottom of the response body will be the link to call the next page, which will look like this:
"_links": {
"next": {
"href": "/v3/contacts?cursor={value}
You will then take that link to make another call to view the next page of results:
GET
https://api.cc.email/v3/contacts?cursor={value}
Below is the related documentation for this endpoint:
[Documentation]
V3 API - Contacts Overview
https://developer.constantcontact.com/api_guide/contacts_overview.html
[API Tester]
GET Contacts Collection
https://developer.constantcontact.com/api_reference/index.html#!/Contacts/getContacts
Please have a look and let us know if you have any other questions!
Announcements
Join our list to be notified of new features and updates to our V3 API.
Sign Up