Add a contact to an automation

Add a contact to an automation, or to several at once, so it enters the workflow and starts moving through its actions. An add through the API counts as added manually, so the automation's setting for how often a contact may enter does not apply: adding the same contact again starts another run instead of failing, up to 100 adds per contact per automation in 24 hours, after which the call answers 403. Only an active automation (status 1) is guaranteed to accept contacts. A draft (0) or inactive (2) automation answers 422 "The automation you have selected is inactive." for every contact, and so does a paused (3) one unless the account's automations accept entries while paused, so check the status in GET /automations first. Name the contact with contact, its id, or with contact_email, its email address; when no contact has that address one is created first, which needs permission to add contacts and room under the account's contact limit, and the new contact stays even if the add then fails. Name the automation with automation, one id, or with automations, up to 25 ids. Every automation named must be active: one that is not refuses the whole call with 422 before any contact is created or added. An automation or contact id that does not exist answers 422, not 404. With automation the response contactAutomation is the contact's run in the automation, with its id and status: 1 while in progress, 2 once ended. With automations each automation is added on its own and the response carries contactAutomations, the runs created, with meta.succeeded and meta.failed listing the automation ids that did and did not take the contact; an automation the contact could not enter, such as one without a start step, is reported under failed while the others still succeed. The call answers 201 when at least one automation took the contact, 422 when none did, or 403 when the rate limit refused every one of them.

{
    "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"
    }
}
Body Params
contactAutomation
object
Responses

400

Neither contact nor contact_email was sent, contact_email is not an email address, neither automation nor automations was sent, automations is empty or names more than 25 automations, or an automation id is not a positive integer.

422

An automation named in the request is not active (draft, inactive, or paused), which refuses the whole call; no automation named has a start step; or an automation or contact id does not exist.

Language
Credentials
Header
URL
LoadingLoading…
Response
Choose an example:
application/json