Skip to main content
PUT
/
api
/
management
/
authors
/
{id}
Update author
curl --request PUT \
  --url https://api.example.com/api/management/authors/{id} \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>"
}
'
{
  "success": true,
  "timestamp": "<string>",
  "data": {
    "id": 123,
    "name": "<string>"
  }
}

Endpoint

PUT /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 update

Request Body

name
string
required
Updated full name of the authorValidation:
  • Cannot be blank
  • Minimum length: 2 characters
  • Maximum length: 100 characters

Response

success
boolean
required
Indicates if the request was successful
timestamp
string
required
ISO 8601 timestamp of the response
data
object
required
Updated author details
id
long
required
Unique identifier for the author
name
string
required
Updated full name of the author

Example Request

curl -X PUT "http://localhost:8080/api/management/authors/1" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "George Orwell (Eric Arthur Blair)"
  }'

Example Response

{
  "success": true,
  "timestamp": "2026-03-03T10:00:00Z",
  "data": {
    "id": 1,
    "name": "George Orwell (Eric Arthur Blair)"
  }
}

Error Responses

400 Bad Request - Validation Error

{
  "success": false,
  "timestamp": "2026-03-03T10:00:00Z",
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Author name cannot be blank",
    "validationErrors": [
      {
        "field": "name",
        "message": "Author name cannot be blank"
      }
    ]
  }
}

400 Bad Request - Name Too Long

{
  "success": false,
  "timestamp": "2026-03-03T10:00:00Z",
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Author name must be between 2 and 100 characters",
    "validationErrors": [
      {
        "field": "name",
        "message": "Author name must be between 2 and 100 characters"
      }
    ]
  }
}

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"
  }
}

Build docs developers (and LLMs) love