FansquareAPI reference
Open the app

Rotations

Create a rotation

POST/v1/rotations

Creates a rotation: the creator publishes the media of the pool in turn, per_day a day within the window, each post removed or made private after presence_seconds. It starts at once unless starts_at is set, and a first post may go out in the request. A public post is seen by everyone on MYM: show the user the creator, every media, the caption, the hashtags, public or private and the rhythm, and wait for an explicit yes. If the call gets no response, list the rotations before retrying.

Required scopewrite:publications
Rate limit10 requests per minute
curl -X POST 'https://api.fansquare.so/v1/rotations' \
  -H "Authorization: Bearer $API_KEY" \
  -H "Fansquare-Version: Amethyste" \
  -H "Content-Type: application/json" \
  -d '{
  "creator_id": "m81IhLxdhzDGYs54rNp2",
  "type": "post",
  "items": [
    {
      "media_uuid": "b12eacb2-afea-4959-a0d0-b685e6b49279",
      "caption": "New set tonight",
      "hashtags": [
        "string"
      ]
    }
  ],
  "starts_at": "2026-10-12T21:14:00.000Z",
  "name": "Lena",
  "per_day": 1,
  "window_start": "string",
  "window_end": "string",
  "week_days": [
    "MO"
  ],
  "timezone": "Europe/Paris",
  "presence_seconds": 300,
  "post_auto_action": "delete",
  "then_delete_seconds": 300,
  "order": "random",
  "audiences": [
    "subscribers"
  ],
  "caption": "New set tonight",
  "is_public": true,
  "playlists": [
    "dc858a1c-bfca-4ab8-a445-cc2d76e1b784"
  ],
  "caption_mode": "fixed",
  "hashtag_mode": "none",
  "hashtags": [
    "string"
  ],
  "hashtag_set_id": "6cde5083-2767-4f94-a83d-766741432b2f",
  "stop_when_all_published": true
}'
{
  "id": "40a6e358-bd2a-4cff-a59e-5709874d3f5b",
  "creator_id": "m81IhLxdhzDGYs54rNp2",
  "name": "Lena",
  "type": "post",
  "status": "active",
  "paused_reason": "string",
  "per_day": 1,
  "window_start": "string",
  "window_end": "string",
  "week_days": [
    "MO"
  ],
  "timezone": "Europe/Paris",
  "presence_seconds": 300,
  "post_auto_action": "delete",
  "then_delete_seconds": 300,
  "order": "random",
  "audiences": [
    "subscribers"
  ],
  "is_public": true,
  "playlists": [
    "dc858a1c-bfca-4ab8-a445-cc2d76e1b784"
  ],
  "caption_mode": "fixed",
  "caption": "New set tonight",
  "hashtag_mode": "none",
  "hashtags": [
    "string"
  ],
  "hashtag_set_id": "6cde5083-2767-4f94-a83d-766741432b2f",
  "stop_when_all_published": true,
  "items": [
    {
      "media_uuid": "b12eacb2-afea-4959-a0d0-b685e6b49279",
      "caption": "New set tonight",
      "hashtags": [
        "string"
      ]
    }
  ],
  "created_at": "2026-10-12T21:14:00.000Z",
  "next_sends": [
    {
      "publication_id": "6136681c-548b-4fca-a86b-8f73b2926652",
      "scheduled_at": "2026-10-14T19:00:00.000Z",
      "occurrence_at": "2026-10-12T21:14:00.000Z",
      "media_uuid": "b12eacb2-afea-4959-a0d0-b685e6b49279",
      "caption": "New set tonight",
      "hashtags": [
        "string"
      ]
    }
  ]
}

Parameters

Headers

  • Fansquare-Versionstringrequired

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

Body

