Skip to main content

deleteMemberPhoto

ThumbnailsDataWrapper deleteMemberPhoto(userId)

DELETE /api/2.0/people/{userId}/photo

Delete a user photo

Removes the avatar of a profile, so that the profile falls back to the default placeholder image. A caller may only do this to their own profile - the ID in the route has to be the calling account, and an administrator gets 403 for anybody else - and the account must be allowed to edit its own profile. The removal is permanent and cannot be undone: the stored image and all of its sizes are deleted, and a new avatar has to be uploaded through POST api/2.0/people/{userId}/photo to replace it. The call is idempotent, so removing an avatar from a profile that has none succeeds as well, and it raises a UserUpdated webhook. The answer still holds the URLs of every size, now pointing at the default image.

Parameters​

NameInTypeDescriptionNotes
userIdpathStringThe profile whose avatar the operation addresses, taken from the route. Either the ID of the account or its user name is accepted. Reading a photo works for any account the caller may see, while deleting one only works for the calling account itself.[required] [example: 00000000-0000-0000-0000-000000000000]

Responses​

Status codeDescriptionTypeResponse headers
200The URLs of every photo size, now pointing at the default imageThumbnailsDataWrapperX-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
403The ID in the route is not the calling account, or the account may not edit its own profile--
404No user has the specified ID--
401UnauthorizedErrorApiResponse-
429Too Many Requests.ErrorApiResponseRetry-After
500Internal Server Error.ErrorApiResponse-
400Bad Request.ErrorApiResponse-
502Bad Gateway. Returned by the reverse proxy, response body may be HTML and not JSON.--
503Service Unavailable. Returned by the reverse proxy, response body may be HTML and not JSON.--

Return type​

ThumbnailsDataWrapper

Authorization​

Basic, OAuth2 (scopes: read, write), ApiKeyBearer, asc_auth_key, Bearer, OpenId

HTTP request headers​

  • Content-Type: Not defined
  • Accept: application/json