Skip to the documentation
API

Set your profile photo

Uploads the profile photo of the person, replacing any there was. The body is the image itself, not JSON, with its type in `Content-Type`: `image/png`, `image/jpeg`, `image/webp` or `image/gif`, up to 5 MB.

PUT/account/photo

Runs the real call on your workspace.

PUT /account/photo

Uploads the profile photo of the person, replacing any there was. The body is the image itself, not JSON, with its type in Content-Type: image/png, image/jpeg, image/webp or image/gif, up to 5 MB.

Example

Needs account:write. The image is fitted into a 512 pixel square and stored as WebP, and an animated image keeps its first frame. Answers with its new url.

curl
curl -X PUT "$OE/account/photo" -H "$AUTH" -H "Content-Type: image/jpeg" --data-binary @me.jpg
Response
{  "object": "account_photo",  "url": "https://cdn-prod.openemail.uk/users/avatars/8c1d4e7a-2f90-4b3c-a6d5-1e7f0b9c2d48.webp"}

A body that is not an image of an accepted type, is too large or cannot be read is a 422 invalid_image. A busy image service is a 503 image_busy, so try again.

Every upload gets a new URL, so a cached old photo never shows under the new one.

Reference