Links
SyncLinks track which entities are connected across apps. Each link maps a universal wcp_id to app-specific IDs and stores the content hash used for conflict detection.
Base URL
Section titled “Base URL”http://localhost:8000/api/linksList All Links
Section titled “List All Links”GET /api/linkscurl http://localhost:8000/api/linksResponse 200 OK
[ { "wcp_id": "notion:page_abc", "links": { "notion": "page_abc", "obsidian": "My-Page.md" }, "last_synced_at": "2025-01-15T10:30:00Z", "content_hash": "a1b2c3d4e5f6" }]Get a Single Link
Section titled “Get a Single Link”GET /api/links/{wcp_id}curl http://localhost:8000/api/links/notion:page_abcResponse 200 OK
{ "wcp_id": "notion:page_abc", "links": { "notion": "page_abc", "obsidian": "My-Page.md" }, "last_synced_at": "2025-01-15T10:30:00Z", "content_hash": "a1b2c3d4e5f6"}Error 404 Not Found — Link does not exist.
Delete a Link
Section titled “Delete a Link”Removes the sync relationship. The entities themselves are not deleted from the apps.
DELETE /api/links/{wcp_id}curl -X DELETE http://localhost:8000/api/links/notion:page_abcResponse 204 No Content
A link_deleted event is broadcast via WebSocket:
{ "type": "link_deleted", "wcp_id": "notion:page_abc" }Link Object
Section titled “Link Object”| Field | Type | Description |
|---|---|---|
wcp_id | string | Universal entity identifier (e.g., notion:page_abc) |
links | object | Map of app_name → app_specific_id |
last_synced_at | string | ISO 8601 timestamp of last successful sync |
content_hash | string | Hash of the entity data, used for conflict detection |