> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs-beta.getzep.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs-beta.getzep.com/_mcp/server.

# Update hyperedge

PATCH https://api.getzep.com/api/v4/graphs/{graph_uuid}/hyperedges/{hyperedge_uuid}
Content-Type: application/json

Updates the shared fact and writes it onto every member edge in one
all-or-nothing write: either every member carries the new fact or none
does. Only fact is accepted, because it is the only field the members
share. name belongs to each member edge, and membership changes use
create_edge and delete_edge. Updating fact on one member through
graph.edge.update cascades the same way.

Reference: https://docs-beta.getzep.com/sdk-reference/graph/hyperedge/update

## Authentication

- `Authorization` header (required) (prefixed with ` Api-Key  `) — Type "Api-Key" followed by a space and the project API key.

## Request

### Path parameters

- `graph_uuid` (string, required) — Graph UUID
- `hyperedge_uuid` (string, required) — Hyperedge UUID

### Body (application/json)

This endpoint expects a v4.PatchHyperedgeRequest.

- `fact` (string, optional) — The natural-language fact, rewritten onto every member edge.

## Response

### 200

OK

- `created_at` (string, optional) — The time the hyperedge was created. Every member edge shares this value.
- `edges` (list of v4.HyperedgeEdge, optional) — The member edges, ordered by uuid. Each carries only its own identity and endpoints; the shared fact and timestamps are on the hyperedge.
- `expired_at` (string, optional) — The time the fact was superseded or removed.
- `fact` (string, optional) — The natural-language fact this hyperedge represents. Every member edge carries the same fact.
- `graph_uuid` (string, optional) — The unique identifier of the graph this hyperedge belongs to.
- `invalid_at` (string, optional) — The time at which the fact stopped being true.
- `uuid` (string, optional) — The unique identifier of the hyperedge.
- `valid_at` (string, optional) — The time from which the fact is considered true.

## Errors

### 400 Bad Request Error

Bad Request

- `error` (v4.ErrorBody, optional)

### 401 Unauthorized Error

Unauthorized

- `error` (v4.ErrorBody, optional)

### 403 Forbidden Error

Forbidden

- `error` (v4.ErrorBody, optional)

### 404 Not Found Error

Not Found

- `error` (v4.ErrorBody, optional)

### 503 Service Unavailable Error

Service Unavailable

- `error` (v4.ErrorBody, optional)

## Types

### v4.HyperedgeEdge

- `name` (string, optional) — The name of the member edge, in upper snake case, for example FOUNDED.
- `source_node_uuid` (string, optional) — The unique identifier of the member edge's source node.
- `target_node_uuid` (string, optional) — The unique identifier of the member edge's target node.
- `uuid` (string, optional) — The unique identifier of the member edge.

### v4.ErrorBody

- `code` (string, optional)
- `details` (map from string to any, optional)
- `message` (string, optional)
- `param` (string, optional)
- `request_id` (string, optional)

## Examples

**Request**

```json
{}
```

**Response**

```json
{
  "created_at": "string",
  "edges": [
    {
      "name": "string",
      "source_node_uuid": "string",
      "target_node_uuid": "string",
      "uuid": "string"
    }
  ],
  "expired_at": "string",
  "fact": "string",
  "graph_uuid": "string",
  "invalid_at": "string",
  "uuid": "string",
  "valid_at": "string"
}
```