---
updatedAt: 2026-06-02T11:59:35.000Z
agentTools:
  projectIndex: https://docs.web2wave.com/llms.txt
---

# Resolve preview URL for a quiz

Build a public URL to open a quiz on the project's primary host
(project's custom `domain` if set, otherwise `{project_id}.web2wave.com`).
Works for any quiz — no need for the API caller to know the project's
subdomain. Use this from MCP / scripts instead of guessing the host.

Modes:
  - no `version` arg → returns the *currently published* version if
    `published_version` is set, else the live draft;
  - `version=latest-published` → forces the published version (auto-fills
    the encoded version hash from the published version's date);
  - `version=<int>-<base64date>` → returns that exact archived version;
  - any other string → passed through as-is.

Other params: `screen_id` (jump to one screen), `locale`, `theme`,
`edit_mode=1`, `project_domain` (override the host explicitly).


# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "title": "web2Wave API",
    "description": "This is the API documentation for web2wave platform.",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://api.web2wave.com/api",
      "description": "API server"
    }
  ],
  "security": [
    {
      "api_key": []
    }
  ],
  "components": {
    "securitySchemes": {
      "api_key": {
        "type": "apiKey",
        "in": "header",
        "name": "api_key"
      }
    }
  },
  "paths": {
    "/quizzes/{quizId}/preview-url": {
      "get": {
        "summary": "Resolve preview URL for a quiz",
        "description": "Build a public URL to open a quiz on the project's primary host\n(project's custom `domain` if set, otherwise `{project_id}.web2wave.com`).\nWorks for any quiz — no need for the API caller to know the project's\nsubdomain. Use this from MCP / scripts instead of guessing the host.\n\nModes:\n  - no `version` arg → returns the *currently published* version if\n    `published_version` is set, else the live draft;\n  - `version=latest-published` → forces the published version (auto-fills\n    the encoded version hash from the published version's date);\n  - `version=<int>-<base64date>` → returns that exact archived version;\n  - any other string → passed through as-is.\n\nOther params: `screen_id` (jump to one screen), `locale`, `theme`,\n`edit_mode=1`, `project_domain` (override the host explicitly).\n",
        "parameters": [
          {
            "in": "header",
            "name": "api_key",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "quizId",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "version",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "screen_id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "locale",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "theme",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "edit_mode",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "project_domain",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Preview URL bundle.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "integer"
                    },
                    "url": {
                      "type": "string",
                      "format": "uri"
                    },
                    "preview_url": {
                      "type": "string",
                      "format": "uri"
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "quiz"
                      ]
                    },
                    "id": {
                      "type": "integer"
                    },
                    "slug": {
                      "type": "string"
                    },
                    "mode": {
                      "type": "string",
                      "enum": [
                        "live-draft",
                        "published",
                        "versioned"
                      ]
                    },
                    "version": {
                      "type": "string",
                      "nullable": true
                    },
                    "project_domain": {
                      "type": "string"
                    },
                    "live_url": {
                      "type": "string",
                      "format": "uri"
                    },
                    "published_url": {
                      "type": "string",
                      "format": "uri",
                      "nullable": true
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
```