POST /interaction/v1/interactions/contactexit

Overview 

Removes up to 50 contacts from a journey or from one or more versions of a journey.

JSON Parameters 

NameTypeDescription
ContactKeystringRequiredID that uniquely identifies a subscriber or contact. Include a single contact or an array of up to 50 contacts.
DefinitionKeystringRequiredCustomer Key that uniquely identifies the journey. This key is the same for all versions of the journey.
VersionsarrayOne or more versions of a journey from which to remove a contact.

Responses 

StatusNameTypeDescription
202  ****
 errorsarrayList of errors for request to remove a contact from a journey
 contactKeystringContact that needs to be removed from a journey
 definitionKeystringDefinition key of the journey
 statusarrayArray of statuses of the contact in a given journey
 status.versionstringVersion number of the journey
 status.messagestringStatus of the request to remove a contact from a specific version of the journey

Usage 

Example Request 

Host: https://YOUR_SUBDOMAIN.rest.marketingcloudapis.com
POST /interaction/v1/interactions/contactexit
Content-Type: application/json
Authorization: Bearer YOUR_ACCESS_TOKEN

[
    {
        "ContactKey": "CONTACTKEY 1",
        "DefinitionKey": "DEFINITIONKEY"
    },
    {
        "ContactKey": "CONTACTKEY 2",
        "DefinitionKey": "INVALID DEFINITIONKEY",
        "Versions" :[1,2]
    }
]

Response: No Errors 

HTTP/1.1 202 Accepted
{
    "errors": []
}

Response: Duplicate Request to Exit Contact 

HTTP/1.1 202
{
    "errors": [
        {
            "contactKey": "CONTACTKEY 1",
            "definitionKey": "DEFINITIONKEY",
            "status": [
                {
                    "version": 1,
                    "message": "Exit request Ignored - Duplicate Request"
                }
            ]
        }
    ]
}

Response: Invalid definitionKey 

HTTP/1.1 202
{
    "errors": [
        {
            "contactKey": "CONTACTKEY 1",
            "definitionKey": "<Invalid definitionKey>",
            "status": [
                {
                    "version": 0,
                    "message": "Exit request Ignored - Invalid Interaction"
                }
            ]
        }
    ]
}

Response: Runtime Error 

HTTP/1.1 400
{
    "message": "{{{ERROR_OPEN_SUPPORT_CASE}}}",
    "errorcode": 30000,
    "documentation": ""
}

Response: Empty or Incorrect Authorization Token 

HTTP/1.1 401
{
    "documentation": "https://developer.salesforce.com/docs/atlas.en-us.mc-apis.meta/mc-apis/error-handling.htm",
    "errorcode": 0,
    "message": "Not Authorized"
}