PUT
/
crm
/
v3
/
lists
/
{listId}
/
memberships
/
add-and-remove
Add and/or Remove Records from a List
curl --request PUT \
  --url https://api.hubapi.com/crm/v3/lists/{listId}/memberships/add-and-remove \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "recordIdsToAdd": [
    "123",
    "456",
    "789"
  ],
  "recordIdsToRemove": [
    "654"
  ]
}'
{
  "recordIdsAdded": [
    "123",
    "456"
  ],
  "recordIdsMissing": [
    "789"
  ],
  "recordIdsRemoved": [
    "654"
  ]
}
Supported products
Requires one of the following products or higher.
Marketing HubMarketing HubStarter
Sales HubSales HubFree
Service HubService HubFree
Content HubContent HubStarter

Required Scopes

This API requires one of the following scopes:
  • crm.lists.read
  • crm.lists.write
  • cms.membership.access_groups.write
  • crm.lists.read

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Body

application/json

The IDs of the records to add and/or remove from the list.

The IDs of the records to add and/or remove from a list.

Response

200
application/json

Successful response

The IDs of the records that were added, removed, and/or found to be missing as a result of the membership update request.