FansquareAPI reference
Open the app

Scripts

Get a script

GET/v1/scripts/{script_id}

Returns one script with its messages. 404 if it does not exist in the agency.

Required scoperead:scripts
Rate limit60 requests per minute
curl 'https://api.fansquare.so/v1/scripts/7668136a-d6ea-4b9d-a45d-f8b902de321f' \
  -H "Authorization: Bearer $API_KEY" \
  -H "Fansquare-Version: Amethyste"
{
  "id": "7668136a-d6ea-4b9d-a45d-f8b902de321f",
  "creator_id": "m81IhLxdhzDGYs54rNp2",
  "collection_id": "9b0b4f0e-3127-406b-a0f2-e7bf80e50779",
  "name": "Lena",
  "position": 1,
  "context_note": "string",
  "messages": [
    {
      "id": "a75011a9-0287-4cf3-ab3f-825aef61b191",
      "content": "string",
      "price_cents": 1500,
      "media_ids": [
        "b12eacb2-afea-4959-a0d0-b685e6b49279"
      ],
      "is_voice": true,
      "unresolved_media_count": 12
    }
  ],
  "created_at": "2026-10-12T21:14:00.000Z",
  "updated_at": "2026-10-12T21:14:00.000Z"
}

Parameters

Headers

  • Fansquare-Versionstringrequired

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

Path

  • script_idstringrequired

    Fansquare script id (the id field of script items).

    format uuid

Response

OK, application/json

  • idstringrequired

    Fansquare script id. Path parameter of the /v1/scripts/{script_id} routes, and the script_id of a sequence option.

  • creator_idstringrequired

    Fansquare creator id (see GET /v1/creators).

  • collection_idstring | nullrequired

    Collection the script belongs to.

  • namestringrequired

    Name of the script, as chatters see it in the script panel of the conversation.

  • positionintegerrequired

    Order of the script in its collection (0 first).

  • context_notestring | nullrequired

    Note for the chatters: when and why to send this script. Never sent to the fan. null without one.

  • messagesarray of objectsrequired

    The messages a chatter sends, one after the other, when they pick the script: the first, then up to 4 more.

    • idstringrequired

      Id of this message. The first message has the id of the script itself.

    • contentstringrequired

      Text of the message, sent as written.

    • price_centsintegerrequired

      Price in euro cents to unlock the media of the message (0 = free).

    • media_idsarray of stringsrequired

      MYM media uuids attached to the message, in order.

    • is_voicebooleanrequired

      The message is a voice message: its only media is an audio of the vault.

    • unresolved_media_countintegerrequired

      Media of the message stored under a former MYM id the API cannot serve, left out of media_ids (almost always 0). Above 0, the messages of this script are edited in the app (script_media_unresolved).

  • created_atstringrequired

    When the script was created (ISO 8601).

    format date-time
  • updated_atstringrequired

    When the script was last changed (ISO 8601).

    format date-time
curl 'https://api.fansquare.so/v1/scripts/7668136a-d6ea-4b9d-a45d-f8b902de321f' \
  -H "Authorization: Bearer $API_KEY" \
  -H "Fansquare-Version: Amethyste"
{
  "id": "7668136a-d6ea-4b9d-a45d-f8b902de321f",
  "creator_id": "m81IhLxdhzDGYs54rNp2",
  "collection_id": "9b0b4f0e-3127-406b-a0f2-e7bf80e50779",
  "name": "Lena",
  "position": 1,
  "context_note": "string",
  "messages": [
    {
      "id": "a75011a9-0287-4cf3-ab3f-825aef61b191",
      "content": "string",
      "price_cents": 1500,
      "media_ids": [
        "b12eacb2-afea-4959-a0d0-b685e6b49279"
      ],
      "is_voice": true,
      "unresolved_media_count": 12
    }
  ],
  "created_at": "2026-10-12T21:14:00.000Z",
  "updated_at": "2026-10-12T21:14:00.000Z"
}