# app.tempomusic.moderation.createReport

> Published by [lexicons.tempomusic.fan](https://lexicon.garden/identity/did:plc:pxsuqmultto34oks44m2lgxm)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:pxsuqmultto34oks44m2lgxm/app.tempomusic.moderation.createReport)
- [Documentation](https://lexicon.garden/lexicon/did:plc:pxsuqmultto34oks44m2lgxm/app.tempomusic.moderation.createReport/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:pxsuqmultto34oks44m2lgxm/app.tempomusic.moderation.createReport/examples)

## Definitions

### `app.tempomusic.moderation.createReport`

**Type**: `procedure`

Submit a user-initiated report on a post, reply, or actor account. The reporter DID is read from the authenticated principal. Reports are dedupe-forever on (reporter, subject): a duplicate submission returns the existing report id with `deduped: true` and no new row is inserted. Per-reporter rate limit applies (5/hour, 50/day). Reports are server-side records only — they are NEVER published as PDS records, never broadcast on the firehose, and are only readable by moderators via the admin surface.

#### Input

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `details` | `string` | No | Free-text context. Required when reasonType is `other`; optional otherwise. |
| `subject` | `union` | Yes | The reported entity. Discriminated by $type. |
| `reasonType` | `ref` → `app.tempomusic.moderation.defs#reasonType` | Yes |  |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `deduped` | `boolean` | Yes | True when the call hit the (reporter, subject) dedupe constraint and no new row was inserted. |
| `reportId` | `integer` | Yes | Identifier of the report row. Same value returned for the original submission and any subsequent duplicate. |

#### Errors

- **RateLimited**: The reporter has exceeded the per-hour or per-day report limit. Try again later.
- **InvalidSubject**: The subject union carries a value outside the supported $type set, or is malformed (missing uri/cid/did).
- **DetailsRequired**: reasonType is `other` but `details` was empty. Free-text context is mandatory for the catch-all reason.

## Raw Schema

```json
{
  "id": "app.tempomusic.moderation.createReport",
  "defs": {
    "main": {
      "type": "procedure",
      "input": {
        "schema": {
          "type": "object",
          "required": [
            "subject",
            "reasonType"
          ],
          "properties": {
            "details": {
              "type": "string",
              "maxLength": 500,
              "description": "Free-text context. Required when reasonType is `other`; optional otherwise.",
              "maxGraphemes": 500
            },
            "subject": {
              "refs": [
                "app.tempomusic.moderation.defs#postSubject",
                "app.tempomusic.moderation.defs#replySubject",
                "app.tempomusic.moderation.defs#accountSubject"
              ],
              "type": "union",
              "description": "The reported entity. Discriminated by $type."
            },
            "reasonType": {
              "ref": "app.tempomusic.moderation.defs#reasonType",
              "type": "ref"
            }
          }
        },
        "encoding": "application/json"
      },
      "errors": [
        {
          "name": "RateLimited",
          "description": "The reporter has exceeded the per-hour or per-day report limit. Try again later."
        },
        {
          "name": "InvalidSubject",
          "description": "The subject union carries a value outside the supported $type set, or is malformed (missing uri/cid/did)."
        },
        {
          "name": "DetailsRequired",
          "description": "reasonType is `other` but `details` was empty. Free-text context is mandatory for the catch-all reason."
        }
      ],
      "output": {
        "schema": {
          "type": "object",
          "required": [
            "reportId",
            "deduped"
          ],
          "properties": {
            "deduped": {
              "type": "boolean",
              "description": "True when the call hit the (reporter, subject) dedupe constraint and no new row was inserted."
            },
            "reportId": {
              "type": "integer",
              "minimum": 1,
              "description": "Identifier of the report row. Same value returned for the original submission and any subsequent duplicate."
            }
          }
        },
        "encoding": "application/json"
      },
      "description": "Submit a user-initiated report on a post, reply, or actor account. The reporter DID is read from the authenticated principal. Reports are dedupe-forever on (reporter, subject): a duplicate submission returns the existing report id with `deduped: true` and no new row is inserted. Per-reporter rate limit applies (5/hour, 50/day). Reports are server-side records only — they are NEVER published as PDS records, never broadcast on the firehose, and are only readable by moderators via the admin surface."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
