FansquareAPI reference
Open the app

Scripts

List scripts

GET/v1/scripts

Lists the scripts of the agency with their messages, oldest first. A script is a saved message, or a series of up to 5 messages, that chatters send to a fan in one pick. Filter by creator or collection; sort by position for the order of the app. Its id is what a sequence option points to.

Required scoperead:scripts
Rate limit30 requests per minute
curl 'https://api.fansquare.so/v1/scripts' \
  -H "Authorization: Bearer $API_KEY" \
  -H "Fansquare-Version: Amethyste"
{
  "data": [
    {
      "id": "40a6e358-bd2a-4cff-a59e-5709874d3f5b",
      "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"
    }
  ],
  "next_cursor": "KI7cfD0OLcWfeXZb1FTusJpz0nfKiYXPwHCZe-VXBaeQSX1w5BvO5UH-ua-dzNpXOTixzw"
}

Parameters

Headers

  • Fansquare-Versionstringrequired

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

Query

  • creator_idsstring

    Restrict to these creators (Fansquare ids from GET /v1/creators). Comma-separated, 50 max.

  • collection_idsstring

    Restrict to these collections (ids from GET /v1/script-collections). Comma-separated, 50 max.

  • cursorstring

    Opaque cursor from the previous page (next_cursor).

  • limitinteger

    Page size (1-100).

    Default 50min 1max 100

Response

OK, application/json

  • dataarray of objectsrequired
    • 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
  • next_cursorstring | nullrequired
curl 'https://api.fansquare.so/v1/scripts' \
  -H "Authorization: Bearer $API_KEY" \
  -H "Fansquare-Version: Amethyste"
{
  "data": [
    {
      "id": "40a6e358-bd2a-4cff-a59e-5709874d3f5b",
      "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"
    }
  ],
  "next_cursor": "KI7cfD0OLcWfeXZb1FTusJpz0nfKiYXPwHCZe-VXBaeQSX1w5BvO5UH-ua-dzNpXOTixzw"
}