# Update inbox

> Updates the fields sent and leaves the others unchanged. Use notifications muted to mute or unmute the inbox, and favorite to star or unstar it. Sending…

`PATCH /v2/api/inboxes/{inbox_id}`

<Note>
**Required scope:** `INBOXES_WRITE`
</Note>

## Behavior

Updates only the fields you send and returns the inbox. Sending `sources` replaces the whole list. Sending `filters` replaces the saved filters, and `"filters": null` clears them. The app's Needs action and Mine settings on the inbox are kept either way. Sending `"emoji": ""` clears the emoji. An absent or `null` emoji keeps it.

To mute an inbox, send `{"notifications_muted": true}`. To unmute it, send `false`.

To star an inbox, send `{"favorite": true}`. Favorite inboxes show first in the app's inbox switcher, oldest star first, and the response carries `favorited_at`. Starring an inbox again keeps its first `favorited_at`. To unstar it, send `false`: `favorited_at` goes back to `null`.

Send `user_id` in the JSON body to update a teammate's inbox. Only admins and managers of the teammate's workspace can do that. An inbox with no source in a workspace the caller manages returns `404`. Sending `sources` replaces only the lines in the caller's workspaces: the teammate's lines from other workspaces are kept.

## Errors

| Status | Code | When |
|--------|------|------|
| `400` | `INBOX_NAME_REQUIRED` | `name` is sent blank |
| `400` | `INVALID_INBOX_SOURCE` | A source, condition or digit is null or invalid, a menu path is not in that line's [menu options](/docs/inboxes/list-menu-options), two sources share an `allo_number`, or a teammate inbox would have no line in the caller's workspace |
| `400` | `INVALID_REQUEST_BODY` | `name` over 80 characters, `emoji` over 16, more than 100 sources, or more than 10 conditions in a source. `field_errors` names each field |
| `400` | `INVALID_INBOX_FILTERS` | `filters` has an unknown key or an invalid value |
| `403` | `FORBIDDEN` | `user_id` is set and the caller is not an admin or manager of that teammate's workspace |
| `403` | `ALLO_NUMBER_FORBIDDEN` | A source line is not accessible to the inbox owner, or, with `user_id`, is not in a workspace the caller manages |
| `404` | `INBOX_NOT_FOUND` | No inbox with this ID belongs to the inbox owner, or, with `user_id`, it has no source in a workspace the caller manages |
