Subscribes a contact to a list, or changes the status of the contact's subscription to it. If the contact already has a membership on the list, that membership is updated and the response is 200; otherwise a new one is created and the response is 201. Needs the permission to edit contacts.
If the contact's membership on the list is currently unsubscribed, any change to it needs the permission to resubscribe contacts, whatever status you send, including another unsubscribe. Without it the request fails with 422.
Any status other than 2 needs a contact that exists and a list that exists (404 otherwise), and a contact with an email address for an email list or with a phone number for an SMS list (400 otherwise). When the status becomes 1, sdate is set to now, udate and the unsubscribe details are cleared, the automations that start when a contact subscribes to this list are started, and the list's subscribe webhooks are called. A new active membership also gets the list's subscribe autoresponders and, when the list is set to send it, the list's last campaign; neither is sent when the contact is excluded from the list. When the list has a subscription notification set up, the notification email is also sent to the addresses configured on the list (not to the contact), even when the contact is excluded from the list.
Unsubscribing (status 2) a contact who was on the list and not already unsubscribed runs the app's unsubscribe for that list: the automations that start when a contact unsubscribes from the list are started, the list's unsubscribe webhooks are called, the list's unsubscribe autoresponders are sent to the contact, and the list's unsubscribe notification email goes to the addresses configured on the list; each only when the list has one. No unsubscribe reason is recorded; this endpoint cannot set one. The membership is kept, with status 2 and udate set. The contact is not checked when unsubscribing.
With an API key, sourceid is stored as 4 (API), unless you send the number 8 (SMS).
Resubscribing contactsIf you change a contact's list status from unsubscribed ("2") to active ("1"), you will re-subscribe a contact to a list from which they had manually unsubscribed.
Organization-Related Nodes Have Been DeprecatedContact-Organization relationships are now managed through Account-Contact end points
{
"contactList": {
"list": 2,
"contact": 1,
"status": 1
}
}{
"contacts": [
{
"cdate": "2017-07-24T12:09:52-05:00",
"email": "[email protected]",
"phone": "",
"firstName": "John",
"lastName": "Doe",
"orgid": "0",
"segmentio_id": "",
"bounced_hard": "0",
"bounced_soft": "0",
"bounced_date": "0000-00-00",
"ip": "0",
"ua": "",
"hash": "1234567890",
"socialdata_lastcheck": "0000-00-00 00:00:00",
"email_local": "",
"email_domain": "",
"sentcnt": "1",
"rating_tstamp": "0000-00-00",
"gravatar": "0",
"deleted": "0",
"anonymized": "0",
"adate": "2018-10-16T13:52:32-05:00",
"udate": "2018-10-16T13:50:18-05:00",
"deleted_at": "0000-00-00 00:00:00",
"created_utc_timestamp": "2018-10-01 08:40:10",
"updated_utc_timestamp": "2018-10-16 13:50:18",
"links": {
"bounceLogs": "https://:account.api-us1.com/api/:version/contacts/1/bounceLogs",
"contactAutomations": "https://:account.api-us1.com/api/:version/contacts/1/contactAutomations",
"contactData": "https://:account.api-us1.com/api/:version/contacts/1/contactData",
"contactGoals": "https://:account.api-us1.com/api/:version/contacts/1/contactGoals",
"contactLists": "https://:account.api-us1.com/api/:version/contacts/1/contactLists",
"contactLogs": "https://:account.api-us1.com/api/:version/contacts/1/contactLogs",
"contactTags": "https://:account.api-us1.com/api/:version/contacts/1/contactTags",
"contactDeals": "https://:account.api-us1.com/api/:version/contacts/1/contactDeals",
"deals": "https://staging-tjahn.api-us1.com/api/3/contacts/1/deals",
"fieldValues": "https://:account.api-us1.com/api/:version/contacts/1/fieldValues",
"geoIps": "https://:account.api-us1.com/api/:version/contacts/1/geoIps",
"notes": "https://:account.api-us1.com/api/:version/contacts/1/notes",
"organization": "https://:account.api-us1.com/api/:version/contacts/1/organization",
"plusAppend": "https://:account.api-us1.com/api/:version/contacts/1/plusAppend",
"trackingLogs": "https://:account.api-us1.com/api/:version/contacts/1/trackingLogs",
"scoreValues": "https://:account.api-us1.com/api/:version/contacts/1/scoreValues"
},
"id": "1",
"organization": null
}
],
"contactList": {
"contact": "1",
"list": "2",
"form": null,
"seriesid": "0",
"sdate": "2018-10-16T13:52:35-05:00",
"status": 1,
"responder": "1",
"sync": "0",
"unsubreason": "",
"campaign": null,
"message": null,
"first_name": "John",
"last_name": "Doe",
"ip4Sub": "0",
"sourceid": "3",
"autosyncLog": null,
"ip4_last": "0",
"ip4Unsub": "0",
"unsubscribeAutomation": null,
"links": {
"automation": "https://:account.api-us1.com/api/:version/contactLists/2/automation",
"list": "https://:account.api-us1.com/api/:version/contactLists/2/list",
"contact": "https://:account.api-us1.com/api/:version/contactLists/2/contact",
"form": "https://:account.api-us1.com/api/:version/contactLists/2/form",
"autosyncLog": "https://:account.api-us1.com/api/:version/contactLists/2/autosyncLog",
"campaign": "https://:account.api-us1.com/api/:version/contactLists/2/campaign",
"unsubscribeAutomation": "https://:account.api-us1.com/api/:version/contactLists/2/unsubscribeAutomation",
"message": "https://:account.api-us1.com/api/:version/contactLists/2/message"
},
"id": "2",
"automation": null
}
}