avatars

Upload new avatar image

Uploads a new avatar image for the authenticated user.

post/me/avatars

Query parameters

selected_email_hashstring

The SHA256 hash of email. If provided, the uploaded image will be selected as the avatar for this email.

select_avatarboolean nullable

Determines if the uploaded image should be set as the avatar for the email. If not passed, the image is only selected as the email's avatar if no previous avatar has been set. Accepts '1'/'true' to always set the avatar or '0'/'false' to never set the avatar.

Response

Avatar uploaded successfully

image_idstring required

Unique identifier for the image.

image_urlstring uri required

Image URL

rating'G' | 'PG' | 'R' | 'X' required

Rating associated with the image.

alt_textstring required

Alternative text description of the image.

selectedboolean

Whether the image is currently selected as the provided selected email's avatar.

updated_datestring date-time required

Date and time when the image was last updated.

Example response

{
  "image_id": "38be15a98a2bbc40df69172a2a8349",
  "image_url": "https://gravatar.com/userimage/252014526/d38bele5a98a2bbc40df69172a2a8348.jpeg",
  "alt_text": "Gravatar's avatar image. Gravatar is a service for providing globally unique avatars.",
  "selected": true,
  "updated_date": "2021-10-01T12:00:00Z"
}

Changes

Changed in 3 of the 11 revisions of this API.242

    • added the new required request property

      new-required-request-property

    • removed the request property

      request-property-removed

    • added the new optional query request parameter select_avatar

      new-optional-request-parameter

    • added the new optional query request parameter selected_email_hash

      new-optional-request-parameter

  • bd1e2294c94213See the full diff
    • added the new required request property

      new-required-request-property

    • deleted the query request parameter select_avatar

      request-parameter-removed

    • deleted the query request parameter selected_email_hash

      request-parameter-removed

    • removed the request property

      request-property-removed

    This revision also has 2 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog