# tools.ozone.inbox.defs

- Kind: defs
- Authority: inbox.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.inbox.defs)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:33dt5kftu3jq2h5h4jjlqezt/tools.ozone.inbox.defs/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:33dt5kftu3jq2h5h4jjlqezt/tools.ozone.inbox.defs/analytics)

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

Type: object

A single moderation action taken against a subject.

### Properties

- `createdAt` (string · datetime, required)
- `expiresAt` (string · datetime)
- `id` (integer, required): Action ID (moderation event ID).
- `labels` (array): Label values, for labelApplied/labelRemoved.
  - `items` (string)
- `policies` (array): Policies applied by a takedown action.
  - `items` (ref)
    - Reference: `#policyView`
- `reversedAt` (string · datetime)
- `scope` (string)
  - Constraints: knownValues: network | app | labelOnly
- `type` (string, required): Public action type.

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

Type: object

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

### Properties

- `appealableUntil` (string · datetime)
- `appealedAt` (string · datetime)
- `outcome` (string): Decision on a resolved appeal.
  - Constraints: knownValues: approved | denied
- `resolvedAt` (string · datetime): When the appeal's report was closed.
- `state` (string, required)
  - Constraints: knownValues: none | pending | resolved | superseded | expired

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

Type: object

The current enforcement state of a subject.

### Properties

- `expiresAt` (string · datetime)
- `labels` (array): Active label values on the subject, excluding negated and expired labels.
  - `items` (string)
- `scope` (string)
  - Constraints: knownValues: network | app | labelOnly
- `state` (string, required)
  - Constraints: knownValues: none | labeled | removed | suspended | takendown

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

Type: object

### Properties

- `createdAt` (string · datetime, required)
- `id` (integer, required)
- `isRead` (boolean, required)
- `reason` (string, required)
  - Constraints: knownValues: reportResolved | reportReopened | actionTaken | actionReversed | appealResolved | standingChanged
- `target` (union, required)
  - One of: `#reportRef`, `#subjectRef`, `#standingRef`

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

Type: object

Push notification preferences by moderation notification category. These preferences do not hide in-app inbox activity. Each category defaults to enabled.

### Properties

- `account` (boolean, required): Notify about moderation actions against the account or its content, action reversals, appeal outcomes, and standing changes. Label application and removal are controlled by labels.
- `labels` (boolean, required): Notify when labels are applied to or removed from the account or its content (labelApplied and labelRemoved actions).
- `reports` (boolean, required): Notify about outcomes of reports filed by the account (reportResolved and reportReopened).

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

Type: object

### Properties

- `displayName` (string, required)
- `key` (string, required)
- `link` (string · uri, required)

## #reportRef (`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.

### Properties

- `reportId` (integer, required)
- `status` (string)
  - Constraints: knownValues: pending | resolved
- `subject` (union)
  - One of: `com.atproto.admin.defs#repoRef`, `com.atproto.repo.strongRef`

## #reportsSummary (`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.

### Properties

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

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

Type: object

### Properties

- `previousStanding` (string)
  - Constraints: knownValues: good | warning | atRisk
- `standing` (string, required)
  - Constraints: knownValues: good | warning | atRisk

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

Type: object

### Properties

- `actionId` (integer)
- `actionType` (string)
- `appealOutcome` (string): Decision captured when an appealResolved notification was created. Omitted when the outcome is unknown.
  - Constraints: knownValues: approved | denied
- `subject` (union, required)
  - One of: `com.atproto.admin.defs#repoRef`, `com.atproto.repo.strongRef`

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

Type: object

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

### Properties

- `actionCount` (integer)
- `appeal` (ref)
  - Reference: `#appealView`
- `availableActions` (array)
  - `items` (string)
    - Constraints: knownValues: appeal
- `createdAt` (string · datetime, required)
- `enforcement` (ref, required)
  - Reference: `#enforcementView`
- `isRead` (boolean, required)
- `latestAction` (ref)
  - Reference: `#actionView`
- `src` (string · did, required): DID of the moderation service that took the actions.
- `subject` (union, required)
  - One of: `com.atproto.admin.defs#repoRef`, `com.atproto.repo.strongRef`
- `updatedAt` (string · datetime, required)

## #subjectViewDetail (`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.

### Properties

- `actions` (array, required): A page of action history, most recent first. Reversal timestamps include changes outside this page.
  - Constraints: maxLength: 100
  - `items` (ref)
    - Reference: `#actionView`
- `appeal` (ref)
  - Reference: `#appealView`
- `availableActions` (array)
  - `items` (string)
    - Constraints: knownValues: appeal
- `createdAt` (string · datetime, required)
- `cursor` (string): Cursor for the next page of action history. Omitted when no older actions remain.
- `enforcement` (ref, required)
  - Reference: `#enforcementView`
- `isRead` (boolean, required)
- `record` (unknown): Raw record JSON for the subject, when the subject is a record and the record is available.
- `reports` (ref): Omitted when the subject has never been reported, e.g. proactive enforcement.
  - Reference: `#reportsSummary`
- `src` (string · did, required)
- `subject` (union, required)
  - One of: `com.atproto.admin.defs#repoRef`, `com.atproto.repo.strongRef`
- `updatedAt` (string · datetime, required)

## 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"
        },
        "outcome": {
          "description": "Decision on a resolved appeal.",
          "knownValues": [
            "approved",
            "denied"
          ],
          "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": {
      "description": "Push notification preferences by moderation notification category. These preferences do not hide in-app inbox activity. Each category defaults to enabled.",
      "properties": {
        "account": {
          "description": "Notify about moderation actions against the account or its content, action reversals, appeal outcomes, and standing changes. Label application and removal are controlled by labels.",
          "type": "boolean"
        },
        "labels": {
          "description": "Notify when labels are applied to or removed from the account or its content (labelApplied and labelRemoved actions).",
          "type": "boolean"
        },
        "reports": {
          "description": "Notify about outcomes of reports filed by the account (reportResolved and reportReopened).",
          "type": "boolean"
        }
      },
      "required": [
        "reports",
        "account",
        "labels"
      ],
      "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"
        },
        "appealOutcome": {
          "description": "Decision captured when an appealResolved notification was created. Omitted when the outcome is unknown.",
          "knownValues": [
            "approved",
            "denied"
          ],
          "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
}
```
