Attachments
Files attached to notes. Uploads use a short-lived signed URL, so large files never pass through the API servers.
The attachment object
| Field | Type | Description |
|---|---|---|
id | string | Unique identifier, prefixed with at_. |
note_id required | string | Note the file belongs to. |
filename required | string | Original file name. |
content_type | string | MIME type. |
size | integer | Size in bytes. |
sha256 | string | Hex SHA-256 of the content. |
url | string | Signed download URL, valid for 15 minutes. |
created_at | timestamp | Creation time, RFC 3339 in UTC. |
Example
{
"id": "at_8f3k2Q9xLm",
"note_id": "nt_8f3k2Q9xLm",
"filename": "diagram.png",
"content_type": "image/png",
"size": 184320,
"sha256": "9b74c9897bac770ffc029102a200c5de",
"url": "https://files.axnode.net/d/at_7Hq2/diagram.png?sig=…",
"created_at": "2026-09-14T08:21:07Z"
}GET /attachments
List attachments. Returns a paginated list of attachments.
Query parameters
| Field | Type | Description |
|---|---|---|
limit | integer | Page size, 1–100. Default 25. |
cursor | string | Cursor from the previous page. |
sort | string | Field to sort by, prefix - for descending. |
filter | string | Filter expression, see Filtering and sorting. |
Request
curl -X GET "https://api.axnode.net/v2/attachments" \
-H "Authorization: Bearer $AXSYNC_TOKEN"const res = await fetch('https://api.axnode.net/v2/attachments', {
method: 'GET',
headers: { Authorization: `Bearer ${token}` }
});
const data = await res.json();import requests
res = requests.get(
'https://api.axnode.net/v2/attachments',
headers={'Authorization': f'Bearer {token}'},
)
data = res.json()Response 200
{
"data": [
{
"id": "at_8f3k2Q9xLm",
"note_id": "nt_8f3k2Q9xLm",
"filename": "diagram.png",
"content_type": "image/png",
"size": 184320,
"sha256": "9b74c9897bac770ffc029102a200c5de",
"url": "https://files.axnode.net/d/at_7Hq2/diagram.png?sig=…",
"created_at": "2026-09-14T08:21:07Z"
}
],
"has_more": false,
"next_cursor": null
}POST /attachments
Create an attachment. Creates an attachment.
Body parameters
| Field | Type | Description |
|---|---|---|
note_id required | string | Note the file belongs to. |
filename required | string | Original file name. |
content_type | string | MIME type. |
size | integer | Size in bytes. |
sha256 | string | Hex SHA-256 of the content. |
url | string | Signed download URL, valid for 15 minutes. |
Request
curl -X POST "https://api.axnode.net/v2/attachments" \
-H "Authorization: Bearer $AXSYNC_TOKEN" \
-H "Content-Type: application/json" \
-d '{"note_id": "nt_8f3k2Q9xLm", "filename": "diagram.png"}'const res = await fetch('https://api.axnode.net/v2/attachments', {
method: 'POST',
headers: { Authorization: `Bearer ${token}`, 'Content-Type': 'application/json' },
body: JSON.stringify({"note_id": "nt_8f3k2Q9xLm", "filename": "diagram.png"})
});
const data = await res.json();import requests
res = requests.post(
'https://api.axnode.net/v2/attachments',
headers={'Authorization': f'Bearer {token}'}, json={"note_id": "nt_8f3k2Q9xLm", "filename": "diagram.png"},
)
data = res.json()Response 201
{
"id": "at_8f3k2Q9xLm",
"note_id": "nt_8f3k2Q9xLm",
"filename": "diagram.png",
"content_type": "image/png",
"size": 184320,
"sha256": "9b74c9897bac770ffc029102a200c5de",
"url": "https://files.axnode.net/d/at_7Hq2/diagram.png?sig=…",
"created_at": "2026-09-14T08:21:07Z"
}GET /attachments/{id}
Retrieve an attachment. Retrieves an attachment by its identifier.
Request
curl -X GET "https://api.axnode.net/v2/attachments/at_8f3k2Q9xLm" \
-H "Authorization: Bearer $AXSYNC_TOKEN"const res = await fetch('https://api.axnode.net/v2/attachments/at_8f3k2Q9xLm', {
method: 'GET',
headers: { Authorization: `Bearer ${token}` }
});
const data = await res.json();import requests
res = requests.get(
'https://api.axnode.net/v2/attachments/at_8f3k2Q9xLm',
headers={'Authorization': f'Bearer {token}'},
)
data = res.json()Response 200
{
"id": "at_8f3k2Q9xLm",
"note_id": "nt_8f3k2Q9xLm",
"filename": "diagram.png",
"content_type": "image/png",
"size": 184320,
"sha256": "9b74c9897bac770ffc029102a200c5de",
"url": "https://files.axnode.net/d/at_7Hq2/diagram.png?sig=…",
"created_at": "2026-09-14T08:21:07Z"
}PATCH /attachments/{id}
Update an attachment. Updates fields of an attachment. Only supplied fields change.
Body parameters
| Field | Type | Description |
|---|---|---|
note_id required | string | Note the file belongs to. |
filename required | string | Original file name. |
content_type | string | MIME type. |
size | integer | Size in bytes. |
sha256 | string | Hex SHA-256 of the content. |
url | string | Signed download URL, valid for 15 minutes. |
Request
curl -X PATCH "https://api.axnode.net/v2/attachments/at_8f3k2Q9xLm" \
-H "Authorization: Bearer $AXSYNC_TOKEN" \
-H "Content-Type: application/json" \
-d '{"note_id": "nt_8f3k2Q9xLm", "filename": "diagram.png"}'const res = await fetch('https://api.axnode.net/v2/attachments/at_8f3k2Q9xLm', {
method: 'PATCH',
headers: { Authorization: `Bearer ${token}`, 'Content-Type': 'application/json' },
body: JSON.stringify({"note_id": "nt_8f3k2Q9xLm", "filename": "diagram.png"})
});
const data = await res.json();import requests
res = requests.patch(
'https://api.axnode.net/v2/attachments/at_8f3k2Q9xLm',
headers={'Authorization': f'Bearer {token}'}, json={"note_id": "nt_8f3k2Q9xLm", "filename": "diagram.png"},
)
data = res.json()Response 200
{
"id": "at_8f3k2Q9xLm",
"note_id": "nt_8f3k2Q9xLm",
"filename": "diagram.png",
"content_type": "image/png",
"size": 184320,
"sha256": "9b74c9897bac770ffc029102a200c5de",
"url": "https://files.axnode.net/d/at_7Hq2/diagram.png?sig=…",
"created_at": "2026-09-14T08:21:07Z"
}DELETE /attachments/{id}
Delete an attachment. Permanently deletes an attachment. This cannot be undone.
Request
curl -X DELETE "https://api.axnode.net/v2/attachments/at_8f3k2Q9xLm" \
-H "Authorization: Bearer $AXSYNC_TOKEN"const res = await fetch('https://api.axnode.net/v2/attachments/at_8f3k2Q9xLm', {
method: 'DELETE',
headers: { Authorization: `Bearer ${token}` }
});
const data = await res.json();import requests
res = requests.delete(
'https://api.axnode.net/v2/attachments/at_8f3k2Q9xLm',
headers={'Authorization': f'Bearer {token}'},
)
data = res.json()Response 200
{
"deleted": true,
"id": "at_8f3k2Q9xLm"
}POST /attachments/uploads
Create an upload. Returns a signed upload URL and the attachment record in `pending` state.
Body parameters
| Field | Type | Description |
|---|---|---|
note_id required | string | Note the file belongs to. |
filename required | string | Original file name. |
content_type | string | MIME type. |
size | integer | Size in bytes. |
sha256 | string | Hex SHA-256 of the content. |
url | string | Signed download URL, valid for 15 minutes. |
Request
curl -X POST "https://api.axnode.net/v2/attachments/uploads" \
-H "Authorization: Bearer $AXSYNC_TOKEN" \
-H "Content-Type: application/json" \
-d '{"note_id": "nt_8f3k2Q9xLm", "filename": "diagram.png"}'const res = await fetch('https://api.axnode.net/v2/attachments/uploads', {
method: 'POST',
headers: { Authorization: `Bearer ${token}`, 'Content-Type': 'application/json' },
body: JSON.stringify({"note_id": "nt_8f3k2Q9xLm", "filename": "diagram.png"})
});
const data = await res.json();import requests
res = requests.post(
'https://api.axnode.net/v2/attachments/uploads',
headers={'Authorization': f'Bearer {token}'}, json={"note_id": "nt_8f3k2Q9xLm", "filename": "diagram.png"},
)
data = res.json()Response 201
{
"id": "at_8f3k2Q9xLm",
"note_id": "nt_8f3k2Q9xLm",
"filename": "diagram.png",
"content_type": "image/png",
"size": 184320,
"sha256": "9b74c9897bac770ffc029102a200c5de",
"url": "https://files.axnode.net/d/at_7Hq2/diagram.png?sig=…",
"created_at": "2026-09-14T08:21:07Z"
}GET /attachments/{id}/download
Get a download URL. Returns a fresh signed URL for the file.
Request
curl -X GET "https://api.axnode.net/v2/attachments/at_8f3k2Q9xLm/download" \
-H "Authorization: Bearer $AXSYNC_TOKEN"const res = await fetch('https://api.axnode.net/v2/attachments/at_8f3k2Q9xLm/download', {
method: 'GET',
headers: { Authorization: `Bearer ${token}` }
});
const data = await res.json();import requests
res = requests.get(
'https://api.axnode.net/v2/attachments/at_8f3k2Q9xLm/download',
headers={'Authorization': f'Bearer {token}'},
)
data = res.json()Response 200
{
"data": [
{
"id": "at_8f3k2Q9xLm",
"note_id": "nt_8f3k2Q9xLm",
"filename": "diagram.png",
"content_type": "image/png",
"size": 184320,
"sha256": "9b74c9897bac770ffc029102a200c5de",
"url": "https://files.axnode.net/d/at_7Hq2/diagram.png?sig=…",
"created_at": "2026-09-14T08:21:07Z"
}
],
"has_more": false,
"next_cursor": null
}