Skip to main content
DELETE
https://jwhite.tail8bf327.ts.net
/
api
/
v1
/
avatars
/
{id}
Delete Avatar
curl --request DELETE \
  --url https://jwhite.tail8bf327.ts.net/api/v1/avatars/{id} \
  --header 'x-api-key: <api-key>'
{
  "success": true
}

Authentication

Requires an API key in the x-api-key header.
x-api-key: ah_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxx

Parameters

id
integer
required
The ID of the avatar to delete

Request

DELETE https://jwhite.tail8bf327.ts.net/api/v1/avatars/10
x-api-key: ah_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxx

Response

{
  "success": true
}
{
  "error": "Avatar not found"
}

Notes

  • You must own the avatar to delete it (user_id must match authenticated user)
  • If the avatar is hosted on Cloudinary, the file will be automatically deleted from Cloudinary
  • If Cloudinary deletion fails, the avatar is still removed from the database
  • This action is permanent and cannot be undone
  • There is no restriction on deleting avatars that are in use by agents (agents will lose their avatar reference)

Error Responses

For information about error responses and status codes, see Error Responses.

Common Errors for This Endpoint

  • 401 Unauthorized - Invalid or missing API key
  • 404 Not Found - Avatar not found or not owned by user
  • 500 Internal Server Error - Server error