# save()

Canonical URL: https://developers.iagenify.com/sdk/ref/mail/contacts/save/
Language: en

`api.mail.contacts.save({ address, name?, image? }) → Promise<Contact>`

Creates or changes a contact. The photo goes into the account's own storage, and it wins over anything found on the sender's domain.

Status: creates or replaces · image: null keeps the name · counted in the quota

```javascript
await api.mail.contacts.save({
  address: "fedy@example.net",
  name: "Fedy",
  image: { data: bytes, type: "image/jpeg" },
});

await api.mail.contacts.save({ address: "fedy@example.net", image: null });   // drop the photo, keep the name
```

| Name | Type | Requirement | Description |
| --- | --- | --- | --- |
| `address` | string | required | The correspondent. The key. |
| `name` | string |  | What to show. |
| `image` | object|null |  | `{ data, type }`. `null` removes the photo and keeps the rest. |

## It wins over a domain logo {#wins}

> **A logo is a company's mark; a photo is a person**
>
> That is the whole reason the address book exists. A domain logo is right for an organisation and wrong for a person — and on a consumer domain it would be the provider's logo for every one of them.

## The bytes are the account's {#storage}

Stored in its object storage, visible in its listing, counted in its quota, deletable. Nothing is sent anywhere else to find out who writes to the customer.

## The same address replaces {#replaces}

There is no separate update. Saving an address that exists changes it — and omitting a field leaves it as it was, except `image: null`, which removes the photo deliberately.

## A new photo gets a new address {#new-address}

Which is what expires caches. The old one stops being referenced.

- [remove()](/sdk/ref/mail/contacts/remove): Deleting one.
- [mailbox.update()](/sdk/ref/mailbox/update): A picture for your own address.

```python
api.mail.contacts.save(
    address="fedy@example.net",
    name="Fedy",
    image={"data": jpeg_bytes, "type": "image/jpeg"},
)

api.mail.contacts.save(address="fedy@example.net", image=None)   # drop the photo, keep the name
```
