APIを利用して、お客様サーバー側にあるLINEユーザーのLINE UIDを指定し、Message Manager側に付与したタグを除去する方法
貴社の顧客基盤(CDPやCRMツールなど)から「end_users/tags/detach」APIを実行することで、Message Manager上のユーザーから特定のタグを削除できます。
ユーザーの状態変更や条件変更に応じてタグを更新することで、セグメント配信やリッチメニューの出し分けを最新の状態に保つことが可能です。
「end_users/tags/detach」API
指定したタグをエンドユーザーから取り除きます。
POST /v2/end_users/tags/detach
エラー定義 参照。
成功時に ステータスコード 200 OK と以下のプロパティを含む JSON オブジェクトを返します。
{
"end_user": {
"identifiers": [
{
"type": "line_uid",
"value": "U0123456789abcdef0123456789abcdef"
},
{
"type": "socialplus_uid",
"value": "wx6nk13a3j8rc7400n4x"
},
{
"type": "primary_key",
"value": null
}
],
"tags": ["tag1", "tag2", "tag3"]
}
}
注記
以下のケースも成功時のレスポンスを返します。
ステータスコード 404 Not Found とともに、以下の内容を返します。
{
"errors": [
{
"path": "__global__",
"code": "resource_not_found"
}
]
}
curl -L -X POST https://msgapi.socialplus.jp/v2/end_users/tags/detach \
-H 'Content-Type: application/json; charset=utf-8' \
-H 'Accept: application/json' \
-H "X-API-Key: {API Key}" \
--data-raw '{
"end_user": {
"identifier": {
"type": "line_uid",
"value": "U01234567890123456789012345678901"
},
"tag": "tag"
}
}'
ソーシャルPLUSに関するお問い合わせやご相談など、お気軽にお問い合わせください。