# tools.ozone.report.closeReports

> Close all reports on a subject matching the given criteria. Reports whose current status does not permit a transition to closed are skipped silently. Intended for automated flows that resolve reports without taking action on the subject.

- Kind: procedure
- Authority: report.ozone.tools
- Lexicon: 1
- Published by [ozone-lexicons.bsky.social](https://lexicon.garden/identity/did:plc:33dt5kftu3jq2h5h4jjlqezt), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:33dt5kftu3jq2h5h4jjlqezt/tools.ozone.report.closeReports)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:33dt5kftu3jq2h5h4jjlqezt/tools.ozone.report.closeReports/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:33dt5kftu3jq2h5h4jjlqezt/tools.ozone.report.closeReports/analytics)

## Procedure (`tools.ozone.report.closeReports`)

Type: procedure · POST

### Input (application/json)

- `internalNote` (string): Optional moderator-only note recorded on each close activity. Not visible to reporters.
- `isAutomated` (boolean): Set true when this action is triggered by an automated process. Defaults to false.
  - Constraints: default: false
- `reportTypes` (array): If specified, only reports of the given report types (fully qualified reason NSIDs) are closed. When omitted, all non-closed reports on the subject are targeted.
  - `items` (string)
- `subject` (string · uri, required): Subject DID (account-level reports) or AT-URI (record-level reports) whose reports should be closed.

### Output (application/json)

- `closedCount` (integer, required): Number of reports that were transitioned to closed.
- `reportIds` (array, required): IDs of the reports that were closed.
  - `items` (integer)

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Close all reports on a subject matching the given criteria. Reports whose current status does not permit a transition to closed are skipped silently. Intended for automated flows that resolve reports without taking action on the subject.",
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "internalNote": {
              "description": "Optional moderator-only note recorded on each close activity. Not visible to reporters.",
              "type": "string"
            },
            "isAutomated": {
              "default": false,
              "description": "Set true when this action is triggered by an automated process. Defaults to false.",
              "type": "boolean"
            },
            "reportTypes": {
              "description": "If specified, only reports of the given report types (fully qualified reason NSIDs) are closed. When omitted, all non-closed reports on the subject are targeted.",
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "subject": {
              "description": "Subject DID (account-level reports) or AT-URI (record-level reports) whose reports should be closed.",
              "format": "uri",
              "type": "string"
            }
          },
          "required": [
            "subject"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "closedCount": {
              "description": "Number of reports that were transitioned to closed.",
              "type": "integer"
            },
            "reportIds": {
              "description": "IDs of the reports that were closed.",
              "items": {
                "type": "integer"
              },
              "type": "array"
            }
          },
          "required": [
            "closedCount",
            "reportIds"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "id": "tools.ozone.report.closeReports",
  "lexicon": 1
}
```
