Skip to main content

Artifacts API

Documents generated in conversations, saved as versioned artifacts.

📄️Create or update artifact

When `artifact.id` matches an existing artifact it is updated (as an unpublished draft when `draft` is true). Agent-spec drafts and artifacts referenced by an agent, branch or historical experiment append a version; ordinary drafts update in place. honouring an optional `If-Match` version precondition; otherwise a new artifact is created in the application collection. `artifact.kind` is a storage-level format (for example `json` or `markdown`). Saving a JSON artifact does not create, link, validate, or publish an Agent; use the semantic `createAgent` operation to create a draft agent and its linked spec artifact.

📄️Export artifact to collection

Exports the selected artifact version (`version`, latest when omitted) as HTML for standalone websites or PDF for Markdown documents and saves it as a separate snapshot document in the destination collection, which requires write permission. The document then goes through the regular ingestion pipeline. The artifact is named by the `id` body field; the `id` query parameter is the deprecated location and the body value wins when both are given. An interface is a live widget, not a document, so it cannot be exported (`400`). The `403` responses are plain-text bodies.