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 descriptionaliases: 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"]
}Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Request Body required
Section titled “Request Body required ”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
Responses
Section titled “ Responses ”Successful Response
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
Documents updated
Validation Error