DELETE /me/avatar

Remove the profile image for the current authenticated user. Clears the avatar from the database and the Logto profile.

Responses

  • 200 application/json

    Avatar deleted successfully

    Hide response attributes Show response attributes object
    • code integer
    • message string
    • data object | null
  • 401 application/json

    Unauthorized - invalid or missing token

    Hide response attributes Show response attributes object
    • code integer
    • message string
    • data object | null
  • 500 application/json

    Internal server error

    Hide response attributes Show response attributes object
    • code integer
    • message string
    • data object | null
DELETE /me/avatar
curl \
 --request DELETE 'https://api.your-domain.com/api/me/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 (500)
{
  "code": 500,
  "message": "internal server error",
  "data": {}
}