# send_notice

Sends a notice to the group.


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

:::

# Variables

The following table shows input values (you send them with the API call) and returned output values.

## Input basic parameters:

| Variable | Required | Description |
|----------|----------|-------------|
| action   | yes      | = send_notice |
| apikey   | yes      | Your personal [developer's API key](/doc/developers-api-key-tw8bQj4LSJ) |
| botname  | yes      | Your bot's SL login. |
| secret   | yes      | [Bot access code](https://www.mysmartbots.com/docs/Bot_access_code) 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. |

## Output:

*(to be received in http_response LSL event, see* [*docs*](/doc/doing-http-api-calls-c6FSEMF7bP) *for details)*

| Variable | Description |
|----------|-------------|
| result   | OK - command completed successfully<br>FAIL - command failed |
| resulttext | Detailed reason for the failure. |
| custom   | The value from input "custom" parameter. See above. |

# 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 sbBotAccessCode="nskndKgfa-243js";
 
key httpReq=NULL_KEY;
 
default {
    touch_start(integer total_number) {
        string params = llDumpList2String([
            "action="  + "send_notice",
            "apikey="  + llEscapeURL(sbApiKey),
            "botname=" + llEscapeURL(sbBotName),
            "secret="  + llEscapeURL(sbBotAccessCode),
            "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://outline-production-attachments.s3-accelerate.amazonaws.com/uploads/fe746996-bd68-4ba8-a15e-e239ddd741be/797838f6-8d86-469d-aa06-ae4c73cee06b/image.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIA4EOUDTOVUICLPZ4P%2F20260919%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20260919T064500Z&X-Amz-Expires=86400&X-Amz-Signature=8c781360d0fa2112800f89e15bca4a3fd40e89a825804b20b76ff3fc4d8c5148&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject " =300x178")
4. Open bot's inventory browser![](https://outline-production-attachments.s3-accelerate.amazonaws.com/uploads/fe746996-bd68-4ba8-a15e-e239ddd741be/7686698a-ff0d-4a6a-8509-7a451b14ad4c/image.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIA4EOUDTOVUICLPZ4P%2F20260919%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20260919T064500Z&X-Amz-Expires=86400&X-Amz-Signature=96eaaa113132661d50b5383216bf8cbb2e1ab7f0e634dd730ad6d2f178f4c8c9&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject " =257x150")
5. Copy the "inventory UUID" of the required inventory item.  
   ![](https://outline-production-attachments.s3-accelerate.amazonaws.com/uploads/fe746996-bd68-4ba8-a15e-e239ddd741be/d9e10205-fff8-4d75-9763-63fba4d01ba2/image.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIA4EOUDTOVUICLPZ4P%2F20260919%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20260919T064500Z&X-Amz-Expires=86400&X-Amz-Signature=4d54c5dc7bd5b14fc96b347d6531570877aa0d5b13a2b9bf44507a413dbb7439&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject " =1218x500")