v1

latestSwagger 2.0Private2026-08-04128286690.5 KB
Bulk Activities

Remove Contacts from Lists

Use this method to create an activity that removes contacts from one or more contact lists. Use the properties in the source object to remove specific contacts from your lists. Use the list_ids array to specify the target lists from which contacts are removed. Optionally, if the source is all_active_contacts (billable) or list_ids, use the exclude object to exclude specific contacts from being removed from the destination lists.

post/activities/remove_list_memberships

Request body

list_idsstring[] required

Specify up to 50 target <code>list_id</code>s from which to remove contacts.

Example request

{
  "source": {
    "list_ids": [
      "5bbf758c-d8ce-11e9-8d3a-fa163e56c9b0"
    ],
    "contact_ids": [
      "4d88f172-21d1-11ea-b5ae-fa163e56c9b0"
    ],
    "all_active_contacts": true,
    "engagement_level": "high",
    "tag_ids": [
      "5e88f172-21d1-11ea-b5ae-fa163e56c9b9"
    ]
  },
  "exclude": {
    "contact_ids": [
      "4d88f172-21d1-11ea-b5ae-fa163e56c9b0"
    ]
  },
  "list_ids": [
    "04fe9a97-a579-43c5-bb1a-58ed29bf0a6a"
  ]
}

Response

Request successful. Activity queued for processing.

activity_idstring uuid

Unique ID for the activity.

statestring

The state of the request: <p><ul> <li>initialized - request has been received</li> <li>processing - request is being processed</li> <li>completed - job completed</li> <li>cancelled - request was cancelled</li> <li>failed - job failed to complete</li> <li>timed_out - the request timed out before completing"</li> </ul> </p>

started_atstring date-time

Timestamp showing when we began processing the activity request, in ISO-8601 format.

completed_atstring date-time

Timestamp showing when we completed processing the activity, in ISO-8601 format.

created_atstring date-time

Timestamp showing when we created the activity, in ISO-8601 format.

updated_atstring date-time

Timestamp showing when we last updated the activity, in ISO-8601 format.

percent_doneinteger

Shows the percent done for an activity that we are still processing.

activity_errorsstring[]

Array of messages describing the errors that occurred.

Example response

{
  "activity_id": "86b90820-cc52-11ea-9dad-fa163e3d9194",
  "state": "initialized",
  "started_at": "2016-01-23T13:48:44.108Z",
  "completed_at": "2016-01-23T13:48:44.108Z",
  "created_at": "2016-01-23T13:48:44.108Z",
  "updated_at": "2016-01-23T13:48:44.108Z",
  "percent_done": 75,
  "activity_errors": [
    "Message describing the error condition."
  ],
  "status": {
    "items_total_count": 2200,
    "items_completed_count": 652,
    "list_count": 3
  },
  "_links": {
    "self": {
      "href": "/v3/activities/04fe9a97-a579-43c5-bb1a-58ed29bf0a6a"
    }
  }
}