publish_artifact
Publish artifact
Publish self-contained HTML as version 1; return a share link. Optional Idempotency-Key HTTP header. Limit 10 MiB UTF-8; larger on some paid plans. No network in sandbox; inline assets. Free: 5 active artifacts, 50 versions. For styling, add <meta name="ap-theme" content="firn"> to <head>; call get_authoring_guide for themes and layout classes.
Parametershtmlrequiredtitlesummaryexpires_atvisibilityworkspace_idallowed_emailscomments_enabled
update_artifact
Update artifact
Append a new immutable version to an existing artifact. `expected_version` must equal the current version; the share link moves to the new version; earlier versions stay readable at their pinned URL. Optional `title` renames; with no `html` only the title changes. Each version counts toward the free 50 version cap. For styling, add <meta name="ap-theme" content="firn"> to <head>; call get_authoring_guide for themes and layout classes. artifact_id: id, slug or viewer URL.
Parametershtmltitleartifact_idrequiredrelease_noteworkspace_idexpected_versionrequired
set_artifact_access
Set artifact access
Change an artifact's access mode without a new version. For accountless coworkers use public, not allowlist. artifact_id: id, slug or viewer URL.
Parametersvisibilityrequiredartifact_idrequiredworkspace_idallowed_emails
Read reviewer comments on an artifact, oldest first; use after sharing or to poll. Filters: unresolved_only, since; version (default current) picks the version anchor_status is checked against. Page with limit and cursor. Returns comments, unresolved_count, next_cursor. artifact_id: id, slug or viewer URL.
Parameterslimitsincecursorversionartifact_idrequiredworkspace_idunresolved_only
reply_to_feedback
Reply to feedback
Reply once to a comment (a second reply fails with conflict); resolve: true also marks it resolved. Anyone who can open the artifact can read the reply. Refused on revoked or expired artifacts. Returns the comment.
Parametersmessagerequiredresolvecomment_idrequiredworkspace_id
list_artifacts
List artifacts
List artifacts in this key's workspace, newest first, with unresolved comment counts. Pass `next_cursor` back as `cursor` to page.
Parameterslimitcursorworkspace_id
revoke_artifact
Revoke artifact
Stop serving this artifact (410 Gone). Cannot undo; viewed copies exist. artifact_id: id, slug or viewer URL.
Parametersreasonartifact_idrequiredworkspace_id
configure_workspace
Configure workspace defaults
Read or update workspace defaults (comments_enabled, default_expiry_seconds, default_artifact_title); pass empty settings to read. Platform guardrails are refused with an error: max_artifact_bytes, storage_bytes_limit, monthly_versions_limit, rate_limits, comment_rate_limit, publish_rate_limit, isolation, origins, artifact_origin, control_origin, storage_key_prefix, object_key_prefix, security_headers, content_security_policy. Not available in every workspace.
Parameterssettingsrequiredworkspace_id
get_artifact_state
Get artifact state
Read an artifact's state. Shared JSON key/value state, synced to viewers across versions (page JS: ArtifactRelayState). Last write wins per key. Limits: 200 keys, 16 KiB per value, 64 KiB total. artifact_id: id, slug or viewer URL.
Parametersartifact_idrequiredworkspace_id
set_artifact_state
Set artifact state
Set the given keys atomically; other keys stay. Null is stored, not deleted. Shared JSON key/value state, synced to viewers across versions (page JS: ArtifactRelayState). Last write wins per key. Limits: 200 keys, 16 KiB per value, 64 KiB total. Page JS: ArtifactRelayState.subscribe(fn)/set(k,v)/patch(obj); callbacks get {revision, values, resetAt}; set/patch reject on failure; whole-value writes, no increments or nested merges. artifact_id: id, slug or viewer URL.
Parametersvaluesrequiredartifact_idrequiredworkspace_id
reset_artifact_state
Reset artifact state
Clear all state, including board values; HTML is unchanged. Shared JSON key/value state, synced to viewers across versions (page JS: ArtifactRelayState). Last write wins per key. Limits: 200 keys, 16 KiB per value, 64 KiB total. artifact_id: id, slug or viewer URL.
Parametersartifact_idrequiredworkspace_id
get_authoring_guide
Get authoring guide
Read before writing HTML: themes, ap-* layout classes, an example page, the snippet, size and sandbox rules. Optional theme (firn, firn@1) is validated and returned as selected.
Parameterstheme