# Update ticket inbox

> PATCH https://api.nabrah.ai/api/ext/omni_v2/ticket/inboxes

Group: Tickets. Page: https://www.nabrah.ai/en/docs/api-reference/tickets/update-ticket-inbox

Updates the ticket inbox configuration for the project tied to your API key and returns the resulting inbox object. Send the new settings inside the `config` object; fields control auto-assignment, the catalog of allowed ticket types, whether every inbound conversation always opens a ticket, the pool of agents eligible for assignment, and whether a contact is locked to a single open ticket.

## Config fields

- **config**: `auto_assign` toggles automatic assignment of new tickets. `ticket_types` is the list of allowed categories (these are the valid values for a ticket's `ticket_type`). `alway_create_ticket` (note the spelling) forces a ticket for every inbound conversation. `assign_list` is the pool of user ids eligible for auto-assignment. `lock_to_single_open_ticket` prevents a contact from having more than one open ticket at a time. Fields: `auto_assign`, `ticket_types`, `alway_create_ticket`, `assign_list`, `lock_to_single_open_ticket`.

Returns a GetInboxResponse — the updated inbox object (id, inbox_type, inbox_id, project_id, name, config, created_at).

## Authorization

- `X-API-Key` (string, header, required): your workspace API key.

## Body (application/json)

### Example: Update config

Update the inbox ticketing configuration.

```json
{
  "config": {
    "auto_assign": true,
    "ticket_types": [
      "support",
      "billing",
      "sales"
    ],
    "alway_create_ticket": false,
    "assign_list": [
      "user_7c19a2",
      "user_3ab8f1"
    ],
    "lock_to_single_open_ticket": true
  }
}
```

## Response

### 200 Successful Response

Content type: `application/json`

```json
{
  "id": 0,
  "inbox_type": "whatsapp",
  "inbox_id": 0,
  "project_id": "00000000-0000-4000-8000-000000000000",
  "name": "string",
  "config": {},
  "created_at": "2026-01-15T12:00:00.000Z"
}
```

### 422 Validation Error

Content type: `application/json`

```json
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}
```

## Request examples

### cURL

```bash
curl --request PATCH \
  --url 'https://api.nabrah.ai/api/ext/omni_v2/ticket/inboxes' \
  --header 'X-API-Key: <your-api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
  "config": {
    "auto_assign": true,
    "ticket_types": [
      "support",
      "billing",
      "sales"
    ],
    "alway_create_ticket": false,
    "assign_list": [
      "user_7c19a2",
      "user_3ab8f1"
    ],
    "lock_to_single_open_ticket": true
  }
}'
```

### Python

```python
import requests

url = "https://api.nabrah.ai/api/ext/omni_v2/ticket/inboxes"
headers = {
    "X-API-Key": "<your-api-key>",
}
payload = {
    "config": {
        "auto_assign": True,
        "ticket_types": [
            "support",
            "billing",
            "sales"
        ],
        "alway_create_ticket": False,
        "assign_list": [
            "user_7c19a2",
            "user_3ab8f1"
        ],
        "lock_to_single_open_ticket": True
    }
}

response = requests.patch(url, headers=headers, json=payload)
response.raise_for_status()
print(response.json())
```

### JavaScript

```javascript
const response = await fetch("https://api.nabrah.ai/api/ext/omni_v2/ticket/inboxes", {
  method: "PATCH",
  headers: {
    "X-API-Key": "<your-api-key>",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "config": {
      "auto_assign": true,
      "ticket_types": [
        "support",
        "billing",
        "sales"
      ],
      "alway_create_ticket": false,
      "assign_list": [
        "user_7c19a2",
        "user_3ab8f1"
      ],
      "lock_to_single_open_ticket": true
    }
  }),
});

const data = await response.json();
console.log(data);
```

### Go

```go
package main

import (
	"fmt"
	"io"
	"net/http"
	"strings"
)

func main() {
	payload := strings.NewReader(`{
  "config": {
    "auto_assign": true,
    "ticket_types": [
      "support",
      "billing",
      "sales"
    ],
    "alway_create_ticket": false,
    "assign_list": [
      "user_7c19a2",
      "user_3ab8f1"
    ],
    "lock_to_single_open_ticket": true
  }
}`)

	req, _ := http.NewRequest("PATCH", "https://api.nabrah.ai/api/ext/omni_v2/ticket/inboxes", payload)
	req.Header.Set("X-API-Key", "<your-api-key>")
	req.Header.Set("Content-Type", "application/json")

	res, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer res.Body.Close()

	out, _ := io.ReadAll(res.Body)
	fmt.Println(string(out))
}
```
