---
title: "Persist/read exact HTML source artifacts for custom site versions"
method: POST
path: "/workspaces/{workspace_id}/sites/artifacts/action"
---

# Persist/read exact HTML source artifacts for custom site versions

`POST /workspaces/{workspace_id}/sites/artifacts/action`

## Request

- Base URL: `https://api.bamf.ai/v1`
- URL: `https://api.bamf.ai/v1/workspaces/{workspace_id}/sites/artifacts/action`
- Auth: HTTP bearer

User-scoped keys and an existing managed client binding required. Bounded actions: list_client_projects/get_client_project_artifact require sites:read plus work.read/artifacts.read; create_client_project/save_client_project_artifact_version require sites:write plus work.write/artifacts.write. Writes require Idempotency-Key. Save uses artifact_format=html and complete content up to 1MB, project_id,title,params.idempotency_key and provenance {artifact_schema: bamf-visual-artifact/v1, revision: positive integer, optional provider: openai/anthropic/bamf/other, optional credential-free HTTPS source_session_url}. Updates also require real artifact_id and expected_updated_at. Returns canonical artifact_id/version_id/content_sha256. Use exact saved HTML and those IDs in create_visual_artifact_site_version; it validates persisted content/hash/provenance. Library biz_artifacts are not interchangeable. MCP: bamf.list_site_projects/create_site_project/get_site_artifact/save_site_artifact.

## Path parameters

- `workspace_id` string, uuid, required

## Headers

- `Idempotency-Key` string

## Request body

- object
  - `action` 'list_client_projects' | 'create_client_project' | 'get_client_project_artifact' | 'save_client_project_artifact_version', required
  - `params` object, required

## Response `200`

Canonical persisted artifact result and receipt

## Other responses

- `400`: Invalid HTML/provenance/idempotency/concurrency parameters
- `403`: Scope/tenant/key/capability denied
- `409`: Stale update or conflicting idempotency

---

[API](https://skmtc.dev/bamf/apis/bamf-developer-platform-api.md) · [All operations](https://skmtc.dev/bamf/apis/bamf-developer-platform-api/llms.txt) · [OpenAPI document](https://skmtc.dev/bamf/apis/bamf-developer-platform-api/revisions/a390dd3294bd?raw)
