# com.getorbyt.community.createReport

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

## Definitions

### `com.getorbyt.community.createReport`

**Type**: `procedure`

Creates a private Community-moderator report for a linked post. Requires authenticated service authorization.

#### Input

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `community` | `string` (at-uri) | Yes |  |
| `details` | `string` | No | Anything the reporter wants moderators to know. |
| `post` | `string` (at-uri) | Yes |  |
| `reason` | `string` | Yes | Human-readable reason, shown by builds that do not read reasonType. |
| `reasonType` | `string` | No |  |
| `ruleIndex` | `integer` | No | With reasonType rule: the position of the broken rule in the Community's rules. |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `created` | `boolean` | Yes |  |
| `report` | `ref` → `com.getorbyt.community.defs#reportView` | Yes |  |

#### Errors

- **AuthenticationRequired**
- **CommunityNotFound**
- **PostNotFound**
- **RateLimitExceeded**
- **InvalidRequest**
- **RuleNotFound**

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Creates a private Community-moderator report for a linked post. Requires authenticated service authorization.",
      "errors": [
        {
          "name": "AuthenticationRequired"
        },
        {
          "name": "CommunityNotFound"
        },
        {
          "name": "PostNotFound"
        },
        {
          "name": "RateLimitExceeded"
        },
        {
          "name": "InvalidRequest"
        },
        {
          "name": "RuleNotFound"
        }
      ],
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "community": {
              "format": "at-uri",
              "type": "string"
            },
            "details": {
              "description": "Anything the reporter wants moderators to know.",
              "maxLength": 2000,
              "type": "string"
            },
            "post": {
              "format": "at-uri",
              "type": "string"
            },
            "reason": {
              "description": "Human-readable reason, shown by builds that do not read reasonType.",
              "maxLength": 2000,
              "minLength": 1,
              "type": "string"
            },
            "reasonType": {
              "knownValues": [
                "rule",
                "spam",
                "harassment",
                "unsafe",
                "other"
              ],
              "type": "string"
            },
            "ruleIndex": {
              "description": "With reasonType rule: the position of the broken rule in the Community's rules.",
              "minimum": 0,
              "type": "integer"
            }
          },
          "required": [
            "community",
            "post",
            "reason"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "created": {
              "type": "boolean"
            },
            "report": {
              "ref": "com.getorbyt.community.defs#reportView",
              "type": "ref"
            }
          },
          "required": [
            "report",
            "created"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "id": "com.getorbyt.community.createReport",
  "lexicon": 1
}
```
