Delete your profile picture

DELETE https://chat.hvaclaunch.ai/api/v1/users/me/avatar

Delete the current user's uploaded profile picture, reverting to the organization's default style for profile pictures.

This endpoint is idempotent: if the current user has not uploaded a custom profile picture, the request succeeds without making any changes.

In organizations that restrict profile picture changes, only administrators can use this endpoint.

Changes: Prior to Zulip 12.0 (feature level 443), this endpoint was not idempotent; calling it when the current user had not uploaded a custom profile picture would still increment their avatar version and send a redundant user update event to clients.

Usage examples

The -u line implements HTTP Basic authentication. See the Authorization header documentation for how to get those credentials for Zulip users and bots.

curl -sSX DELETE https://chat.hvaclaunch.ai/api/v1/users/me/avatar \
    -u EMAIL_ADDRESS:API_KEY

Parameters

This endpoint does not accept any parameters.

Response

Return values

  • avatar_url: string

    The URL of the current user's profile picture, which now uses the organization's default style for profile pictures. Its format depends on whether that style is the default abstract design or Gravatar.

Example response(s)

Changes: As of Zulip 7.0 (feature level 167), if any parameters sent in the request are not supported by this endpoint, a successful JSON response will include an ignored_parameters_unsupported array.

A typical successful JSON response may look like:

{
    "avatar_url": "/user_avatars/2/3a7bd3e2360a3d29eea436fcfb7e44c735d117c4.png",
    "msg": "",
    "result": "success"
}

An example JSON response for when a non-administrator attempts to change their profile picture in an organization that has disabled profile picture changes:

{
    "code": "BAD_REQUEST",
    "msg": "Avatar changes are disabled in this organization.",
    "result": "error"
}