FansquareAPI reference
Open the app

Get started

Identifiers

Agency resources use Fansquare ids, platform resources under /v1/accounts use MYM ids. One field links the two.

The API speaks two families of identifiers, one per world.

RoutesIdentify resources withExamples
/v1/creators, /v1/employees, /v1/orders, /v1/sent-messages, /v1/analytics, /v1/publications, /v1/webhooksFansquare idscreator_id, order_id, user_id
/v1/accounts/{account_id}/…MYM ids, end to endaccount_id, fan_id

Agency resources: Fansquare ids

Creators, employees, orders, publications and webhook endpoints belong to your agency. They are identified by the id field Fansquare returns, which never changes. Use it in the path of the single-resource routes (GET /v1/orders/{order_id}) and in filters (?creator_ids=).

Store every id as an opaque string: their formats differ.

IdFormatExample
Creator20 letters and digitsq7Ln2VbX9eKp4RtZ1wYc
Employee (user_id, assigned_user_id)Opaque stringHq4ZtW8nR2bVx6LmP0sYk9JcD3fA
Order, publication, sent message, tag, webhook endpoint, delivery failureUUID0199c7a2-5d4e-7b3a-9f1e-2c8d6b4a1e07

An order also carries its MYM id in external_id, for your own reconciliation. It is not accepted as a path parameter.

Platform resources: MYM ids

Fans exist on MYM, inside the account of a creator. Routes under /v1/accounts are addressed with MYM ids only:

  • account_id is the MYM id of the creator's connected account;

  • fan_id is the MYM id of the fan.

The only Fansquare ids you meet there are in fields: references to agency resources, assigned_user_id (an employee) and the id of each tag, and the request_id of AI control requests, only used to acknowledge them.

The bridge between the two

GET /v1/creators returns, for each creator, the MYM account connected to it in account.external_id. That value is the account_id of the /v1/accounts routes. Read the mapping once at setup.

JSON
{
  "id": "q7Ln2VbX9eKp4RtZ1wYc",
  "name": "Luna",
  "account": {
    "status": "active",
    "username": "luna",
    "external_id": "a8c4e2f0-3b5d-4c7e-9f1a-2b4c6d8e0f13"
  }
}

Orders and sent messages carry the MYM fan_id of the fan, so you can go from a sale to the fan's CRM state on /v1/accounts/{account_id}/fans/{fan_id}.

MYM ids of an account and its fans are stable: reconnecting the same MYM account keeps them.