Scripts
Create a script
/v1/scriptsCreates a script in a collection, placed last, with 1 to 5 messages. Chatters see it right away in the script panel of the conversation. Media are MYM media uuids of the creator: reuse those read on her scripts.
write:scriptscurl -X POST 'https://api.fansquare.so/v1/scripts' \
-H "Authorization: Bearer $API_KEY" \
-H "Fansquare-Version: Amethyste" \
-H "Content-Type: application/json" \
-d '{
"collection_id": "9b0b4f0e-3127-406b-a0f2-e7bf80e50779",
"name": "Lena",
"context_note": "string",
"messages": [
{
"content": "string",
"price_cents": 0,
"media_ids": [
"b12eacb2-afea-4959-a0d0-b685e6b49279"
],
"is_voice": false
}
]
}'{
"id": "40a6e358-bd2a-4cff-a59e-5709874d3f5b",
"creator_id": "m81IhLxdhzDGYs54rNp2",
"collection_id": "9b0b4f0e-3127-406b-a0f2-e7bf80e50779",
"name": "Lena",
"position": 1,
"context_note": "string",
"messages": [
{
"content": "string",
"price_cents": 0,
"media_ids": [
"b12eacb2-afea-4959-a0d0-b685e6b49279"
],
"is_voice": false
}
],
"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
collection_idstringrequiredCollection the script goes in (see list_script_collections). It decides the creator.
format uuidnamestringrequiredName of the script, shown to chatters (1 to 30 characters).
min length 1max length 30context_notestring | nullNote for the chatters: when and why to send it (1000 characters max).
max length 1000messagesarray of objectsrequiredThe messages of the script, in sending order: 1 to 5.
min items 1max items 5contentstringrequiredText 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. Defaults to 0.
Default0min 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.Default[]format uuidmax items 20is_voicebooleanA voice message:
media_idsholds exactly one audio of the vault, and nothing else.Defaultfalse
Response
Created, 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 POST 'https://api.fansquare.so/v1/scripts' \
-H "Authorization: Bearer $API_KEY" \
-H "Fansquare-Version: Amethyste" \
-H "Content-Type: application/json" \
-d '{
"collection_id": "9b0b4f0e-3127-406b-a0f2-e7bf80e50779",
"name": "Lena",
"context_note": "string",
"messages": [
{
"content": "string",
"price_cents": 0,
"media_ids": [
"b12eacb2-afea-4959-a0d0-b685e6b49279"
],
"is_voice": false
}
]
}'{
"id": "40a6e358-bd2a-4cff-a59e-5709874d3f5b",
"creator_id": "m81IhLxdhzDGYs54rNp2",
"collection_id": "9b0b4f0e-3127-406b-a0f2-e7bf80e50779",
"name": "Lena",
"position": 1,
"context_note": "string",
"messages": [
{
"content": "string",
"price_cents": 0,
"media_ids": [
"b12eacb2-afea-4959-a0d0-b685e6b49279"
],
"is_voice": false
}
],
"created_at": "2026-10-12T21:14:00.000Z",
"updated_at": "2026-10-12T21:14:00.000Z"
}