APIを利用して、お客様サーバー側にあるLINEユーザーのLINE UIDを指定し、Message Manager側に任意のタグを付与する方法
貴社の顧客基盤(CDPやCRMツールなど)で条件に合うユーザーを抽出し、「end_users/tags/attach」APIを実行することで、Message Managerの対象ユーザーへ直接タグを付与できます。
付与したタグを利用することで、セグメント配信やトリガー配信、リッチメニューの出し分けなどが可能です。
「end_users/tags/attach」API
指定したタグをエンドユーザーに付与します。
POST /v2/end_users/tags/attach
エラー定義 参照。
成功時に ステータスコード 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"
}
]
}
ステータスコード 400 Bad Request とともに、以下の内容を返します。
{
"errors": [
{
"path": "__global__",
"code": "invalid_parameter"
}
]
}
curl -L -X POST https://msgapi.socialplus.jp/v2/end_users/tags/attach \
-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に関するお問い合わせやご相談など、お気軽にお問い合わせください。