Remove the profile image for another user. Requires manage:users permission and hierarchical access to the target user. Self-modification is prevented (use DELETE /me/avatar instead).
DELETE
/users/{id}/avatar
curl \
--request DELETE 'https://api.your-domain.com/api/users/jf584cz36kce/avatar' \
--header "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
"code": 200,
"message": "avatar deleted successfully",
"data": {}
}
Response examples (401)
{
"code": 401,
"message": "invalid token",
"data": {}
}
Response examples (403)
{
"code": 403,
"message": "insufficient permissions",
"data": {}
}
Response examples (404)
{
"code": 400,
"message": "validation failed",
"data": {
"type": "validation_error",
"errors": [
{
"key": "username",
"message": "required",
"value": "string"
}
]
}
}
Response examples (500)
{
"code": 500,
"message": "internal server error",
"data": {}
}