# tools.ozone.queue.createQueue

> Create a new moderation queue. A queue can have optional matching criteria that ozone's queue router will use to match reports. A queue with no criteria must have reports assigned to it manually via (1) `modTool.meta.queueId` in `tools.ozone.moderation.emitEvent` or (2) `tools.ozone.report.reassignQueue`.

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

## Procedure (`tools.ozone.queue.createQueue`)

Type: procedure · POST

### Input (application/json)

- `collection` (string · nsid): Collection name for record subjects. Required if subjectTypes includes 'record'.
- `description` (string): Optional description of the queue
- `name` (string, required): Display name for the queue (must be unique)
- `recommendedLabels` (array): Labels to recommend for this queue and use as fallback appeal routing mappings
  - `items` (string)
- `recommendedPolicies` (array): Policy keys to recommend when actioning reports in this queue
  - `items` (string)
- `reportTypes` (array): Report reason types (fully qualified NSIDs)
  - Constraints: maxLength: 25
  - `items` (string)
- `subjectTypes` (array): Subject types this queue accepts
  - `items` (string)
    - Constraints: knownValues: account | record | message | conversation

### Output (application/json)

- `queue` (ref, required)
  - Reference: `tools.ozone.queue.defs#queueView`

### Errors

- `InvalidRecommendedPolicies`: One or more recommended policy keys do not exist in the configured policy list
- `ConflictingQueue`: The queue configuration conflicts with an existing queue

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Create a new moderation queue. A queue can have optional matching criteria that ozone's queue router will use to match reports. A queue with no criteria must have reports assigned to it manually via (1) `modTool.meta.queueId` in `tools.ozone.moderation.emitEvent` or (2) `tools.ozone.report.reassignQueue`.",
      "errors": [
        {
          "description": "One or more recommended policy keys do not exist in the configured policy list",
          "name": "InvalidRecommendedPolicies"
        },
        {
          "description": "The queue configuration conflicts with an existing queue",
          "name": "ConflictingQueue"
        }
      ],
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "collection": {
              "description": "Collection name for record subjects. Required if subjectTypes includes 'record'.",
              "format": "nsid",
              "type": "string"
            },
            "description": {
              "description": "Optional description of the queue",
              "type": "string"
            },
            "name": {
              "description": "Display name for the queue (must be unique)",
              "type": "string"
            },
            "recommendedLabels": {
              "description": "Labels to recommend for this queue and use as fallback appeal routing mappings",
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "recommendedPolicies": {
              "description": "Policy keys to recommend when actioning reports in this queue",
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "reportTypes": {
              "description": "Report reason types (fully qualified NSIDs)",
              "items": {
                "type": "string"
              },
              "maxLength": 25,
              "type": "array"
            },
            "subjectTypes": {
              "description": "Subject types this queue accepts",
              "items": {
                "knownValues": [
                  "account",
                  "record",
                  "message",
                  "conversation"
                ],
                "type": "string"
              },
              "type": "array"
            }
          },
          "required": [
            "name"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "queue": {
              "ref": "tools.ozone.queue.defs#queueView",
              "type": "ref"
            }
          },
          "required": [
            "queue"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "id": "tools.ozone.queue.createQueue",
  "lexicon": 1
}
```
