Docs
Tours

Restore a version into the draft

POST/tours/{id}/versions/{versionId}/restoreNeedscontent.edit

Replaces the working draft with this version's content. Nothing goes live until you publish.

Authorization

secretKey
headerAuthorizationBearer <sk_…>

A secret API key from Settings → API keys. It acts with its creator's role.

Path Parameters

id*integer

The tour's id.

Range1 <= value
versionId*integer

The version's id (from the versions list).

Range1 <= value

Response Body

OK

application/json
  1. response
tour*

A tour with its working draft. What visitors see is the version in publication.

restoredFrom*
Shell
curl -X POST 'https://app.cueston.com/api/tours/1/versions/1/restore'
Example Response
JSON
{
  "tour": {
    "id": 42,
    "name": "Onboarding tour",
    "urlPattern": "https://app.acme.com/*",
    "isActive": true,
    "cardBgColor": "string",
    "cardTextColor": "string",
    "cardBorderRadius": 0,
    "cardPadding": 0,
    "cardShadow": "none",
    "cardWidth": 200,
    "textAlign": "left",
    "cardBlurIntensity": 0,
    "cardBgOpacity": 0,
    "showBorder": true,
    "borderColor": "string",
    "borderThickness": 0,
    "titleSize": 10,
    "bodySize": 10,
    "bodyLineHeight": 1,
    "buttonColor": "string",
    "buttonTextColor": "string",
    "buttonBorderRadius": 0,
    "buttonSize": "xxs",
    "zIndex": 0,
    "scheduleType": "immediate",
    "scheduleDate": "string",
    "scheduleTime": "string",
    "timezone": "string",
    "forceTimezone": true,
    "frequencyType": "once",
    "frequencyCount": 1,
    "frequencyDays": 1,
    "audienceRules": {
      "enabled": false,
      "matchType": "all",
      "rules": [
        {
          "id": "string",
          "attribute": "string",
          "operator": "equals",
          "value": "string",
          "key": "string"
        }
      ]
    },
    "priority": 0,
    "goal": {
      "type": "event",
      "event": "string",
      "urlPattern": "https://app.acme.com/*",
      "contentRef": "string",
      "withinDays": 7
    },
    "holdoutPercent": 0,
    "steps": [
      {
        "id": 42,
        "stepOrder": 0,
        "selector": "#export-button",
        "title": "Welcome to Acme",
        "content": "Export any report as CSV from here.",
        "imageUrl": null,
        "buttonText": "Next",
        "placement": "auto",
        "pulseEnabled": true,
        "zIndex": 0
      }
    ],
    "createdAt": "2026-10-26T09:30:00Z",
    "updatedAt": "2026-10-26T09:30:00Z",
    "publication": {
      "production": {
        "versionId": 7,
        "version": 3,
        "publishedAt": "2026-10-26T09:30:00Z"
      },
      "staging": {
        "versionId": 7,
        "version": 3,
        "publishedAt": "2026-10-26T09:30:00Z"
      }
    },
    "hasUnpublishedChanges": true
  },
  "restoredFrom": {
    "id": 42,
    "version": 3
  }
}