# com.getorbyt.community.manageModmailThread

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

## Definitions

### `com.getorbyt.community.manageModmailThread`

**Type**: `procedure`

Archives a member's Modmail thread out of the open inbox, or brings it back. Requires manage-mail. A new message from the member reopens an archived thread on its own.

#### Input

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `action` | `string` | Yes |  |
| `community` | `string` (at-uri) | Yes |  |
| `member` | `string` (did) | Yes |  |

#### Output

**Encoding**: `application/json`

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

#### Errors

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

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Archives a member's Modmail thread out of the open inbox, or brings it back. Requires manage-mail. A new message from the member reopens an archived thread on its own.",
      "errors": [
        {
          "name": "AuthenticationRequired"
        },
        {
          "name": "CommunityNotFound"
        },
        {
          "name": "InsufficientRole"
        },
        {
          "name": "InvalidRequest"
        },
        {
          "name": "ThreadNotFound"
        }
      ],
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "action": {
              "knownValues": [
                "archive",
                "unarchive"
              ],
              "type": "string"
            },
            "community": {
              "format": "at-uri",
              "type": "string"
            },
            "member": {
              "format": "did",
              "type": "string"
            }
          },
          "required": [
            "community",
            "member",
            "action"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "changed": {
              "type": "boolean"
            },
            "thread": {
              "ref": "com.getorbyt.community.defs#modmailThreadView",
              "type": "ref"
            }
          },
          "required": [
            "thread",
            "changed"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "id": "com.getorbyt.community.manageModmailThread",
  "lexicon": 1
}
```
