Links API
Create a Link
POST /api/workspace/links
Authorization: Bearer TOKEN
Content-Type: application/jsonRequest Body
| Field | Type | Required | Description |
|---|---|---|---|
source_id | string | Yes | ID of the source note |
target_id | string | Yes | ID of the target note |
relation | string | Yes | One of: relates_to, extends, contradicts, depends_on, supersedes, derived_from |
Relation Types
| Relation | Direction | Meaning |
|---|---|---|
relates_to | Bidirectional | General connection |
extends | Source extends target | Builds upon |
contradicts | Source contradicts target | Challenges or disagrees |
depends_on | Source depends on target | Prerequisite |
supersedes | Source replaces target | Newer, better version |
derived_from | Source derived from target | Synthesized from |
Example
curl -X POST https://api.cortex-app.dev/api/workspace/links \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"source_id": "note_a1b2c3d4",
"target_id": "note_e5f6g7h8",
"relation": "extends"
}'Response 201
{
"source_id": "note_a1b2c3d4",
"target_id": "note_e5f6g7h8",
"relation": "extends",
"created_at": "2025-03-10T14:35:00Z"
}Last updated on