---
title: "Publish a saved version"
method: POST
path: "/v1/quizzes/{quiz_id}/versions/{version_id}/publish"
tags: ["quizzes"]
---

# Publish a saved version

`POST /v1/quizzes/{quiz_id}/versions/{version_id}/publish`

## Request

- Base URL: `https://api.octaneai.com`
- URL: `https://api.octaneai.com/v1/quizzes/{quiz_id}/versions/{version_id}/publish`
- Auth: HTTP bearer

Publishing an older version_id is the rollback of what shoppers see; the draft is not changed.

## Path parameters

- `version_id` string, required
- `quiz_id` string, required

## Response `200`

The selected version is now published.

- QuizSummary
  - `id` string, required
  - `kind` 'quiz' | 'popup', required: What a stored app is: a quiz the store embeds, or a popup the store shows over its pages. One spelling everywhere: the ``phoenix.apps.kind`` column, the wire ``kind`` field, the TS mirror.
  - `name` string, required
  - `status` 'draft' | 'published' | 'deleted', required: Publish-lifecycle status for an app. DRAFT: editable; not served to the storefront embed. PUBLISHED: a version is live; the embed serves the published snapshot. DELETED: soft-deleted; hidden from the dashboard list and the embed, but the row (pages, versions) is retained for recoverability. The column is a plain VARCHAR (native_enum=False), so this value needs no migration.
  - `archived` boolean, required
  - `published_version` string, nullable, required: The version shoppers see; null when none is published
  - `page_count` integer, required: How many pages the quiz's draft has
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required
  - `urls` object, required: self: this quiz on the API | versions: its versions on the API | dashboard: the quiz in the editor
  - `latest_version` VersionSummary
    - `id` string, required
    - `quiz_id` string, required
    - `number` integer, required: The version's number as the editor shows it (v14)
    - `label` string, nullable, required
    - `page_count` integer, required: How many pages the version has
    - `published` boolean, required: Whether this is the version shoppers see now
    - `created_at` string, date-time, required

## Other responses

- `401`: The key is missing, malformed, revoked or expired.
- `403`: The store's plan has no API access, or the key lacks the scope.
- `404`: Not found
- `409`: The selected version has no pages.
- `422`: The version is the variant of a running test.
- `429`: The key's or the store's bucket is full; Retry-After says when to try again.
- `503`: Request limits cannot be checked right now; retry shortly.
- `504`: The request timed out.

---

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