Fans
Add a tag to fans in bulk
/v1/accounts/{account_id}/tags/{tag_id}/applyAdds this tag to every fan of the batch, in a single call. Same semantics as the single-fan endpoint: the other tags of each fan stay. A fan that already carries 5 tags is left untouched and listed in tag_limit_fan_ids. Only fans Fansquare has already synced for this account are tagged; the others are listed in unknown_fan_ids and nothing is created for them.
write:tagscurl -X POST 'https://api.fansquare.so/v1/accounts/c851d9d6-b90b-4958-aed2-2fdaa2fe21a3/tags/58368a92-838b-4cb0-ab37-d54ce826ea11/apply' \
-H "Authorization: Bearer $API_KEY" \
-H "Fansquare-Version: Amethyste" \
-H "Content-Type: application/json" \
-d '{
"fan_ids": [
"a6df8022-e509-4575-ad28-e29c2d1d42dc"
]
}'{
"applied": 1,
"unknown_fan_ids": [
"1e99acd1-2439-47d6-a91d-fd86be151fc0"
],
"tag_limit_fan_ids": [
"d2ce5a53-6695-43a5-a83e-da39774830ea"
]
}Parameters
Headers
Fansquare-VersionstringrequiredAPI version to pin. Accepts the mineral name or the release date of a version.
Path
account_idstringrequiredMYM account id (
account.external_idin GET /v1/creators).min length 1tag_idstringrequiredFansquare tag id, from GET /v1/tags.
format uuid
Body
application/json
fan_idsarray of stringsrequiredMYM fan ids. 1 to 500 per call; duplicates are ignored.
format uuidmin items 1max items 500
Response
OK, application/json
appliedintegerrequiredNumber of distinct fans now carrying the tag.
unknown_fan_idsarray of stringsrequiredFan ids of the batch this account has no relation with yet: not tagged, nothing created.
tag_limit_fan_idsarray of stringsrequiredFan ids of the batch that already carry 5 tags: left untouched.
curl -X POST 'https://api.fansquare.so/v1/accounts/c851d9d6-b90b-4958-aed2-2fdaa2fe21a3/tags/58368a92-838b-4cb0-ab37-d54ce826ea11/apply' \
-H "Authorization: Bearer $API_KEY" \
-H "Fansquare-Version: Amethyste" \
-H "Content-Type: application/json" \
-d '{
"fan_ids": [
"a6df8022-e509-4575-ad28-e29c2d1d42dc"
]
}'{
"applied": 1,
"unknown_fan_ids": [
"1e99acd1-2439-47d6-a91d-fd86be151fc0"
],
"tag_limit_fan_ids": [
"d2ce5a53-6695-43a5-a83e-da39774830ea"
]
}