# com.getorbyt.community.moderatePost

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

## Definitions

### `com.getorbyt.community.moderatePost`

**Type**: `procedure`

A moderator action on one post's Community-level state. Removal is scoped to the Community; only actions that change state are journaled.

#### Input

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `post` | `string` (at-uri) | Yes | The linked app.bsky.feed.post URI. |
| `action` | `string` | Yes |  |
| `reason` | `string` | No | Required for removal, shown to the author, and recorded in the moderation log. |
| `community` | `string` (at-uri) | Yes |  |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `pinned` | `boolean` | Yes |  |
| `status` | `string` | Yes |  |
| `changed` | `boolean` | Yes |  |
| `removedAt` | `string` (datetime) | No |  |
| `removedReason` | `string` | No |  |

#### Errors

- **CommunityNotFound**
- **InsufficientRole**
- **PostNotFound**
- **InvalidAction**

## Raw Schema

```json
{
  "id": "com.getorbyt.community.moderatePost",
  "defs": {
    "main": {
      "type": "procedure",
      "input": {
        "schema": {
          "type": "object",
          "required": [
            "community",
            "post",
            "action"
          ],
          "properties": {
            "post": {
              "type": "string",
              "format": "at-uri",
              "description": "The linked app.bsky.feed.post URI."
            },
            "action": {
              "type": "string",
              "knownValues": [
                "remove",
                "restore",
                "pin",
                "unpin"
              ]
            },
            "reason": {
              "type": "string",
              "maxLength": 1000,
              "description": "Required for removal, shown to the author, and recorded in the moderation log."
            },
            "community": {
              "type": "string",
              "format": "at-uri"
            }
          }
        },
        "encoding": "application/json"
      },
      "errors": [
        {
          "name": "CommunityNotFound"
        },
        {
          "name": "InsufficientRole"
        },
        {
          "name": "PostNotFound"
        },
        {
          "name": "InvalidAction"
        }
      ],
      "output": {
        "schema": {
          "type": "object",
          "required": [
            "status",
            "pinned",
            "changed"
          ],
          "properties": {
            "pinned": {
              "type": "boolean"
            },
            "status": {
              "type": "string",
              "knownValues": [
                "visible",
                "removed"
              ]
            },
            "changed": {
              "type": "boolean"
            },
            "removedAt": {
              "type": "string",
              "format": "datetime"
            },
            "removedReason": {
              "type": "string"
            }
          }
        },
        "encoding": "application/json"
      },
      "description": "A moderator action on one post's Community-level state. Removal is scoped to the Community; only actions that change state are journaled."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
