# send_notice

Sends a notice to the group.


:::info
This API command applies only for **Standard bot**

:::

```snippet http-api-variables-OmJyUigTgO
```

## Input basic parameters:

| Variable | Required | Description |
|----------|----------|-------------|
| action   | yes      | = send_notice |
| apikey   | yes      | Your personal [developer's API key](/doc/2af017de-32f0-42cc-8031-755d8fcb8287) |
| botname  | yes      | Your bot's SL login. |
| secret   | yes      | [Bot API token](/doc/c2ff5da0-95cd-4393-8f14-0f153700cfd4) of your bot. |
| dataType | optional | Set to "json" to get JSON reply instead of URL-encoded string |
| custom   | optional | The custom data (string) to be passed back to caller script. This value will be returned back to the caller in HTTP response. |

## Input:

| Variable | Required | Description |
|----------|----------|-------------|
| groupuuid | yes      | the UUID of the group |
| subject  | yes      | the subject of the notice (can't contain international characters) |
| text     | yes      | the text of the notice (can contain international characters) |
| attachment | optional | inventory UUID of the attachment (see below) |
| autodelay | optional | set to "1" if you are sending multiple notices at once, and want bot to make automatic delays between them. See "Sending multiple notices" below. |

```snippet http-api-output-JAwUcmg7i7
```

# Comments

* This command does not return FAIL if your bot has no "Send Group Notice" ability. Pay attention to bot's group permissions while using this command.
* The notice delivery is guaranteed even if the bot is offline (the invitation will be sent after bot comes online).

## Sending multiple notices

If you are sending multiple notices (more than 3 within 3 seconds) SL may silently discard your notices as spam.

To avoid this, use the `autodelay=1` parameter. It tells bot to add automatic delays between the notices. The delay depends on bot's activity:

* 3 consequent notices within 5 seconds are allowed,
* then delay of 3 seconds before each notice is required.

# Example

```lsl
string sbApiKey="...";
string sbBotName="Fashion Firethorn";
string sbBotApiToken="bct_...";
 
key httpReq=NULL_KEY;
 
default {
    touch_start(integer total_number) {
        string params = llDumpList2String([
            "action="  + "send_notice",
            "apikey="  + llEscapeURL(sbApiKey),
            "botname=" + llEscapeURL(sbBotName),
            "secret="  + llEscapeURL(sbBotApiToken),
            "groupuuid="  + "877d11f0-72ad-649e-3ba2-96185b72d345",
            "subject=" + llEscapeURL("Notice subject"),
            "text=" + llEscapeURL("Notice text goes here")
            ],"&");
 
        httpReq=llHTTPRequest("https://api.mysmartbots.com/api/bot.html",
            [HTTP_METHOD,"POST"], params);
    }
}
```

# Attachments

The notice attachment can be taken from the bot's inventory. To make an attachment, proceed with the following steps:


1. Set copy+transfer permissions to the object (so bot can give it with notice)
2. Drop object to the bot in Second Life
3. Open SmartBots account, click "manage bot"![](https://nyc3.digitaloceanspaces.com/smartbots-docs/uploads/20adbcf8-a916-46eb-b77b-ad6944665550/20559015-3a0f-4d95-816c-2fa5e71f9f6f/image.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=DO801JV4MUMY3YAEJCWC%2F20261113%2Fnyc3%2Fs3%2Faws4_request&X-Amz-Date=20261113T140000Z&X-Amz-Expires=86400&X-Amz-Signature=8fb1ce1e8392c711cd18d82d9d46b30f3b9998456d4895f74c723be86f82d24c&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject " =300x178")
4. Open bot's inventory browser![](https://nyc3.digitaloceanspaces.com/smartbots-docs/uploads/20adbcf8-a916-46eb-b77b-ad6944665550/aee2e275-de4c-4e09-9fc7-85741c997338/image.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=DO801JV4MUMY3YAEJCWC%2F20261113%2Fnyc3%2Fs3%2Faws4_request&X-Amz-Date=20261113T140000Z&X-Amz-Expires=86400&X-Amz-Signature=42a347ff4dd1b852e31eee635672df9ca84f41db5ca91bc3dd732223f95d956f&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject " =257x150")
5. Copy the "inventory UUID" of the required inventory item.  
   ![](https://nyc3.digitaloceanspaces.com/smartbots-docs/uploads/20adbcf8-a916-46eb-b77b-ad6944665550/3e3ad668-6972-476d-a10d-c15ebaea57ca/image.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=DO801JV4MUMY3YAEJCWC%2F20261113%2Fnyc3%2Fs3%2Faws4_request&X-Amz-Date=20261113T140000Z&X-Amz-Expires=86400&X-Amz-Signature=107e39fbbcd21160c4fe68ff3b74c6093623eab8fbe783caca4681efa2e67470&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject " =1218x500")