# com.getorbyt.community.resolveReportedPost

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

## Definitions

### `com.getorbyt.community.resolveReportedPost`

**Type**: `procedure`

Resolves every open report about one post at once: remove the post, or dismiss the reports and keep it. Requires manage-reports, and manage-posts to remove.

#### Input

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `action` | `string` | Yes |  |
| `community` | `string` (at-uri) | Yes |  |
| `note` | `string` | No | For remove: the reason shown to the author. For dismiss: a note for the moderation log. |
| `post` | `string` (at-uri) | Yes |  |
| `ruleIndex` | `integer` | No | For remove: the Community rule the post broke, by position. Shown to the author. |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `post` | `ref` → `com.getorbyt.community.defs#reportedPostView` | No |  |
| `resolved` | `integer` | Yes | How many open reports this resolved. |

#### Errors

- **AuthenticationRequired**
- **CommunityNotFound**
- **InsufficientRole**
- **PostNotFound**
- **RuleNotFound**
- **InvalidState**

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Resolves every open report about one post at once: remove the post, or dismiss the reports and keep it. Requires manage-reports, and manage-posts to remove.",
      "errors": [
        {
          "name": "AuthenticationRequired"
        },
        {
          "name": "CommunityNotFound"
        },
        {
          "name": "InsufficientRole"
        },
        {
          "name": "PostNotFound"
        },
        {
          "name": "RuleNotFound"
        },
        {
          "name": "InvalidState"
        }
      ],
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "action": {
              "knownValues": [
                "remove",
                "dismiss"
              ],
              "type": "string"
            },
            "community": {
              "format": "at-uri",
              "type": "string"
            },
            "note": {
              "description": "For remove: the reason shown to the author. For dismiss: a note for the moderation log.",
              "maxLength": 1000,
              "type": "string"
            },
            "post": {
              "format": "at-uri",
              "type": "string"
            },
            "ruleIndex": {
              "description": "For remove: the Community rule the post broke, by position. Shown to the author.",
              "minimum": 0,
              "type": "integer"
            }
          },
          "required": [
            "community",
            "post",
            "action"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "post": {
              "ref": "com.getorbyt.community.defs#reportedPostView",
              "type": "ref"
            },
            "resolved": {
              "description": "How many open reports this resolved.",
              "minimum": 0,
              "type": "integer"
            }
          },
          "required": [
            "resolved"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "id": "com.getorbyt.community.resolveReportedPost",
  "lexicon": 1
}
```
