FansquareAPI reference
Open the app

Fans

Set a tag on fans in bulk

POST/v1/accounts/{account_id}/tags/{tag_id}/apply

Sets this tag on every fan of the batch, in a single call. Same semantics as the single-fan endpoint: the tag replaces the previous tag of each fan. 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.

Required scopewrite:tags
Rate limit120 requests per minute
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"
  ]
}

Parameters

Headers

  • Fansquare-Versionstringrequired

    API version to pin. Accepts the mineral name or the release date of a version.

Path

  • account_idstringrequired

    MYM account id (account.external_id in GET /v1/creators).

    min length 1
  • tag_idstringrequired

    Fansquare tag id, from GET /v1/tags.

    format uuid

Body

application/json

  • fan_idsarray of stringsrequired

    MYM fan ids. 1 to 500 per call; duplicates are ignored.

    format uuidmin items 1max items 500

Response

OK, application/json

  • appliedintegerrequired

    Number of distinct fans now carrying the tag.

  • unknown_fan_idsarray of stringsrequired

    Fan ids of the batch this account has no relation with yet: not tagged, nothing created.

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"
  ]
}