Skip to main content
DELETE
/
api
/
v1
/
books
/
delete
/
{id}
curl -X DELETE "https://api.example.com/api/v1/books/delete/550e8400-e29b-41d4-a716-446655440000" \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
// No response body

Authentication

This endpoint requires a valid JWT token in the Authorization header.
Authorization: Bearer <your_jwt_token>

Path Parameters

id
string
required
The unique identifier (UUID) of the book to delete.

Response

This endpoint returns no content on successful deletion.
curl -X DELETE "https://api.example.com/api/v1/books/delete/550e8400-e29b-41d4-a716-446655440000" \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
// No response body

Status Codes

204
No Content
Book deleted successfully. No response body is returned.
401
Unauthorized
Missing or invalid JWT token.
403
Forbidden
Valid token but insufficient permissions to delete books.
404
Not Found
Book with the specified ID does not exist.
409
Conflict
Book cannot be deleted because it is currently in use (e.g., borrowed by users).

Important Notes

Deleting a book is a permanent action and cannot be undone. Ensure that the book is not currently borrowed or referenced in any active transactions before deletion.
If you need to temporarily remove a book from circulation without deleting it, consider implementing a “soft delete” or “archive” feature instead.

Build docs developers (and LLMs) love