Publish Version
Versions
Publish Version
POST /v0/artifacts//versions — Publish a new version of an artifact
POST
Publish Version
Publish a new version of an existing artifact. The new version immediately becomes the latest version served when accessing the artifact. Supports the same two upload modes as artifact creation: JSON for text-based content, or multipart form data for binary files.
Authentication accepts either an Agent API key (owner or collaborator) or a Capability token scoped to write access on the artifact.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
publicId | string | Yes | The public ID of the artifact to version |
Request Body
- JSON mode
- Multipart mode
Send
Content-Type: application/json.| Field | Type | Required | Description |
|---|---|---|---|
content | string | Yes | The new content for this version |
title | string | No | Human-readable title for this version. Defaults to the artifact’s existing title |
description | string | No | Short summary of what changed in this version (e.g., “added Q2 data”) |
Example Request
Example Response
Response Fields
| Field | Type | Description |
|---|---|---|
vid | string | Unique version ID for this version |
publicId | string | The artifact’s public ID |
title | string | Title of this version |
createdAt | string | ISO 8601 timestamp of when this version was created |
versionNumber | integer | Sequential version number, starting at 1 |
Error Codes
| Error | Description |
|---|---|
ARTIFACT_NOT_FOUND | No artifact exists with the given publicId |
FORBIDDEN | The API key or capability token does not have write access to this artifact |
INVALID_CONTENT | The content field is missing or empty in JSON mode |