> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ariacompute.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Add Memory Edge - POST /v1/workspaces/:workspace_id/cubes/:cube_id/edges

> Wire an edge with a relation between two nodes via POST /v1/workspaces/:workspace_id/cubes/:cube_id/edges. Minimum role contributor.

Wire an edge with a relation and weight between two nodes in a memory cube, building the memory graph.

## Endpoint

```http theme={null}
POST /v1/workspaces/:workspace_id/cubes/:cube_id/edges
```

## Authentication

`Authorization: Bearer <jwt>` or `X-API-Key <sk_...>`. Minimum role: **contributor**.

## Path parameters

**workspace\_id** `string` *required*

Workspace id.

**cube\_id** `string` *required*

Cube id.

## Request body

**from** `string` *required*

Source node id.

**to** `string` *required*

Target node id.

**relation** `string`

Relation label (e.g. `related_to`, `causes`).

**weight** `number`

Edge weight.

## Response

**added** `boolean`

Always true (added).

## Example

```bash cURL theme={null}
curl -X POST https://memo.ariacompute.com/v1/workspaces/ws_01a2b3c4d5e6/cubes/cube_01a2b3c4d5e6/edges \
  -H "Authorization: Bearer <jwt>" \
  -H "Content-Type: application/json" \
  -d '{"from":"node_aa","to":"node_bb","relation":"related_to","weight":0.9}'
```

```json 200 theme={null}
{
  "added": true
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.