Skip to main content
Assumes you have installed an SDK: TypeScript or Python.
An artifact is a document with format: "artifact": a web page that stores data. This guide covers creating one, getting its link, reading what people saved in it and keeping the data in each visitor’s browser instead.

Create an artifact

Create it like any document, from a prompt or from your Markdown in content.markdown. It’s priced like any other create (€0.50 from a sentence at standard).
By default the data is shared: Doconda stores it, and everyone with the link sees the same records. The page is the document’s html output. Its link doesn’t expire after 5 minutes like a file’s: it works until the document’s retention ends (expires_at) or you delete it.

Read the saved data

documents.data(id) lists the page’s collections and how many records each has. documents.data(id, collection) returns that collection’s records, the 1,000 most recently updated at most.
The page saves its records with window.doconda.db; see save data from the page. data on a document that isn’t an artifact fails with 409 not_an_artifact.

Keep the data in the browser

With artifact: { storage: "local" }, each visitor’s data stays in their own browser and never reaches Doconda.
Behavior to be aware of:
  • data can’t read a local artifact: it fails with 409 artifact_is_local.
  • With retention: "none", local is the only mode and Doconda doesn’t host the page: download it with documents.download(id, "html") within 15 minutes.
  • artifact is only accepted with format: "artifact"; otherwise the request fails with 422 input_invalid.
  • documents.delete(id) removes the page and all its data.

Next steps

Artifacts guide

How the page stores data, and its limits.

Retention

How long the page and its data last.

SDK reference

Every method and what it returns.