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 nameapi.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 nameaddressstringrequiredThe correspondent. The key.
namestringWhat to show.
imageobject|null{ data, type }. null removes the photo and keeps the rest.
It wins over a domain logo
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
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
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
Which is what expires caches. The old one stops being referenced.