Artifacts API
Documents generated in conversations, saved as versioned artifacts.
List versions
Returns one page of up to 50 versions, newest first. With `grouped=1` the page comes wrapped with autosave sessions and the total version count; `before` requests the window of versions strictly older than the given version number, and `pinnedVersion` forces a published version into the first page. `version` returns only that version.
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.
Delete artifact
A soft delete: the document backing the artifact is marked ARCHIVED, which hides the artifact from listings and lookups. Failures answer 500 with `{ success: false, error }` instead of the standard error shape.
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.