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.
Create or update artifact
When `artifact.id` matches an existing artifact it is updated (as an unpublished draft when `draft` is true), 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
Renders the selected artifact version (`version`, latest when omitted) as a PDF file and saves it as a new 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. The `403` responses are plain-text bodies.