メインコンテンツへスキップ
PUT
/
crm
/
v3
/
lists
/
{listId}
/
memberships
/
add-and-remove
リストのレコードを追加または削除
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"
  ]
}

サポートされる製品

次のいずれかの製品またはそれ以上が必要です。
Marketing HubMarketing Hub -無料ツール
Sales HubSales Hub -無料ツール
Service HubService Hub -無料ツール
Content HubContent Hub -無料ツール
この API には、次のいずれかのスコープが必要です。
cms.membership.access_groups.write
crm.lists.read
crm.lists.write

承認

Authorization
string
header
必須

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

パスパラメータ

listId
string
必須

「MANUAL」または「SNAPSHOT」リストのILS ID

ボディ

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.

recordIdsToAdd
string[]
必須
recordIdsToRemove
string[]
必須

レスポンス

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.

recordIdsMissing
string[]
必須

「欠落」していたため(例:ポータルに存在しなかった)、「追加」または「削除」されなかったレコードのID。

recordIdsRemoved
string[]
必須

リストから「削除」されたレコードのID。

recordsIdsAdded
string[]
必須
Last modified on March 30, 2026