Commands › Inventory
inventory_offer_accept
Accept or decline an item someone gave the bot
Usage
curl -X POST "https://api.lifebots.cloud/api/bot.html" \
-H "Content-Type: application/json" \
-d '{
"action": "inventory_offer_accept",
"apikey": "YOUR_API_KEY",
"botname": "Joe Resident",
"secret": "bot-secret-123",
"sender_uuid": "a2e76fcd-9360-4f6d-a924-000000000000",
"session": "e9a8b7c6-d5e4-4f3a-8b2c-1d0e9f8a7b6c",
"dataType": "json"
}' Every request also needs apikey, botname and secret — see Authentication.
Parameters
| Name | Required | Description |
|---|---|---|
sender_uuidUUID | yes | sender_uuid from the offer_inventory webhook event. Also accepted as: avatar_uuid, fromAgentId |
sessionUUID | yes | The event's session field. Also accepted as: session_id, sessionId |
acceptflag | no | 1 to accept; anything else declines. Default: 1 |
sender_typestring | no | agent or object — copy sender_type from the event. Default: agent |
folderUUID | no | Folder to put accepted items in. |
Example response
{
"success": true,
"result": "OK",
"resulttext": "Inventory accepted"
} With dataType=json. A failure has result: "FAIL" and the reason in resulttext — see Responses & errors.
Good to know
- Send accept as 1. true or a JSON true declines.
- sender_type must match the event, or the reply goes to the wrong place.