Scripts
Update a script
/v1/scripts/{script_id}Changes a script: name, note, order, collection (of the same creator), and its messages. messages replaces the whole series: send the id of each message you keep (from get_script) so its send history stays, omit it for a new one; a message left out is deleted. Sequences that point to the script follow the change.
write:scriptscurl -X PATCH 'https://api.fansquare.so/v1/scripts/7668136a-d6ea-4b9d-a45d-f8b902de321f' \
-H "Authorization: Bearer $API_KEY" \
-H "Fansquare-Version: Amethyste" \
-H "Content-Type: application/json" \
-d '{
"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
}
]
}'{
"id": "7668136a-d6ea-4b9d-a45d-f8b902de321f",
"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
}
],
"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.
Path
script_idstringrequiredFansquare script id (the
idfield of script items).format uuid
Body
application/json
collection_idstringMoves the script to another collection of the same creator.
format uuidnamestringNew name (1 to 30 characters).
min length 1max length 30positionintegerNew order in its collection (0 first).
min 0context_notestring | nullNew note for the chatters. null or an empty string removes it.
max length 1000messagesarray of objectsReplaces the messages of the script: they become exactly this list, in this order (1 to 5); a stored message left out is deleted. Omit to keep them.
min items 1max items 5idstringId of an existing message of this script (from get_script), changed in place: its send history is kept. The first message is always the script itself. Omit it for a new message.
format uuidcontentstringrequiredText of the message (1 to 500 characters).
min length 1max length 500price_centsintegerPrice in euro cents to unlock the media of the message: 0 (free) or 500 to 100000. A paid message needs at least one media. Omitted: unchanged on a kept message, 0 on a new one.
min 0max 100000media_idsarray of stringsMYM media uuids of the creator's vault, in order (20 max). Reuse the
media_idsread on the scripts of the same creator. Omitted: unchanged on a kept message, none on a new one.format uuidmax items 20is_voicebooleanA voice message:
media_idsholds exactly one audio of the vault, and nothing else. Omitted: unchanged on a kept message, false on a new one.
Response
OK, application/json
idstringrequiredFansquare script id. Path parameter of the /v1/scripts/{script_id} routes, and the
script_idof a sequence option.creator_idstringrequiredFansquare creator id (see GET /v1/creators).
collection_idstring | nullrequiredCollection the script belongs to.
namestringrequiredName of the script, as chatters see it in the script panel of the conversation.
positionintegerrequiredOrder of the script in its collection (0 first).
context_notestring | nullrequiredNote for the chatters: when and why to send this script. Never sent to the fan. null without one.
messagesarray of objectsrequiredThe messages a chatter sends, one after the other, when they pick the script: the first, then up to 4 more.
idstringrequiredId of this message. The first message has the id of the script itself.
contentstringrequiredText of the message, sent as written.
price_centsintegerrequiredPrice in euro cents to unlock the media of the message (0 = free).
media_idsarray of stringsrequiredMYM media uuids attached to the message, in order.
is_voicebooleanrequiredThe message is a voice message: its only media is an audio of the vault.
unresolved_media_countintegerrequiredMedia 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_atstringrequiredWhen the script was created (ISO 8601).
format date-timeupdated_atstringrequiredWhen the script was last changed (ISO 8601).
format date-time
curl -X PATCH 'https://api.fansquare.so/v1/scripts/7668136a-d6ea-4b9d-a45d-f8b902de321f' \
-H "Authorization: Bearer $API_KEY" \
-H "Fansquare-Version: Amethyste" \
-H "Content-Type: application/json" \
-d '{
"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
}
]
}'{
"id": "7668136a-d6ea-4b9d-a45d-f8b902de321f",
"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
}
],
"created_at": "2026-10-12T21:14:00.000Z",
"updated_at": "2026-10-12T21:14:00.000Z"
}