Create an Artifact
create_artifactPublish an HTML page or a Markdown document as a Bisque Artifact: a persistent, versioned page at a stable URL that people can open, comment on, and that you can update later with update_artifact. Pass the whole document as content. The call waits for the page to be ready and returns its URL. It is private to you unless you pass audience or share_with. A page that should remember what people do on it (a checklist, a poll, a sign-up sheet) declares capabilities ['state.read','state.write'] and, when some paths need different access, state.rules; it then reads and writes JSON documents through window.bisque.state. For a narrated presentation use create_presentation instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| icon | No | An emoji that stands for the page, e.g. ๐. The tab and Home Screen show icon_image, not this. | |
| type | No | Default html. | |
| state | No | Who may read and write which paths of the page's data, by the minimum role: viewer (can open), contributor (a data grant, separate from editing the page), owner. Absent means: everyone who can open reads, contributors and the owner write. Example poll: [{path:'votes',read:'viewer',write:'owner'},{path:'votes/{self}',write:'viewer'}]. | |
| title | Yes | A short name, the way a document or app is named. | |
| listed | No | Show it in listings (the org library, public discovery) rather than link-only. Default false. | |
| content | Yes | The full document. For html: a complete page (styles and scripts inline; it runs in a sandboxed frame with no network). For markdown: the Markdown source. | |
| audience | No | Who can open the link. owner: only you. users: the people in share_with. public: anyone with the link. | |
| icon_image | No | The page's own icon: the favicon in the browser tab and the icon a phone puts on its Home Screen. A data URL: an SVG (data:image/svg+xml,<svg โฆ>) or a base64 PNG, JPEG, WebP, or GIF, at most 512 KB, cropped to a square. An SVG must be self-contained (no links to other files, fonts, or stylesheets); draw shapes rather than text. Without one the page shows the Bisque icon. | |
| share_with | No | People to grant access by email (or uid), with a role. [{ "email": "ana@acme.com", "role": "viewer" }]. viewer opens it; editor can also publish new content. Implies audience "users" when audience is omitted. | |
| description | No | One sentence saying what the page is; shown in listings. | |
| capabilities | No | What the page may do at run time. state.read and state.write give it JSON documents at window.bisque.state (get, patch, list, subscribe); viewer.identity tells it who is viewing (window.bisque.viewer); events.emit lets it record typed Events. Omit for a page that only shows things. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | The viewer page. | |
| icon | No | ||
| type | Yes | ||
| title | Yes | ||
| group_id | No | ||
| created_at | No | ||
| updated_at | No | ||
| version_id | Yes | The Version this call authored. | |
| artifact_id | Yes | ||
| description | No | ||
| audience_mode | Yes | Who can open it: owner, users, org, or public. | |
| icon_image_url | No | The page icon set with icon_image; null for the Bisque icon. | |
| version_number | No | ||
| discoverability | Yes | ||
| organization_id | No | ||
| latest_version_id | No | ||
| publication_error | No | ||
| publication_status | Yes | ready means the URL serves this content now. queued or processing means it is still being prepared; call get_artifact to check. failed carries publication_error. | |
| viewer_version_mode | No | ||
| published_version_id | Yes | The Version viewers see; null until a publication is ready. |