FansquareAPI reference
Open the app

Automations

List automations

GET/v1/automations

Lists the automations of the agency (a message sequence sent when a MYM event happens: new subscriber, purchase, birthday...), the most recent first, with their lifetime totals. Archived ones are left out.

Required scoperead:automations
Rate limit30 requests per minute
curl 'https://api.fansquare.so/v1/automations' \
  -H "Authorization: Bearer $API_KEY" \
  -H "Fansquare-Version: Amethyste"
{
  "data": [
    {
      "id": "40a6e358-bd2a-4cff-a59e-5709874d3f5b",
      "creator_id": "m81IhLxdhzDGYs54rNp2",
      "name": "Lena",
      "status": "active",
      "trigger": {
        "type": "new_subscriber",
        "days_before": 1,
        "send_time_local": "string",
        "timezone": "Europe/Paris",
        "min_amount_cents": 4900,
        "online_window_start": "string",
        "online_window_end": "string"
      },
      "stats": {
        "triggered_count": 12,
        "fans_contacted": 1,
        "failed_count": 2,
        "revenue_cents": 4900,
        "purchases": 12,
        "replies": 12,
        "reads": 12,
        "last_triggered_at": "2026-10-12T21:14:00.000Z"
      },
      "created_at": "2026-10-12T21:14:00.000Z",
      "activated_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.

  • statusesstring

    Restrict to these statuses. Values: active, paused, draft, cancelled. Comma-separated, 50 max.

  • trigger_typesstring

    Restrict to these triggers. Values: new_subscriber, new_interested, resubscription, near_expiration, subscription_ended, media_purchase, new_tip, mod_purchase, fan_online, birthday. 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 automation id. Path parameter of the /v1/automations/{automation_id} routes.

    • creator_idstringrequired

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

    • namestringrequired

      Name shown in Fansquare.

    • statusstringrequired

      active (fires on its trigger), paused, draft (created in the app, never activated) or cancelled.

      Valuesactivepauseddraftcancelled
    • triggerobjectrequired

      The event that fires it, in the shape of the create body.

      • typestringrequired

        The event.

        Valuesnew_subscribernew_interestedresubscriptionnear_expirationsubscription_endedmedia_purchasenew_tipmod_purchasefan_onlinebirthday
      • days_beforeinteger

        near_expiration (required, 1 to 365) and birthday (0 = on the day, the default): how many days before.

        min 0max 365
      • send_time_localstring

        near_expiration and birthday (required): wall-clock time of the send, HH:mm, in timezone.

        pattern ^([01]\d|2[0-3]):[0-5]\d$
      • timezonestring

        IANA time zone of send_time_local and of the online window, e.g. Europe/Paris.

        min length 1max length 100
      • min_amount_centsinteger

        media_purchase, new_tip, mod_purchase: fire only from this amount, in euro cents.

        min 0max 100000000
      • online_window_startstring

        fan_online: start of the window, HH:mm in timezone (with online_window_end).

        pattern ^([01]\d|2[0-3]):[0-5]\d$
      • online_window_endstring

        fan_online: end of the window, HH:mm in timezone (with online_window_start).

        pattern ^([01]\d|2[0-3]):[0-5]\d$
    • statsobjectrequired

      Lifetime totals.

      • triggered_countintegerrequired

        Times it fired.

      • fans_contactedintegerrequired

        Fans its messages reached.

      • failed_countintegerrequired

        Messages that could not be delivered.

      • revenue_centsintegerrequired

        Gross revenue of the media it sent, bought within 30 days of each send, in euro cents.

      • purchasesintegerrequired

        Number of those purchases.

      • repliesintegerrequired

        Fans who replied after a message.

      • readsintegerrequired

        Fans who opened a message.

      • last_triggered_atstring | nullrequired

        Last time it fired, or null.

        format date-time
    • created_atstringrequired

      When it was created (ISO 8601).

      format date-time
    • activated_atstring | nullrequired

      Last activation: events older than this never fire it.

      format date-time
  • next_cursorstring | nullrequired
curl 'https://api.fansquare.so/v1/automations' \
  -H "Authorization: Bearer $API_KEY" \
  -H "Fansquare-Version: Amethyste"
{
  "data": [
    {
      "id": "40a6e358-bd2a-4cff-a59e-5709874d3f5b",
      "creator_id": "m81IhLxdhzDGYs54rNp2",
      "name": "Lena",
      "status": "active",
      "trigger": {
        "type": "new_subscriber",
        "days_before": 1,
        "send_time_local": "string",
        "timezone": "Europe/Paris",
        "min_amount_cents": 4900,
        "online_window_start": "string",
        "online_window_end": "string"
      },
      "stats": {
        "triggered_count": 12,
        "fans_contacted": 1,
        "failed_count": 2,
        "revenue_cents": 4900,
        "purchases": 12,
        "replies": 12,
        "reads": 12,
        "last_triggered_at": "2026-10-12T21:14:00.000Z"
      },
      "created_at": "2026-10-12T21:14:00.000Z",
      "activated_at": "2026-10-12T21:14:00.000Z"
    }
  ],
  "next_cursor": "KI7cfD0OLcWfeXZb1FTusJpz0nfKiYXPwHCZe-VXBaeQSX1w5BvO5UH-ua-dzNpXOTixzw"
}