Skip to main content
DELETE
/
api
/
management
/
authors
/
{id}
Delete Author
curl --request DELETE \
  --url https://api.example.com/api/management/authors/{id}
{
  "success": true,
  "timestamp": "<string>",
  "message": "<string>",
  "data": null
}

Endpoint

DELETE /api/management/authors/{id}

Authentication

Requires authentication with a valid Bearer token and ADMIN role.

Path Parameters

id
long
required
Unique identifier of the author to delete

Response

success
boolean
required
Indicates if the request was successful
timestamp
string
required
ISO 8601 timestamp of the response
message
string
required
Success message confirming deletion
data
null
No data returned for delete operations

Example Request

curl -X DELETE "http://localhost:8080/api/management/authors/1" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json"

Example Response

{
  "success": true,
  "timestamp": "2026-03-03T10:00:00Z",
  "message": "Author deleted successfully",
  "data": null
}

Error Responses

401 Unauthorized

{
  "success": false,
  "timestamp": "2026-03-03T10:00:00Z",
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Authentication required"
  }
}

403 Forbidden

{
  "success": false,
  "timestamp": "2026-03-03T10:00:00Z",
  "error": {
    "code": "FORBIDDEN",
    "message": "Access denied. ADMIN role required"
  }
}

404 Not Found

{
  "success": false,
  "timestamp": "2026-03-03T10:00:00Z",
  "error": {
    "code": "NOT_FOUND",
    "message": "Author not found with id: 999"
  }
}

409 Conflict - Author Has Books

{
  "success": false,
  "timestamp": "2026-03-03T10:00:00Z",
  "error": {
    "code": "CONFLICT",
    "message": "Cannot delete author with associated books"
  }
}
Deleting an author may fail if the author has associated books in the system. Remove or reassign all books before attempting to delete the author.

Build docs developers (and LLMs) love