Skip to content

Delete Entity

DELETE
/api/writing/entities/{entity_name}

πŸ—‘οΈ Delete an entity

Removes an entity from the system. Optionally removes all references to the entity from documents.

Path Parameters:

  • entity_name: Name of the entity to delete

Query Parameters:

  • remove_from_documents: If true, removes entity mentions from all docs

Returns:

  • EntityDeleteResponse with deletion details

Raises:

  • HTTPException 500: If deletion fails

Example:

DELETE /api/writing/entities/Boromir?remove_from_documents=true
entity_name
required
Entity Name
string
remove_from_documents
Remove From Documents

Remove entity mentions from documents

boolean

Remove entity mentions from documents

Successful Response

EntityDeleteResponse

Response from deleting an entity.

Fields: status: Operation status entity_name: Entity that was deleted documents_updated: Number of documents with removed references message: Status message

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

object
status
required
Status
string
entityName
required
Entityname
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