Skip to content

Update Entity

PUT
/api/writing/entities/{entity_name}

✏️ Update an entity’s properties

Updates entity metadata and optionally renames the entity across all documents. If new_name differs from the current name, all document references will be updated.

Path Parameters:

  • entity_name: Current name of the entity

Request Body:

  • newName: New name for the entity (optional, triggers rename)
  • entityType: Entity type (character, location, etc.)
  • description: Entity description
  • aliases: Alternative names for the entity

Returns:

  • EntityUpdateResponse with updated entity details and documents_updated count

Raises:

  • HTTPException 500: If update fails

Example Request:

{
    "newName": "Aragorn II",
    "entityType": "character",
    "description": "King of Gondor",
    "aliases": ["Strider", "Elessar"]
}
entity_name
required
Entity Name
string
EntityUpdateRequest

Request model for updating an entity’s properties.

Fields: new_name: New name for the entity (renames across documents if different) entity_type: Entity type (character, location, organization, item, concept, event, faction) description: Entity description aliases: Alternative names/references for the entity

Used By: - PUT /api/writing/entities/{name} endpoint - Entity edit dialog

object
newName
Any of:
string
entityType
Any of:
string
description
Any of:
string
aliases
Any of:
Array<string>

Successful Response

EntityUpdateResponse

Response from updating an entity.

Fields: status: Operation status entity_name: Current entity name previous_name: Previous name if renamed documents_updated: Number of documents with updated references message: Status message

Used By: - PUT /api/writing/entities/{name} endpoint response

object
status
required
Status
string
entityName
required
Entityname
string
previousName
Any of:
string
entityType
Any of:
string
description
Any of:
string
aliases
Any of:
Array<string>
documentsUpdated
Documentsupdated

Documents updated

integer
0
message
Any of:
string

Validation Error

HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object