FansquareAPI reference
Open the app

Scripts

Update a script collection

PATCH/v1/script-collections/{collection_id}

Renames a collection, changes its description or its order. Only the fields sent change.

Required scopewrite:scripts
Rate limit30 requests per minute
curl -X PATCH 'https://api.fansquare.so/v1/script-collections/9b0b4f0e-3127-406b-a0f2-e7bf80e50779' \
  -H "Authorization: Bearer $API_KEY" \
  -H "Fansquare-Version: Amethyste" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Lena",
  "description": "string",
  "position": 1
}'
{
  "id": "9b0b4f0e-3127-406b-a0f2-e7bf80e50779",
  "creator_id": "m81IhLxdhzDGYs54rNp2",
  "name": "Lena",
  "description": "string",
  "position": 1,
  "script_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

  • collection_idstringrequired

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

    format uuid

Body

application/json

  • namestring

    New name (1 to 22 characters).

    min length 1max length 22
  • descriptionstring

    New description. An empty string removes it.

    max length 200
  • positioninteger

    New order among the collections of the creator (0 first).

    min 0

Response

OK, application/json

  • idstringrequired

    Fansquare script collection id. Path parameter of the /v1/script-collections/{collection_id} routes.

  • creator_idstringrequired

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

  • namestringrequired

    Name of the collection, as shown in the Scripts page of the app.

  • descriptionstringrequired

    Description of the collection. Empty when there is none.

  • positionintegerrequired

    Order of the collection among those of its creator (0 first), as the app shows them.

  • script_countintegerrequired

    Number of scripts in the collection.

  • created_atstringrequired

    When the collection was created (ISO 8601).

    format date-time
  • updated_atstringrequired

    When the collection was last changed (ISO 8601).

    format date-time
curl -X PATCH 'https://api.fansquare.so/v1/script-collections/9b0b4f0e-3127-406b-a0f2-e7bf80e50779' \
  -H "Authorization: Bearer $API_KEY" \
  -H "Fansquare-Version: Amethyste" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Lena",
  "description": "string",
  "position": 1
}'
{
  "id": "9b0b4f0e-3127-406b-a0f2-e7bf80e50779",
  "creator_id": "m81IhLxdhzDGYs54rNp2",
  "name": "Lena",
  "description": "string",
  "position": 1,
  "script_count": 12,
  "created_at": "2026-10-12T21:14:00.000Z",
  "updated_at": "2026-10-12T21:14:00.000Z"
}