The contact is named by contact (an ID) or by contact_email, and the automations by automation (one ID) or automations (an array of IDs); one of each pair is required.
A request using automations responds with a contactAutomations collection and a meta object holding succeeded and failed arrays of automation IDs, so an automation the contact is already in, or one with no start step, is reported without failing the request. Every automation is validated before the contact is resolved, so a request naming an unknown or inactive automation returns a 422 and creates no contact. A 400 is returned when neither contact field is given, contact_email is not an email address, an automation ID is not a positive integer, or more than 25 automations are named.
{
"contactAutomation": {
"contact": "117",
"automation": "42"
}
}{
"contacts": [
{
"cdate": "2018-08-06T16:26:06-05:00",
"email": "[email protected]",
"phone": "",
"firstName": "",
"lastName": "",
"orgid": "0",
"segmentio_id": "",
"bounced_hard": "0",
"bounced_soft": "0",
"bounced_date": null,
"ip": "2130706433",
"ua": null,
"hash": "054aa0acede49e07a844420c879b3c30",
"socialdata_lastcheck": null,
"email_local": "",
"email_domain": "",
"sentcnt": "0",
"rating_tstamp": null,
"gravatar": "0",
"deleted": "0",
"anonymized": "0",
"adate": null,
"udate": null,
"edate": null,
"deleted_at": null,
"created_utc_timestamp": "2018-09-21 12:04:40",
"updated_utc_timestamp": "2018-09-21 12:04:40",
"links": {
"bounceLogs": "https://:account.api-us1.com/api/:version/contacts/64/bounceLogs",
"contactAutomations": "https://:account.api-us1.com/api/:version/contacts/64/contactAutomations",
"contactData": "https://:account.api-us1.com/api/:version/contacts/64/contactData",
"contactGoals": "https://:account.api-us1.com/api/:version/contacts/64/contactGoals",
"contactLists": "https://:account.api-us1.com/api/:version/contacts/64/contactLists",
"contactLogs": "https://:account.api-us1.com/api/:version/contacts/64/contactLogs",
"contactTags": "https://:account.api-us1.com/api/:version/contacts/64/contactTags",
"contactDeals": "https://:account.api-us1.com/api/:version/contacts/64/contactDeals",
"deals": "https://:account.api-us1.com/api/:version/contacts/64/deals",
"fieldValues": "https://:account.api-us1.com/api/:version/contacts/64/fieldValues",
"geoIps": "https://:account.api-us1.com/api/:version/contacts/64/geoIps",
"notes": "https://:account.api-us1.com/api/:version/contacts/64/notes",
"organization": "https://:account.api-us1.com/api/:version/contacts/64/organization",
"plusAppend": "https://:account.api-us1.com/api/:version/contacts/64/plusAppend",
"trackingLogs": "https://:account.api-us1.com/api/:version/contacts/64/trackingLogs",
"scoreValues": "https://:account.api-us1.com/api/:version/contacts/64/scoreValues"
},
"id": "64",
"organization": null
}
],
"contactAutomation": {
"contact": "64",
"seriesid": "2",
"startid": 0,
"status": 1,
"lastblock": "4",
"completedElements": "1",
"totalElements": "2",
"completed": 0,
"completeValue": 50,
"links": {
"automation": "https://:account.api-us1.com/api/:version/contactAutomations/3/automation",
"contact": "https://:account.api-us1.com/api/:version/contactAutomations/3/contact",
"contactGoals": "https://:account.api-us1.com/api/:version/contactAutomations/3/contactGoals"
},
"id": "3",
"automation": "2"
}
}