Skip to main content
DELETE
/
entity-edge
/
{uuid}
Delete Entity Edge
curl --request DELETE \
  --url https://memory.stru.ai/entity-edge/{uuid} \
  --header 'X-API-Key: <x-api-key>'
{
  "404": {},
  "422": {},
  "message": "<string>"
}

Overview

Delete a specific relationship edge (connection) between two entity nodes in the knowledge graph.
Advanced Feature: Only use this if you understand the knowledge graph structure. Deleting edges can break important relationships. This operation is permanent and cannot be undone. Most users should never need this endpoint.

Authentication

X-API-Key
string
required
Your API key for authentication
X-API-Key: windowseat

Path Parameters

uuid
string
required
UUID of the edge to delete
/entity-edge/edge_uuid_123

Response

message
string
Confirmation message
"message": "Entity edge deleted successfully"

Example Request

curl -X DELETE https://memory.stru.ai/entity-edge/edge_uuid_123 \
  -H "X-API-Key: windowseat"

Example Response

{
  "message": "Entity edge deleted successfully"
}

Use Cases

Remove Incorrect Relationships

Delete relationships that were incorrectly extracted or are no longer valid

Clean Up Graph

Remove outdated or irrelevant connections between entities

Manual Graph Management

Manually curate the knowledge graph by removing specific edges

Workflow Example

# 1. Get all edges for an entity
edges = get_entity_edge("entity_uuid_123")

# 2. Find the edge you want to remove
edge_to_delete = next(
    e for e in edges['edges']
    if e['relationship_type'] == 'INCORRECT_RELATIONSHIP'
)

# 3. Delete the edge
delete_entity_edge(edge_to_delete['uuid'])

Error Responses

422
Validation Error
Invalid UUID format
{
  "detail": [
    {
      "loc": ["path", "uuid"],
      "msg": "value is not a valid uuid",
      "type": "type_error.uuid"
    }
  ]
}
404
Not Found
Edge not found
{
  "detail": "Entity edge not found"
}