# org.atgrp.mod.submitReport

> Report an account or record in a group, opening or reopening it in the moderation queue. The caller must be able to read the subject's space. Requires service auth.

- Kind: procedure
- Authority: mod.atgrp.org
- Lexicon: 1
- Published by [lex.atgrp.org](https://lexicon.garden/identity/did:plc:4pt2cnpyvfgn5b7uxwn2shwv), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:4pt2cnpyvfgn5b7uxwn2shwv/org.atgrp.mod.submitReport)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:4pt2cnpyvfgn5b7uxwn2shwv/org.atgrp.mod.submitReport/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:4pt2cnpyvfgn5b7uxwn2shwv/org.atgrp.mod.submitReport/analytics)

## Procedure (`org.atgrp.mod.submitReport`)

Type: procedure · POST

### Input (application/json)

- `cid` (string · cid): If set, a specific version of the record.
- `group` (string · did, required)
- `reason` (string)
  - Constraints: maxLength: 20000, maxGraphemes: 2000
- `reasonType` (ref, required): For reasonViolation, cite the broken rule in rule.
  - Reference: `org.atgrp.mod.defs#reasonType`
- `rule` (string · at-uri): The group rule the subject breaks.
- `subject` (string · uri, required): An account DID or record URI.

### Output (application/json)

- `createdAt` (string · datetime, required)
- `eventId` (string, required)
  - Constraints: minLength: 1, maxLength: 512

### Errors

- `GroupNotFound`: No description in schema.
- `InvalidSubject`: The subject isn't in this group.

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Report an account or record in a group, opening or reopening it in the moderation queue. The caller must be able to read the subject's space. Requires service auth.",
      "errors": [
        {
          "name": "GroupNotFound"
        },
        {
          "description": "The subject isn't in this group.",
          "name": "InvalidSubject"
        }
      ],
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "cid": {
              "description": "If set, a specific version of the record.",
              "format": "cid",
              "type": "string"
            },
            "group": {
              "format": "did",
              "type": "string"
            },
            "reason": {
              "maxGraphemes": 2000,
              "maxLength": 20000,
              "type": "string"
            },
            "reasonType": {
              "description": "For reasonViolation, cite the broken rule in rule.",
              "ref": "org.atgrp.mod.defs#reasonType",
              "type": "ref"
            },
            "rule": {
              "description": "The group rule the subject breaks.",
              "format": "at-uri",
              "type": "string"
            },
            "subject": {
              "description": "An account DID or record URI.",
              "format": "uri",
              "type": "string"
            }
          },
          "required": [
            "group",
            "subject",
            "reasonType"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "createdAt": {
              "format": "datetime",
              "type": "string"
            },
            "eventId": {
              "maxLength": 512,
              "minLength": 1,
              "type": "string"
            }
          },
          "required": [
            "eventId",
            "createdAt"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "id": "org.atgrp.mod.submitReport",
  "lexicon": 1
}
```
