---
title: "Publish an artifact's next version"
method: POST
path: "/api/artifacts/{artifactId}/versions"
tags: ["Artifacts"]
---

# Publish an artifact's next version

`POST /api/artifacts/{artifactId}/versions`

## Request

- The document declares no server URL.
- Auth: one of:
  - API key in header `x-sixb-csrf`
  - HTTP bearer
  - HTTP bearer

The kind must be the artifact's. The new version becomes the latest. With baseVersion, it is refused with 409 artifact_moved when another version was published since.

## Path parameters

- `artifactId` string, required

## Request body

- object
  - `kind` 'document' | 'sheet' | 'slides' | 'page' | 'canvas' | 'file', required
  - `title` string, required
  - `files` object[], required: Files stored with POST /api/files, at their paths in the artifact
    - `path` string, required: The file's path inside the artifact, such as figures/revenue.svg
    - `file` object, required
      - `blobId` string, required
      - `digest` string, required
      - `sizeBytes` integer, required
      - `fileName` string
      - `mediaType` string
      - `logicalPath` string
  - `baseVersion` integer: The version this one was made from. When another was published since, the publish is refused with 409 artifact_moved, naming the latest version.

## Response `201`

Response for status 201

- object
  - `artifact` object, required
    - `id` string, required
    - `projectId` string, required
    - `kind` 'document' | 'sheet' | 'slides' | 'page' | 'canvas' | 'file', required
    - `title` string, required
    - `owner` object, required
      - `type` 'user' | 'serviceAccount' | 'system', required
      - `id` string, required
    - `latestVersion` integer, required
    - `createdAt` string, required
    - `updatedAt` string, required
  - `version` object, required
    - `artifactId` string, required
    - `version` integer, required
    - `title` string, required
    - `entry` string, required
    - `files` object[], required
      - `path` string, required: The file's path inside the artifact, such as figures/revenue.svg
      - `file` object, required
        - `blobId` string, required
        - `digest` string, required
        - `sizeBytes` integer, required
        - `fileName` string
        - `mediaType` string
        - `logicalPath` string
    - `outline` union, required
      - object
        - `kind` 'document', required
        - `headings` object[], required
          - `depth` integer, required
          - `text` string, required
          - `slug` string, required
      - object
        - `kind` 'sheet', required
        - `sheets` object[], required
          - `name` string, required
          - `rows` integer, required
          - `columns` string[], required
        - `charts` string[], required
      - object
        - `kind` 'slides', required
        - `slides` object[], required
          - `title` string
      - object
        - `kind` 'page', required
        - `title` string
      - object
        - `kind` 'canvas', required
        - `items` union[], required
          - union
            - object
              - …
            - object
              - …
      - object
        - `kind` 'file', required
        - `mediaType` string, required
    - `references` object[], required
      - `address` string, required
      - `as` 'embed' | 'link', required
      - `at` string, required
      - `resolvedVersion` integer, required
    - `author` object, required
      - `type` 'user' | 'serviceAccount' | 'system', required
      - `id` string, required
    - `origin` object
      - `threadId` string, required
      - `runId` string, required
    - `createdAt` string, required
  - `warnings` object[], required
    - `code` string, required
    - `message` string, required
    - `part` string

## Other responses

- `400`: Response for status 400
- `403`: Response for status 403
- `404`: Response for status 404
- `409`: Response for status 409
- `501`: Response for status 501

## Changes

- **2026-10-20** `ebeab1520daa`: 2 warning, 15 info
  - added the new `canvas` enum value to the `artifact/kind` response property for the response status `201`
  - added the new `page` enum value to the `artifact/kind` response property for the response status `201`
  - added the new optional request property `baseVersion` (media type: application/json)
  - added the new optional request property `baseVersion` (media type: application/x-www-form-urlencoded)
  - …13 more
- **2026-10-20** `2529bf887ba6`: 6 breaking, 8 warning, 3 info
  - removed the enum value `canvas` of the request property `kind` (media type: application/json)
  - removed the enum value `canvas` of the request property `kind` (media type: application/x-www-form-urlencoded)
  - removed the enum value `canvas` of the request property `kind` (media type: multipart/form-data)
  - removed the enum value `page` of the request property `kind` (media type: application/json)
  - …13 more
- **2026-10-20** `8df745541b3a`: 2 warning, 15 info
  - added the new `canvas` enum value to the `artifact/kind` response property for the response status `201`
  - added the new `page` enum value to the `artifact/kind` response property for the response status `201`
  - added the new optional request property `baseVersion` (media type: application/json)
  - added the new optional request property `baseVersion` (media type: application/x-www-form-urlencoded)
  - …13 more
- …earlier changes not shown

[Operation history](https://skmtc.dev/sixb-ai/apis/sixb-api/changes/api/artifacts/:artifactId/versions/post.md)

---

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