Axsync API v2

Attachments

Files attached to notes. Uploads use a short-lived signed URL, so large files never pass through the API servers.

The attachment object

FieldTypeDescription
idstringUnique identifier, prefixed with at_.
note_id requiredstringNote the file belongs to.
filename requiredstringOriginal file name.
content_typestringMIME type.
sizeintegerSize in bytes.
sha256stringHex SHA-256 of the content.
urlstringSigned download URL, valid for 15 minutes.
created_attimestampCreation 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.

Required scope: files:read

Query parameters

FieldTypeDescription
limitintegerPage size, 1–100. Default 25.
cursorstringCursor from the previous page.
sortstringField to sort by, prefix - for descending.
filterstringFilter 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.

Required scope: files:write

Body parameters

FieldTypeDescription
note_id requiredstringNote the file belongs to.
filename requiredstringOriginal file name.
content_typestringMIME type.
sizeintegerSize in bytes.
sha256stringHex SHA-256 of the content.
urlstringSigned 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.

Required scope: files:read

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.

Required scope: files:write

Body parameters

FieldTypeDescription
note_id requiredstringNote the file belongs to.
filename requiredstringOriginal file name.
content_typestringMIME type.
sizeintegerSize in bytes.
sha256stringHex SHA-256 of the content.
urlstringSigned 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.

Required scope: files:write

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.

Required scope: files:write

Body parameters

FieldTypeDescription
note_id requiredstringNote the file belongs to.
filename requiredstringOriginal file name.
content_typestringMIME type.
sizeintegerSize in bytes.
sha256stringHex SHA-256 of the content.
urlstringSigned 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.

Required scope: files:read

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
}