# tools.ozone.inbox.defs

> 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.inbox.defs)
- [Documentation](https://lexicon.garden/lexicon/did:plc:33dt5kftu3jq2h5h4jjlqezt/tools.ozone.inbox.defs/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:33dt5kftu3jq2h5h4jjlqezt/tools.ozone.inbox.defs/examples)

## Definitions

### `tools.ozone.inbox.defs#actionView`

**Type**: `object`

A single moderation action taken against a subject.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `createdAt` | `string` (datetime) | Yes |  |
| `expiresAt` | `string` (datetime) | No |  |
| `id` | `integer` | Yes | Action ID (moderation event ID). |
| `labels` | `array` | No | Label values, for labelApplied/labelRemoved. |
| `policies` | `array` | No | Policies applied by a takedown action. |
| `reversedAt` | `string` (datetime) | No |  |
| `scope` | `string` | No |  |
| `type` | `string` | Yes | Public action type. |

### `tools.ozone.inbox.defs#appealView`

**Type**: `object`

The state of the viewer's appeal against the actions on a subject.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `appealableUntil` | `string` (datetime) | No |  |
| `appealedAt` | `string` (datetime) | No |  |
| `resolvedAt` | `string` (datetime) | No | When the appeal's report was closed. |
| `state` | `string` | Yes |  |

### `tools.ozone.inbox.defs#enforcementView`

**Type**: `object`

The current enforcement state of a subject.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `expiresAt` | `string` (datetime) | No |  |
| `labels` | `array` | No | Active label values on the subject, excluding negated and expired labels. |
| `scope` | `string` | No |  |
| `state` | `string` | Yes |  |

### `tools.ozone.inbox.defs#notification`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `createdAt` | `string` (datetime) | Yes |  |
| `id` | `integer` | Yes |  |
| `isRead` | `boolean` | Yes |  |
| `reason` | `string` | Yes |  |
| `target` | `union` | Yes |  |

### `tools.ozone.inbox.defs#notificationPreferences`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `push` | `boolean` | Yes |  |

### `tools.ozone.inbox.defs#policyView`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `displayName` | `string` | Yes |  |
| `key` | `string` | Yes |  |
| `link` | `string` (uri) | Yes |  |

### `tools.ozone.inbox.defs#reportRef`

**Type**: `object`

Reference to a report by its report table ID, as used by getReport and Ozone's report detail page.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `reportId` | `integer` | Yes |  |
| `status` | `string` | No |  |
| `subject` | `union` | No |  |

### `tools.ozone.inbox.defs#reportsSummary`

**Type**: `object`

Aggregate view of reports filed against this subject. Deliberately carries no report IDs, no count, and no reporter identities.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `firstReportedOn` | `string` (datetime) | Yes | Day of the earliest report, truncated to midnight UTC. Render as a date; the time component is not meaningful. |
| `lastReportedOn` | `string` (datetime) | Yes | Day of the most recent report, truncated to midnight UTC. Render as a date; the time component is not meaningful. |
| `reasonTypes` | `array` | Yes | Distinct reason types reported, deduplicated and unordered. Excludes reasonAppeal. |

### `tools.ozone.inbox.defs#standingRef`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `previousStanding` | `string` | No |  |
| `standing` | `string` | Yes |  |

### `tools.ozone.inbox.defs#subjectRef`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `actionId` | `integer` | No |  |
| `actionType` | `string` | No |  |
| `subject` | `union` | Yes |  |

### `tools.ozone.inbox.defs#subjectView`

**Type**: `object`

A subject belonging to the viewer that has moderation actions against it.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `actionCount` | `integer` | No |  |
| `appeal` | `ref` → `#appealView` | No |  |
| `availableActions` | `array` | No |  |
| `createdAt` | `string` (datetime) | Yes |  |
| `enforcement` | `ref` → `#enforcementView` | Yes |  |
| `isRead` | `boolean` | Yes |  |
| `latestAction` | `ref` → `#actionView` | No |  |
| `src` | `string` (did) | Yes | DID of the moderation service that took the actions. |
| `subject` | `union` | Yes |  |
| `updatedAt` | `string` (datetime) | Yes |  |

### `tools.ozone.inbox.defs#subjectViewDetail`

**Type**: `object`

A subject with a page of its action history and an aggregate report summary. Follow cursor to retrieve older actions; enforcement and appeal describe the current subject state on every page.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `actions` | `array` | Yes | A page of action history, most recent first. Reversal timestamps include changes outside this page. |
| `appeal` | `ref` → `#appealView` | No |  |
| `availableActions` | `array` | No |  |
| `createdAt` | `string` (datetime) | Yes |  |
| `cursor` | `string` | No | Cursor for the next page of action history. Omitted when no older actions remain. |
| `enforcement` | `ref` → `#enforcementView` | Yes |  |
| `isRead` | `boolean` | Yes |  |
| `record` | `unknown` | No | Raw record JSON for the subject, when the subject is a record and the record is available. |
| `reports` | `ref` → `#reportsSummary` | No | Omitted when the subject has never been reported, e.g. proactive enforcement. |
| `src` | `string` (did) | Yes |  |
| `subject` | `union` | Yes |  |
| `updatedAt` | `string` (datetime) | Yes |  |

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "actionView": {
      "description": "A single moderation action taken against a subject.",
      "properties": {
        "createdAt": {
          "format": "datetime",
          "type": "string"
        },
        "expiresAt": {
          "format": "datetime",
          "type": "string"
        },
        "id": {
          "description": "Action ID (moderation event ID).",
          "type": "integer"
        },
        "labels": {
          "description": "Label values, for labelApplied/labelRemoved.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "policies": {
          "description": "Policies applied by a takedown action.",
          "items": {
            "ref": "#policyView",
            "type": "ref"
          },
          "type": "array"
        },
        "reversedAt": {
          "format": "datetime",
          "type": "string"
        },
        "scope": {
          "knownValues": [
            "network",
            "app",
            "labelOnly"
          ],
          "type": "string"
        },
        "type": {
          "description": "Public action type.",
          "type": "string"
        }
      },
      "required": [
        "id",
        "type",
        "createdAt"
      ],
      "type": "object"
    },
    "appealView": {
      "description": "The state of the viewer's appeal against the actions on a subject.",
      "properties": {
        "appealableUntil": {
          "format": "datetime",
          "type": "string"
        },
        "appealedAt": {
          "format": "datetime",
          "type": "string"
        },
        "resolvedAt": {
          "description": "When the appeal's report was closed.",
          "format": "datetime",
          "type": "string"
        },
        "state": {
          "knownValues": [
            "none",
            "pending",
            "resolved",
            "superseded",
            "expired"
          ],
          "type": "string"
        }
      },
      "required": [
        "state"
      ],
      "type": "object"
    },
    "enforcementView": {
      "description": "The current enforcement state of a subject.",
      "properties": {
        "expiresAt": {
          "format": "datetime",
          "type": "string"
        },
        "labels": {
          "description": "Active label values on the subject, excluding negated and expired labels.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "scope": {
          "knownValues": [
            "network",
            "app",
            "labelOnly"
          ],
          "type": "string"
        },
        "state": {
          "knownValues": [
            "none",
            "labeled",
            "removed",
            "suspended",
            "takendown"
          ],
          "type": "string"
        }
      },
      "required": [
        "state"
      ],
      "type": "object"
    },
    "notification": {
      "properties": {
        "createdAt": {
          "format": "datetime",
          "type": "string"
        },
        "id": {
          "type": "integer"
        },
        "isRead": {
          "type": "boolean"
        },
        "reason": {
          "knownValues": [
            "reportResolved",
            "reportReopened",
            "actionTaken",
            "actionReversed",
            "appealResolved",
            "standingChanged"
          ],
          "type": "string"
        },
        "target": {
          "refs": [
            "#reportRef",
            "#subjectRef",
            "#standingRef"
          ],
          "type": "union"
        }
      },
      "required": [
        "id",
        "reason",
        "target",
        "isRead",
        "createdAt"
      ],
      "type": "object"
    },
    "notificationPreferences": {
      "properties": {
        "push": {
          "type": "boolean"
        }
      },
      "required": [
        "push"
      ],
      "type": "object"
    },
    "policyView": {
      "properties": {
        "displayName": {
          "type": "string"
        },
        "key": {
          "type": "string"
        },
        "link": {
          "format": "uri",
          "type": "string"
        }
      },
      "required": [
        "key",
        "displayName",
        "link"
      ],
      "type": "object"
    },
    "reportRef": {
      "description": "Reference to a report by its report table ID, as used by getReport and Ozone's report detail page.",
      "properties": {
        "reportId": {
          "type": "integer"
        },
        "status": {
          "knownValues": [
            "pending",
            "resolved"
          ],
          "type": "string"
        },
        "subject": {
          "refs": [
            "com.atproto.admin.defs#repoRef",
            "com.atproto.repo.strongRef"
          ],
          "type": "union"
        }
      },
      "required": [
        "reportId"
      ],
      "type": "object"
    },
    "reportsSummary": {
      "description": "Aggregate view of reports filed against this subject. Deliberately carries no report IDs, no count, and no reporter identities.",
      "properties": {
        "firstReportedOn": {
          "description": "Day of the earliest report, truncated to midnight UTC. Render as a date; the time component is not meaningful.",
          "format": "datetime",
          "type": "string"
        },
        "lastReportedOn": {
          "description": "Day of the most recent report, truncated to midnight UTC. Render as a date; the time component is not meaningful.",
          "format": "datetime",
          "type": "string"
        },
        "reasonTypes": {
          "description": "Distinct reason types reported, deduplicated and unordered. Excludes reasonAppeal.",
          "items": {
            "type": "string"
          },
          "type": "array"
        }
      },
      "required": [
        "reasonTypes",
        "firstReportedOn",
        "lastReportedOn"
      ],
      "type": "object"
    },
    "standingRef": {
      "properties": {
        "previousStanding": {
          "knownValues": [
            "good",
            "warning",
            "atRisk"
          ],
          "type": "string"
        },
        "standing": {
          "knownValues": [
            "good",
            "warning",
            "atRisk"
          ],
          "type": "string"
        }
      },
      "required": [
        "standing"
      ],
      "type": "object"
    },
    "subjectRef": {
      "properties": {
        "actionId": {
          "type": "integer"
        },
        "actionType": {
          "type": "string"
        },
        "subject": {
          "refs": [
            "com.atproto.admin.defs#repoRef",
            "com.atproto.repo.strongRef"
          ],
          "type": "union"
        }
      },
      "required": [
        "subject"
      ],
      "type": "object"
    },
    "subjectView": {
      "description": "A subject belonging to the viewer that has moderation actions against it.",
      "properties": {
        "actionCount": {
          "type": "integer"
        },
        "appeal": {
          "ref": "#appealView",
          "type": "ref"
        },
        "availableActions": {
          "items": {
            "knownValues": [
              "appeal"
            ],
            "type": "string"
          },
          "type": "array"
        },
        "createdAt": {
          "format": "datetime",
          "type": "string"
        },
        "enforcement": {
          "ref": "#enforcementView",
          "type": "ref"
        },
        "isRead": {
          "type": "boolean"
        },
        "latestAction": {
          "ref": "#actionView",
          "type": "ref"
        },
        "src": {
          "description": "DID of the moderation service that took the actions.",
          "format": "did",
          "type": "string"
        },
        "subject": {
          "refs": [
            "com.atproto.admin.defs#repoRef",
            "com.atproto.repo.strongRef"
          ],
          "type": "union"
        },
        "updatedAt": {
          "format": "datetime",
          "type": "string"
        }
      },
      "required": [
        "src",
        "subject",
        "enforcement",
        "isRead",
        "createdAt",
        "updatedAt"
      ],
      "type": "object"
    },
    "subjectViewDetail": {
      "description": "A subject with a page of its action history and an aggregate report summary. Follow cursor to retrieve older actions; enforcement and appeal describe the current subject state on every page.",
      "properties": {
        "actions": {
          "description": "A page of action history, most recent first. Reversal timestamps include changes outside this page.",
          "items": {
            "ref": "#actionView",
            "type": "ref"
          },
          "maxLength": 100,
          "type": "array"
        },
        "appeal": {
          "ref": "#appealView",
          "type": "ref"
        },
        "availableActions": {
          "items": {
            "knownValues": [
              "appeal"
            ],
            "type": "string"
          },
          "type": "array"
        },
        "createdAt": {
          "format": "datetime",
          "type": "string"
        },
        "cursor": {
          "description": "Cursor for the next page of action history. Omitted when no older actions remain.",
          "type": "string"
        },
        "enforcement": {
          "ref": "#enforcementView",
          "type": "ref"
        },
        "isRead": {
          "type": "boolean"
        },
        "record": {
          "description": "Raw record JSON for the subject, when the subject is a record and the record is available.",
          "type": "unknown"
        },
        "reports": {
          "description": "Omitted when the subject has never been reported, e.g. proactive enforcement.",
          "ref": "#reportsSummary",
          "type": "ref"
        },
        "src": {
          "format": "did",
          "type": "string"
        },
        "subject": {
          "refs": [
            "com.atproto.admin.defs#repoRef",
            "com.atproto.repo.strongRef"
          ],
          "type": "union"
        },
        "updatedAt": {
          "format": "datetime",
          "type": "string"
        }
      },
      "required": [
        "src",
        "subject",
        "enforcement",
        "isRead",
        "actions",
        "createdAt",
        "updatedAt"
      ],
      "type": "object"
    }
  },
  "id": "tools.ozone.inbox.defs",
  "lexicon": 1
}
```