application/json

  • creator_idstringrequired

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

    min length 1
  • typestringrequired
    Valuespoststory
  • itemsarray of objectsrequired

    The pool: 1 to 100 media of the creator, no duplicate.

    min items 1max items 100
    • media_uuidstringrequired

      MYM media uuid of the creator's vault (as media_uuid of a publication or a rotation).

      format uuid
    • captionstring

      Caption of this media (caption_mode = per_item).

      max length 1500
    • hashtagsarray of strings

      Hashtags of this media (hashtag_mode = per_item). MYM hashtags, normalized as MYM keeps them: a leading # removed, lowercase, accents stripped, then 3 to 30 letters, digits or underscores; duplicates count once. A post carries 5 at most.

      max length 100max items 100
  • starts_atstring

    When it starts (ISO 8601). Absent: now, and a first post may go out at once if the window is open.

    format date-time
  • namestringrequired

    Name shown in Fansquare.

    min length 1max length 80
  • per_dayintegerrequired

    Posts a day (1 to 24). Public posts are capped by the MYM daily limit.

    min 1max 24
  • window_startstring

    Start of the daily window, HH:mm in timezone. Default 00:00.

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

    End of the daily window, HH:mm in timezone, 24:00 allowed. Default 24:00.

    pattern ^(([01]\d|2[0-3]):[0-5]\d|24:00)$
  • week_daysarray of strings

    Days it publishes on. Empty or absent: every day.

    ValuesMOTUWETHFRSASUmax items 7
  • timezonestringrequired

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

    min length 1max length 100
  • presence_secondsinteger

    How long each post stays public, in seconds (default 48 h). A story: 24 h at most (the default).

    > 0max 2592000
  • post_auto_actionstring

    After presence_seconds: delete the post (default) or make it private.

    Valuesdeletepass_private
  • then_delete_secondsinteger

    Public posts with post_auto_action = pass_private: delete it at last, in seconds since publishing, greater than presence_seconds.

    > 0max 2592000
  • orderstring

    Order the media go out in (default random).

    Valuesrandomsequential
  • audiencesarray of strings

    Story audiences (stories only, required for a story).

    Valuessubscribersinterestedex_subscriberseveryone
  • captionstring

    Caption of every post (caption_mode = fixed).

    max length 1500
  • is_publicboolean

    Post visibility (posts only). Default public.

  • playlistsarray of strings

    MYM playlist uuids each post is added to.

    format uuid
  • caption_modestring

    fixed (default): caption; per_item: the caption of each media.

    Valuesfixedper_item
  • hashtag_modestring

    Posts only. none (default), fixed (hashtags), per_item (the hashtags of each media) or set (5 drawn from hashtag_set_id).

    Valuesnonefixedper_itemset
  • hashtagsarray of strings

    Hashtags of every post (hashtag_mode = fixed). MYM hashtags, normalized as MYM keeps them: a leading # removed, lowercase, accents stripped, then 3 to 30 letters, digits or underscores; duplicates count once. A post carries 5 at most.

    max length 100max items 100
  • hashtag_set_idstring

    Hashtag set to draw from (hashtag_mode = set), of the whole agency or of this creator.

    format uuid
  • stop_when_all_publishedboolean

    Default true: stop when every media of the pool is already on the account, instead of posting one twice.

Response

Created, application/json

  • idstringrequired

    Fansquare rotation id. Path parameter of the /v1/rotations/{rotation_id} routes.

  • creator_idstringrequired

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

  • namestringrequired
  • typestringrequired

    A rotation of feed posts or of stories.

    Valuespoststory
  • statusstringrequired

    active publishes; paused publishes nothing (see paused_reason); completed published every media of its pool and stopped.

    Valuesactivepausedcompleted
  • paused_reasonstring | nullrequired

    Why it stopped by itself: empty_pool, consecutive_failures (3 sends failed in a row), no_media_available (every media is already on the account). null when paused by hand or active.

  • per_dayintegerrequired

    Posts a day.

  • window_startstringrequired

    Start of the daily window, HH:mm in timezone.

  • window_endstringrequired

    End of the daily window, HH:mm in timezone (24:00 = end of day).

  • week_daysarray of stringsrequired

    Days it publishes on. Empty: every day.

    ValuesMOTUWETHFRSASU
  • timezonestringrequired

    IANA time zone of the window and the days.

  • presence_secondsinteger | nullrequired

    How long each post stays public (or each story online), in seconds, before post_auto_action.

  • post_auto_actionstringrequired

    What happens to a post after presence_seconds.

    Valuesdeletepass_private
  • then_delete_secondsinteger | nullrequired

    Final deletion after the post was made private, in seconds since publishing. null: it stays private.

  • orderstringrequired

    Order the media go out in.

    Valuesrandomsequential
  • audiencesarray of stringsrequired

    Story audiences. Empty for posts.

    Valuessubscribersinterestedex_subscriberseveryone
  • is_publicboolean | nullrequired

    Post visibility. null for stories.

  • playlistsarray of stringsrequired

    MYM playlist uuids each post is added to.

  • caption_modestringrequired

    fixed: caption on every post; per_item: the caption of each media.

    Valuesfixedper_item
  • captionstring | nullrequired

    Caption of every post when caption_mode is fixed.

  • hashtag_modestringrequired

    Where the hashtags of each post come from: none, hashtags on every post, the hashtags of each media, or 5 drawn from the hashtag set hashtag_set_id (a different 5 from one post to the next).

    Valuesnonefixedper_itemset
  • hashtagsarray of stringsrequired

    Hashtags of every post when hashtag_mode is fixed.

  • hashtag_set_idstring | nullrequired

    Hashtag set drawn from when hashtag_mode is set (see GET /v1/hashtag-sets).

  • stop_when_all_publishedbooleanrequired

    true: the rotation stops when every media of the pool is already on the account, instead of posting one twice.

  • itemsarray of objectsrequired

    The pool, in order.

    • media_uuidstringrequired

      MYM media uuid of the creator.

    • captionstring | nullrequired

      Caption of this media, used when caption_mode is per_item.

    • hashtagsarray of stringsrequired

      Hashtags of this media, used when hashtag_mode is per_item.

  • created_atstringrequired
    format date-time
  • next_sendsarray of objectsrequired

    The next sends already planned (the next days, 10 at most), with the media, caption and hashtags each will carry. A change of the rotation re-plans them.

    • publication_idstringrequired

      The publication this send is (GET /v1/publications/{publication_id}).

    • scheduled_atstringrequired

      When it goes out.

      format date-time
    • occurrence_atstring | nullrequired

      The slot of the rotation it fills: pass it to skip_rotation_occurrence to skip this send.

      format date-time
    • media_uuidstring | nullrequired
    • captionstring | nullrequired
    • hashtagsarray of stringsrequired

      The hashtags this post will carry.

