Commands › Chat & messages
im
Send an instant message
Usage
curl -X POST "https://api.lifebots.cloud/api/bot.html" \
-H "Content-Type: application/json" \
-d '{
"action": "im",
"apikey": "YOUR_API_KEY",
"botname": "Joe Resident",
"secret": "bot-secret-123",
"slname": "Jane Resident",
"message": "Hello from the API!",
"dataType": "json"
}' Every request also needs apikey, botname and secret — see Authentication.
Parameters
| Name | Required | Description |
|---|---|---|
slnamestring | yes | Avatar UUID or name ("First Last", "first.last", or just "first" for Residents). Also accepted as: target |
messagestring | yes | Message text. |
nosafehubflag | no | Send 1 to refuse the command while the bot is in a Safe Hub region. |
Example response
{
"success": true,
"result": "OK",
"resulttext": "IM sent"
} With dataType=json. A failure has result: "FAIL" and the reason in resulttext — see Responses & errors.
Good to know
- A name is looked up first, which can take up to 10 seconds. Unknown names fail "Unable to locate SL Name". Use the UUID when you have it.
- OK means the message was sent, not that it was read.