# tools.ozone.report.closeReports

> Published by [ozone-lexicons.bsky.social](https://lexicon.garden/identity/did:plc:33dt5kftu3jq2h5h4jjlqezt)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:33dt5kftu3jq2h5h4jjlqezt/tools.ozone.report.closeReports)
- [Documentation](https://lexicon.garden/lexicon/did:plc:33dt5kftu3jq2h5h4jjlqezt/tools.ozone.report.closeReports/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:33dt5kftu3jq2h5h4jjlqezt/tools.ozone.report.closeReports/examples)

## Definitions

### `tools.ozone.report.closeReports`

**Type**: `procedure`

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`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `internalNote` | `string` | No | Optional moderator-only note recorded on each close activity. Not visible to reporters. |
| `isAutomated` | `boolean` | No | Set true when this action is triggered by an automated process. Defaults to false. |
| `reportTypes` | `array` | No | 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. |
| `subject` | `string` (uri) | Yes | Subject DID (account-level reports) or AT-URI (record-level reports) whose reports should be closed. |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `closedCount` | `integer` | Yes | Number of reports that were transitioned to closed. |
| `reportIds` | `array` | Yes | IDs of the reports that were closed. |

## Raw 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
}
```
