# tools.ozone.report.assignModerator

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

## Definitions

### `tools.ozone.report.assignModerator`

**Type**: `procedure`

Assign a report to a user. Defaults to the caller. Admins may assign to any moderator.

#### Input

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `did` | `string` (did) | No | DID to be assigned. Defaults to the caller's DID. Admins may assign to any moderator. |
| `isPermanent` | `boolean` | No | When true, the assignment has no expiry (endAt is null). Throws AlreadyAssigned if another user already has a permanent assignment on this report. |
| `queueId` | `integer` | No | Optional queue ID to associate the assignment with. If not provided and the report has been assigned on a queue before, it will stay on that queue. |
| `reportId` | `integer` | Yes | The ID of the report to assign. |

#### Output

**Encoding**: `application/json`

#### Errors

- **AlreadyAssigned**: The report is already assigned to another user.
- **InvalidAssignment**: The report ID or queue ID is invalid.

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Assign a report to a user. Defaults to the caller. Admins may assign to any moderator.",
      "errors": [
        {
          "description": "The report is already assigned to another user.",
          "name": "AlreadyAssigned"
        },
        {
          "description": "The report ID or queue ID is invalid.",
          "name": "InvalidAssignment"
        }
      ],
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "did": {
              "description": "DID to be assigned. Defaults to the caller's DID. Admins may assign to any moderator.",
              "format": "did",
              "type": "string"
            },
            "isPermanent": {
              "description": "When true, the assignment has no expiry (endAt is null). Throws AlreadyAssigned if another user already has a permanent assignment on this report.",
              "type": "boolean"
            },
            "queueId": {
              "description": "Optional queue ID to associate the assignment with. If not provided and the report has been assigned on a queue before, it will stay on that queue.",
              "type": "integer"
            },
            "reportId": {
              "description": "The ID of the report to assign.",
              "type": "integer"
            }
          },
          "required": [
            "reportId"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "ref": "tools.ozone.report.defs#assignmentView",
          "type": "ref"
        }
      },
      "type": "procedure"
    }
  },
  "id": "tools.ozone.report.assignModerator",
  "lexicon": 1
}
```
