# com.getorbyt.community.getModmailThread

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

## Definitions

### `com.getorbyt.community.getModmailThread`

**Type**: `query`

One Modmail thread and its messages, newest first. Without member, the caller's own thread, which is absent until they first write. With another account's member, the caller needs manage-mail. Viewer-specific and never cached; reading does not mark the thread read (see updateModmailSeen).

#### Parameters

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `community` | `string` (at-uri) | Yes |  |
| `cursor` | `string` | No | Continues toward older messages. |
| `limit` | `integer` | No |  |
| `member` | `string` (did) | No | Whose thread. Absent means the caller's own. |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `cursor` | `string` | No |  |
| `messages` | `array` | Yes |  |
| `thread` | `ref` → `com.getorbyt.community.defs#modmailThreadView` | No |  |

#### Errors

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

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "One Modmail thread and its messages, newest first. Without member, the caller's own thread, which is absent until they first write. With another account's member, the caller needs manage-mail. Viewer-specific and never cached; reading does not mark the thread read (see updateModmailSeen).",
      "errors": [
        {
          "name": "AuthenticationRequired"
        },
        {
          "name": "CommunityNotFound"
        },
        {
          "name": "InsufficientRole"
        },
        {
          "name": "InvalidRequest"
        },
        {
          "name": "InvalidCursor"
        },
        {
          "name": "ThreadNotFound"
        }
      ],
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "cursor": {
              "type": "string"
            },
            "messages": {
              "items": {
                "ref": "com.getorbyt.community.defs#modmailMessageView",
                "type": "ref"
              },
              "maxLength": 50,
              "type": "array"
            },
            "thread": {
              "ref": "com.getorbyt.community.defs#modmailThreadView",
              "type": "ref"
            }
          },
          "required": [
            "messages"
          ],
          "type": "object"
        }
      },
      "parameters": {
        "properties": {
          "community": {
            "format": "at-uri",
            "type": "string"
          },
          "cursor": {
            "description": "Continues toward older messages.",
            "type": "string"
          },
          "limit": {
            "default": 25,
            "maximum": 50,
            "minimum": 1,
            "type": "integer"
          },
          "member": {
            "description": "Whose thread. Absent means the caller's own.",
            "format": "did",
            "type": "string"
          }
        },
        "required": [
          "community"
        ],
        "type": "params"
      },
      "type": "query"
    }
  },
  "id": "com.getorbyt.community.getModmailThread",
  "lexicon": 1
}
```
