# update()

Canonical URL: https://developers.iagenify.com/sdk/ref/mailbox/update/
Language: en

`mailbox.update({ name?, catchAll?, image?, signature? }) → Promise<Mailbox>`

Changes the display name, the catch-all, the picture or the signature. Only what you pass is touched.

Status: PATCH · image: null returns to the account's · signature is sanitised

```javascript
await box.update({ name: "Support" });
await box.update({ image: { data: bytes, type: "image/png" } });   // its own picture
await box.update({ image: null });                                  // back to the account's
await box.update({ signature: { html: "<p>Support — example.com</p>", image: true } });
await box.update({ signature: null });                              // remove it
```

| Name | Type | Requirement | Description |
| --- | --- | --- | --- |
| `name` | string |  | The display name. |
| `catchAll` | boolean |  | Unknown addresses on the host land here. |
| `image` | object|null |  | `{ data, type }`. `null` returns to the account photo — **not to initials**. |
| `signature` | object|null |  | `{ html, image }`. `image: true` inlines the mailbox picture. |

## The picture {#image}

`data` takes bytes, base64 or a full data address. Two megabytes at most, in the usual image formats. Setting `null` returns to the account's photo, which is the sensible default rather than nothing.

The account photo is copied once into the account's own storage rather than rendered from wherever it came from — a page should not depend on a third party for a circle, and nothing outside should learn how often the customer reads their mail.

## The signature is sanitised on write {#signature}

> **No script, no handlers, no background images**
>
> A background image in a signature is a tracking pixel in every message the customer sends. The HTML is reduced to an allowed set when it is saved, not when it is used.

## image: true is how a picture reaches a recipient {#image-in-signature}

It travels inside the message rather than being fetched, so it shows without « load remote images ». Nothing in a message controls the circle a recipient's client draws beside the sender's name — a signature is the part you do control.

## catch-all has a limit {#catchall}

It exists only at the apex. On a subdomain it is refused rather than stored as a setting nothing applies.

- [send()](/sdk/ref/mailbox/send): Where the signature is used.
- [contacts.save()](/sdk/ref/mail/contacts/save): A picture for a correspondent.

```python
box.update(name="Support")
box.update(image={"data": png_bytes, "type": "image/png"})   # its own picture
box.update(image=None)                                        # back to the account's
box.update(signature={"html": "<p>Support — example.com</p>", "image": True})
box.update(signature=None)                                    # remove it
```
