API Reference › Bots — Notecards & Scripts
Create Script
POST
/bots/{bot_id}/scriptsCreate an LSL script in the bot's inventory.
Usage
curl -X POST "https://api.lifebots.cloud/api/v1/bots/$BOT_ID/scripts" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Hello",
"text": "default { state_entry() { llSay(0, \"Hi\"); } }"
}'Path parameters
| Name | Type | Description |
|---|---|---|
bot_id | UUID | The bot's avatar UUID (agentId from GET /bots). |
Body (JSON)
| Name | Type | Required | Description |
|---|---|---|---|
name | string | yes | Script name. |
text | string | yes | LSL source. |
description | string | no | Item description. |
folderId | UUID | no | Folder to create it in. Omit for the Scripts folder. |
copy | boolean | no | Next owner can copy. Default true. |
modify | boolean | no | Next owner can modify. Default true. |
transfer | boolean | no | Next owner can transfer. Default true. |
Example response
{
"success": true,
"data": {
"result": "OK"
},
"meta": {
"timestamp": "2026-10-02T12:00:00.000Z",
"version": "1.0"
}
} Always check success; for commands the bot carries out, also check data.result. See Responses & errors.