---
title: "Rename an artifact. The title must be non-empty after trimming"
method: PATCH
path: "/v2/artifacts/{artifact_id}"
tags: ["artifacts"]
---

# Rename an artifact. The title must be non-empty after trimming

`PATCH /v2/artifacts/{artifact_id}`

## Request

- Base URL: `https://api.stuut.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.stuut.ai/v2/artifacts/{artifact_id}`
- Auth: HTTP bearer

Rename an artifact. The title must be non-empty after trimming.

## Path parameters

- `artifact_id` string, uuid, required

## Request body

- RenameArtifactBody
  - `title` string, required

## Response `200`

Successful Response

- ArtifactSummary: Card-level view: everything the Artifacts tab list needs, no result payload.
  - `id` string, uuid, required
  - `title` string, required
  - `kind` 'table' | 'chart', required: What an Ask Stuut artifact renders as.
  - `status` 'resolving' | 'fresh' | 'refreshing' | 'failed' | 'needs_reask', required: Refresh state of an Ask Stuut artifact. RESOLVING: just saved; a background job is looking up the SQL behind it, so whether this artifact can ever refresh is not known yet. FRESH: snapshot reflects the last successful run. REFRESHING: a rerun is in flight. FAILED: the last rerun errored for a transient reason; snapshot kept. NEEDS_REASK: no SQL could be found, or the saved SQL no longer runs (e.g. a model was renamed); the snapshot is kept and the user re-asks the question in a new chat. Refresh is offered only for FRESH, FAILED and REFRESHING.
  - `question` string, required
  - `totalRows` integer, nullable, required
  - `createdAt` string, date-time, required
  - `updatedAt` string, date-time, required
  - `lastRefreshedAt` string, date-time, nullable, required
  - `lastError` string, nullable, required
  - `sourceChatId` string, uuid, nullable, required
  - `sourceMessageId` string, uuid, nullable, required
  - `sourcePartOrder` integer, nullable, required

## Other responses

- `422`: Validation Error

---

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