Links
A link connects two objects in your mind. Some links are inferred automatically (wiki-style references in note content), others are created manually by the user. Use the Links resource to walk the graph between objects.
The link model
| Property | Type | Description |
|---|---|---|
| id | Uid | Unique identifier for the link. |
| type | LinkType | How the link was created. See LinkType. |
| sourceId | Uid | The object the link originates from. |
| targetId | Uid | The object the link points to. |
| flags | integer | Bitmask describing additional link properties. Use bitwise-AND to test for a specific flag. |
LinkType
How the link came to exist.
| Value | Description |
|---|---|
| WikiLink | Inferred automatically from a wiki-style reference inside note content. |
| Manual | Created by the user. |
Actions
List links
Returns every link in the authenticated user's mind.
GET
/links
5 credits
Headers
| Header | Description |
|---|---|
| Accept required | Either application/json (returns a single array) or application/jsonl (streaming mode — every link as newline-delimited JSON). |
Response 200 OK
[
{
"id": "000000000012BQc8yBCik0",
"type": "WikiLink",
"sourceId": "000000000010NYoE35vnQO",
"targetId": "000000000010O3GbaL31DO",
"flags": 1
}
]
Streaming response 200 OK
{"id":"000000000012BQc8yBCik0","type":"WikiLink","sourceId":"000000000010NYoE35vnQO","targetId":"000000000010O3GbaL31DO","flags":1}
{"id":"000000000012BQc8zCDjl1","type":"Manual","sourceId":"000000000010NYoE35vnQO","targetId":"000000000010O3HbbM42EP","flags":0}
Create a link
Create a manual link between two objects.
POST
/links
Idempotent
3 credits
Request body
| Property | Type | Description |
|---|---|---|
| sourceId required | Uid | The object the link originates from. |
| targetId required | Uid | The object the link points to. |
Request
{
"sourceId": "000000000010NYoE35vnQO",
"targetId": "000000000010O3GbaL31DO"
}
Response 201 Created
{
"id": "000000000012BQc8yBCik0"
}
Response — duplicate, existing link returned 200 OK
{
"id": "000000000012BQc8yBCik0"
}
If a link already exists between the same sourceId and targetId, the API returns the existing link's id with 200 OK instead of creating a duplicate.
Delete a link
Removes a link by ID. Only works on Manual links — calling this on a WikiLink returns 422. To remove a WikiLink, edit the source note and delete the corresponding [[…]] reference; the link is removed automatically when the reference is gone.
DELETE
/links/:id
Idempotent
1 credit
Path parameters
| Parameter | Type | Description |
|---|---|---|
| id | Uid | Link to delete. |
Response 200 OK
{}
Response — WikiLink 422
{
"type": "Unprocessable",
"status": 422,
"detail": "WikiLinks cannot be deleted directly. Remove the [[…]] reference in the source note instead."
}