{
  "$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
}
