Every Space in Spaces holds your notes and files, and these endpoints let you work with them. A note is a Markdown text file. You can read what you keep about a client, search through it, or save a note from your own tool.
To read files, your key needs the Spaces and files area, which Full access and Read-only both include. To save changes, it needs Full access or Spaces and files set to Read and write. If a key is limited to certain Spaces, it can only reach the files inside them. For more on how Spaces work, see Spaces, notes and files.
Everything inside a Space lives under /spaces/{space}/files. From there, you can list and search files, read a file along with its revision, view its history, or download it.
Use PUT /spaces/{space}/files/content to save a note or any other text file. Send path, content, and expected_revision (the revision you got when you read the file). If someone else changed the file in the meantime, the save fails with conflict so you don’t overwrite their work. When creating a new file, set expected_revision to null.
{
"path": "notes/status.md",
"content": "Export fixed, waiting for the client's OK.",
"expected_revision": "REVISION_FROM_THE_READ"
}
Saved changes show up in the Space’s history like any other edit, with the key’s owner listed as the author. If you prefer working from a terminal, see svanja notes and svanja files.