# com.getorbyt.community.setAnnouncement

> Published by [getorbyt.com](https://lexicon.garden/identity/did:plc:2xrqztnmzlckb3xfuuukupso)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:2xrqztnmzlckb3xfuuukupso/com.getorbyt.community.setAnnouncement)
- [Documentation](https://lexicon.garden/lexicon/did:plc:2xrqztnmzlckb3xfuuukupso/com.getorbyt.community.setAnnouncement/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:2xrqztnmzlckb3xfuuukupso/com.getorbyt.community.setAnnouncement/examples)

## Definitions

### `com.getorbyt.community.setAnnouncement`

**Type**: `procedure`

Sets or clears the Community's announcement, shown on its page and, when set or changed, in its members' activity as `communityAnnouncement`. Requires manage-settings. The announcement is service state rather than part of the declaration record, so a moderator granted manage-settings can set it without writing the owner's repository. Setting and clearing are both recorded in the moderation log.

#### Input

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `community` | `string` (at-uri) | Yes |  |
| `text` | `string` | No | The announcement text. Absent or blank clears the announcement. |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `announcement` | `ref` → `com.getorbyt.community.defs#announcementView` | No | The announcement now. Absent once cleared. |
| `changed` | `boolean` | Yes |  |

#### Errors

- **AuthenticationRequired**
- **CommunityNotFound**
- **InsufficientRole**
- **InvalidRequest**

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Sets or clears the Community's announcement, shown on its page and, when set or changed, in its members' activity as `communityAnnouncement`. Requires manage-settings. The announcement is service state rather than part of the declaration record, so a moderator granted manage-settings can set it without writing the owner's repository. Setting and clearing are both recorded in the moderation log.",
      "errors": [
        {
          "name": "AuthenticationRequired"
        },
        {
          "name": "CommunityNotFound"
        },
        {
          "name": "InsufficientRole"
        },
        {
          "name": "InvalidRequest"
        }
      ],
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "community": {
              "format": "at-uri",
              "type": "string"
            },
            "text": {
              "description": "The announcement text. Absent or blank clears the announcement.",
              "maxGraphemes": 300,
              "maxLength": 3000,
              "type": "string"
            }
          },
          "required": [
            "community"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "announcement": {
              "description": "The announcement now. Absent once cleared.",
              "ref": "com.getorbyt.community.defs#announcementView",
              "type": "ref"
            },
            "changed": {
              "type": "boolean"
            }
          },
          "required": [
            "changed"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "id": "com.getorbyt.community.setAnnouncement",
  "lexicon": 1
}
```
