Scripts
Create a script collection
/v1/script-collectionsCreates an empty collection for a creator, placed last. Add scripts to it with POST /v1/scripts.
write:scriptscurl -X POST 'https://api.fansquare.so/v1/script-collections' \
-H "Authorization: Bearer $API_KEY" \
-H "Fansquare-Version: Amethyste" \
-H "Content-Type: application/json" \
-d '{
"creator_id": "m81IhLxdhzDGYs54rNp2",
"name": "Lena",
"description": "string"
}'{
"id": "40a6e358-bd2a-4cff-a59e-5709874d3f5b",
"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-VersionstringrequiredAPI version to pin. Accepts the mineral name or the release date of a version.
Body
application/json
creator_idstringrequiredFansquare creator id (see GET /v1/creators).
min length 1namestringrequiredName of the collection (1 to 22 characters).
min length 1max length 22descriptionstringDescription of the collection (200 characters max).
max length 200
Response
Created, application/json
idstringrequiredFansquare script collection id. Path parameter of the /v1/script-collections/{collection_id} routes.
creator_idstringrequiredFansquare creator id (see GET /v1/creators).
namestringrequiredName of the collection, as shown in the Scripts page of the app.
descriptionstringrequiredDescription of the collection. Empty when there is none.
positionintegerrequiredOrder of the collection among those of its creator (0 first), as the app shows them.
script_countintegerrequiredNumber of scripts in the collection.
created_atstringrequiredWhen the collection was created (ISO 8601).
format date-timeupdated_atstringrequiredWhen the collection was last changed (ISO 8601).
format date-time
curl -X POST 'https://api.fansquare.so/v1/script-collections' \
-H "Authorization: Bearer $API_KEY" \
-H "Fansquare-Version: Amethyste" \
-H "Content-Type: application/json" \
-d '{
"creator_id": "m81IhLxdhzDGYs54rNp2",
"name": "Lena",
"description": "string"
}'{
"id": "40a6e358-bd2a-4cff-a59e-5709874d3f5b",
"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"
}