# com.getorbyt.community.sendModmail

> 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.sendModmail)
- [Documentation](https://lexicon.garden/lexicon/did:plc:2xrqztnmzlckb3xfuuukupso/com.getorbyt.community.sendModmail/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:2xrqztnmzlckb3xfuuukupso/com.getorbyt.community.sendModmail/examples)

## Definitions

### `com.getorbyt.community.sendModmail`

**Type**: `procedure`

"Message the mods": opens the caller's private thread with the Community's mod team, or continues it. Each account has one thread per Community, and a message reopens it if the mod team archived it. Anyone signed in may write, including a muted or banned member; whoever holds manage-mail answers with replyModmail instead. Rate-limited per sender.

#### Input

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `community` | `string` (at-uri) | Yes |  |
| `text` | `string` | Yes |  |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `message` | `ref` → `com.getorbyt.community.defs#modmailMessageView` | Yes |  |
| `thread` | `ref` → `com.getorbyt.community.defs#modmailThreadView` | Yes |  |

#### Errors

- **AuthenticationRequired**
- **CommunityNotFound**
- **InvalidRequest**
- **InvalidAction**: The caller holds manage-mail, so they answer members rather than write to their own team.
- **RateLimitExceeded**

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "\"Message the mods\": opens the caller's private thread with the Community's mod team, or continues it. Each account has one thread per Community, and a message reopens it if the mod team archived it. Anyone signed in may write, including a muted or banned member; whoever holds manage-mail answers with replyModmail instead. Rate-limited per sender.",
      "errors": [
        {
          "name": "AuthenticationRequired"
        },
        {
          "name": "CommunityNotFound"
        },
        {
          "name": "InvalidRequest"
        },
        {
          "description": "The caller holds manage-mail, so they answer members rather than write to their own team.",
          "name": "InvalidAction"
        },
        {
          "name": "RateLimitExceeded"
        }
      ],
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "community": {
              "format": "at-uri",
              "type": "string"
            },
            "text": {
              "maxLength": 2000,
              "minLength": 1,
              "type": "string"
            }
          },
          "required": [
            "community",
            "text"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "message": {
              "ref": "com.getorbyt.community.defs#modmailMessageView",
              "type": "ref"
            },
            "thread": {
              "ref": "com.getorbyt.community.defs#modmailThreadView",
              "type": "ref"
            }
          },
          "required": [
            "thread",
            "message"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "id": "com.getorbyt.community.sendModmail",
  "lexicon": 1
}
```