curl -X POST 'https://api.fansquare.so/v1/rotations' \
  -H "Authorization: Bearer $API_KEY" \
  -H "Fansquare-Version: Amethyste" \
  -H "Content-Type: application/json" \
  -d '{
  "creator_id": "m81IhLxdhzDGYs54rNp2",
  "type": "post",
  "items": [
    {
      "media_uuid": "b12eacb2-afea-4959-a0d0-b685e6b49279",
      "caption": "New set tonight",
      "hashtags": [
        "string"
      ]
    }
  ],
  "starts_at": "2026-10-12T21:14:00.000Z",
  "name": "Lena",
  "per_day": 1,
  "window_start": "string",
  "window_end": "string",
  "week_days": [
    "MO"
  ],
  "timezone": "Europe/Paris",
  "presence_seconds": 300,
  "post_auto_action": "delete",
  "then_delete_seconds": 300,
  "order": "random",
  "audiences": [
    "subscribers"
  ],
  "caption": "New set tonight",
  "is_public": true,
  "playlists": [
    "dc858a1c-bfca-4ab8-a445-cc2d76e1b784"
  ],
  "caption_mode": "fixed",
  "hashtag_mode": "none",
  "hashtags": [
    "string"
  ],
  "hashtag_set_id": "6cde5083-2767-4f94-a83d-766741432b2f",
  "stop_when_all_published": true
}'
{
  "id": "40a6e358-bd2a-4cff-a59e-5709874d3f5b",
  "creator_id": "m81IhLxdhzDGYs54rNp2",
  "name": "Lena",
  "type": "post",
  "status": "active",
  "paused_reason": "string",
  "per_day": 1,
  "window_start": "string",
  "window_end": "string",
  "week_days": [
    "MO"
  ],
  "timezone": "Europe/Paris",
  "presence_seconds": 300,
  "post_auto_action": "delete",
  "then_delete_seconds": 300,
  "order": "random",
  "audiences": [
    "subscribers"
  ],
  "is_public": true,
  "playlists": [
    "dc858a1c-bfca-4ab8-a445-cc2d76e1b784"
  ],
  "caption_mode": "fixed",
  "caption": "New set tonight",
  "hashtag_mode": "none",
  "hashtags": [
    "string"
  ],
  "hashtag_set_id": "6cde5083-2767-4f94-a83d-766741432b2f",
  "stop_when_all_published": true,
  "items": [
    {
      "media_uuid": "b12eacb2-afea-4959-a0d0-b685e6b49279",
      "caption": "New set tonight",
      "hashtags": [
        "string"
      ]
    }
  ],
  "created_at": "2026-10-12T21:14:00.000Z",
  "next_sends": [
    {
      "publication_id": "6136681c-548b-4fca-a86b-8f73b2926652",
      "scheduled_at": "2026-10-14T19:00:00.000Z",
      "occurrence_at": "2026-10-12T21:14:00.000Z",
      "media_uuid": "b12eacb2-afea-4959-a0d0-b685e6b49279",
      "caption": "New set tonight",
      "hashtags": [
        "string"
      ]
    }
  ]
}