# Create a queue

`POST /contact-centre/queues` · Rivier · inbox

Create a queue: skills needed, channels, first-response and resolution targets, and an optional AI agent that answers first.

- Scope: inbox:write
- Graphql: Mutation.inboxContactCentreQueueCreate
- Sdk: desk.queues.create
- Cli: desk queue-add

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 80
    },
    "skills": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 40
      },
      "maxItems": 30,
      "description": "Skills an agent needs to be given a conversation from this queue"
    },
    "channels": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "email",
          "sms",
          "whatsapp",
          "voice",
          "chat"
        ]
      },
      "minItems": 1,
      "maxItems": 5
    },
    "firstResponseSeconds": {
      "type": "integer",
      "minimum": 60,
      "maximum": 604800
    },
    "resolveSeconds": {
      "type": "integer",
      "minimum": 300,
      "maximum": 2592000
    },
    "aiAgentId": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid"
        },
        {
          "type": "null"
        }
      ],
      "description": "An AI agent that answers first"
    }
  },
  "required": [
    "name"
  ],
  "additionalProperties": false
}
```

## Responses

- `201`: Success
- `400`: The request was malformed
- `401`: No valid credential
- `403`: The credential lacks the scope, origin or address
- `429`: Over the key's rate limit; see Retry-After

## Example

```sh
curl -X POST 'https://api.rivier.ai/contact-centre/queues' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "string"
}'
```
