---
title: "Update an artifact"
method: PATCH
path: "/api/v1/artifacts/{id}"
tags: ["Artifacts"]
---

# Update an artifact

`PATCH /api/v1/artifacts/{id}`

## Request

- Base URL: `https://your-deployment.example.com`
- URL: `https://your-deployment.example.com/api/v1/artifacts/{id}`
- Auth: one of:
  - HTTP bearer
  - API key in header `x-api-key`

Updates an artifact you can edit: one you own, or one shared with you with write permission. Changed `content` creates a new version; the other fields change in place. Omitted fields are left unchanged. Unknown body fields are rejected.

## Path parameters

- `id` string, required

## Request body

- UpdateArtifactRequest
  - `title` string
  - `description` string
  - `content` string: Changed content creates a new version.
  - `tags` string[]

## Response `200`

The updated artifact and its current content. `content` is `null` for a caller who may edit but not read the artifact, unless the request sent content.

- UpdateArtifactResponse200
  - `id` string, required
  - `type` 'mermaid' | 'recharts' | 'chess' | 'python' | 'react' | 'html' | 'svg' | 'code' | 'quest' | 'file' | 'questmaster' | 'lattice' | 'blog-draft', required
  - `title` string, required
  - `description` string, nullable, required
  - `version` integer, required: The current version. Starts at 1; each content change adds one.
  - `version_tag` string, nullable, required
  - `status` 'draft' | 'review' | 'published' | 'archived', required
  - `tags` string[], required
  - `session_id` string, nullable, required
  - `project_id` string, nullable, required
  - `visibility` 'private' | 'project' | 'organization' | 'public', required
  - `created_at` string, required: ISO 8601 timestamp.
  - `updated_at` string, required: ISO 8601 timestamp.
  - `content` string, nullable, required: The current version's content. `null` in a list (fetch the artifact by id for it), and in an update response to a caller who may edit the artifact but not read it, unless that update sent content.

## Other responses

- `401`: Missing or invalid credentials.
- `403`: The API key lacks `notebooks:write`.
- `404`: No artifact with that id is yours to edit. One you can only read (shared read-only, or public) is reported as 404 too, like one that does not exist.
- `405`: The path does not serve this HTTP method.
- `422`: Request body failed validation.
- `429`: Per-user rate limit exceeded.

---

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