Skip to content

Notes API

The notes API operates on notes on a canvas.

List Notes

Gets all notes of the specified canvas.

GET /canvases/:id/notes

Attribute Type Required Description


id (path) uuid yes ID of the canvas subscribe (query) boolean no See api_streaming

curl -H "Private-Token: <access token>" https://canvus.example.com/api/v1/canvases/78cfbcc8-aed9-4bbb-95ca-a0b9a5358d5a/notes

Example response:

[
  {
    "background_color": "#ffffff",
    "depth": 0,
    "id": "f77e17a2-3716-46e4-8143-97dde114b20b",
    "location": {
      "x": 3892.455810546875,
      "y": 3326.92041015625
    },
    "parent_id": "fcc7bd6e-3334-4de6-ad95-2c0ab7d47b70",
    "pinned": false,
    "scale": 1,
    "size": {
      "height": 300,
      "width": 300
    },
    "state": "normal",
    "text": "",
    "title": "",
    "widget_type": "Note"
  }
]

Single Note

Gets a single note.

GET /canvases/:id/notes/:note_id

Attribute Type Required Description


id (path) uuid yes ID of the canvas note_id (path) uuid yes ID of the note to get subscribe (query) boolean no See api_streaming

curl -H "Private-Token: <access token>" https://canvus.example.com/api/v1/canvases/78cfbcc8-aed9-4bbb-95ca-a0b9a5358d5a/notes/f77e17a2-3716-46e4-8143-97dde114b20b

Example response:

{
  "background_color": "#ffffff",
  "depth": 0,
  "id": "f77e17a2-3716-46e4-8143-97dde114b20b",
  "location": {
    "x": 3892.455810546875,
    "y": 3326.92041015625
  },
  "parent_id": "fcc7bd6e-3334-4de6-ad95-2c0ab7d47b70",
  "pinned": false,
  "scale": 1,
  "size": {
    "height": 300,
    "width": 300
  },
  "state": "normal",
  "text": "",
  "title": "",
  "widget_type": "Note"
}

Create Note

Creates a note.

POST /canvases/:id/notes

Attribute Type Required Description


id (path) uuid yes ID of the canvas background_color string no Color of the note depth number no Depth of the note compared to its siblings location object no Location of the note relative to its parent parent_id uuid no ID of the note\'s parent pinned boolean no Is the note pinned or not scale number no Scale of the note size object no Size of the note text string no Text in the note title string no Title of the note

curl -X POST -H "Private-Token: <access token>" https://canvus.example.com/api/v1/canvases/78cfbcc8-aed9-4bbb-95ca-a0b9a5358d5a/notes

Example response:

{
  "background_color": "#ffffff",
  "depth": 0,
  "id": "65110c5c-3dd1-4d71-963e-ae1549fa2f9b",
  "location": {
    "x": 5626.251953125,
    "y": 3265.86328125
  },
  "parent_id": "fcc7bd6e-3334-4de6-ad95-2c0ab7d47b70",
  "pinned": false,
  "scale": 1,
  "size": {
    "height": 300,
    "width": 300
  },
  "state": "normal",
  "text": "",
  "title": "",
  "widget_type": "Note"
}

Update Note

Updates a note.

PATCH /canvases/:id/notes/:note_id

Attribute Type Required Description


id (path) uuid yes ID of the canvas note_id (path) uuid yes ID of the note to update background_color string no Color of the note depth number no Depth of the note compared to its siblings location object no Location of the note relative to its parent parent_id uuid no ID of the note\'s parent pinned boolean no Is the note pinned or not scale number no Scale of the note size object no Size of the note text string no Text in the note title string no Title of the note

curl -X PATCH -H "Private-Token: <access token>" -d '{"text":"I am note"}' https://canvus.example.com/api/v1/canvases/78cfbcc8-aed9-4bbb-95ca-a0b9a5358d5a/notes/f77e17a2-3716-46e4-8143-97dde114b20b

Example response:

{
  "background_color": "#ffffff",
  "depth": 0,
  "id": "f77e17a2-3716-46e4-8143-97dde114b20b",
  "location": {
    "x": 3892.455810546875,
    "y": 3326.92041015625
  },
  "parent_id": "fcc7bd6e-3334-4de6-ad95-2c0ab7d47b70",
  "pinned": false,
  "scale": 1,
  "size": {
    "height": 300,
    "width": 300
  },
  "state": "normal",
  "text": "I am note",
  "title": "",
  "widget_type": "Note"
}

Delete Note

Deletes a note.

DELETE /canvases/:id/notes/:note_id

Attribute Type Required Description


id (path) uuid yes ID of the canvas note_id (path) uuid yes ID of the note to delete

curl -X DELETE -H "Private-Token: <access token>" https://canvus.example.com/api/v1/canvases/78cfbcc8-aed9-4bbb-95ca-a0b9a5358d5a/notes/f77e17a2-3716-46e4-8143-97dde114b20b