---
title: "Add rooms to a virtual tour"
method: POST
path: "/api/add_virtual_tour_scenes"
tags: ["Virtual tours"]
---

# Add rooms to a virtual tour

`POST /api/add_virtual_tour_scenes`

## Request

- Base URL: `https://app.pedra.ai`
- URL: `https://app.pedra.ai/api/add_virtual_tour_scenes`
- Auth: none required

Adds 360° photos to an existing tour. Sequential linking links only the new stretch (last existing room ↔ first new room, then each new room ↔ next); existing links are kept. Costs max(3, ceil(newRooms/3)) credits. Asynchronous: the tour stays live; poll /api/get_virtual_tour until status is "ready" again. Images stored from URLs count toward the daily upload limit (30/day free, 500/day paid); over it, 429 `upload_limit` and nothing is stored.

## Request body

- object
  - `apiKey` string, required: Account API key, sent in the request body. Get one at https://app.pedra.ai under Settings → API.
  - `tourId` string, required
  - `scenes` TourSceneInput[], required: Same shape as create_virtual_tour. imageId scenes must be 360° photos in the tour's property.
    - union
      - TourScene: One 360° photo in a tour. Give exactly one of imageUrl or imageId. A plain string is treated as an imageUrl.
        - `imageUrl` string: Public URL or data: URI of an equirectangular 360° photo (2:1, 1.9–2.1 accepted, max 80 MB). Dropbox and Google Drive share links are converted to direct downloads.
        - `imageId` string: A 360° photo already in the property (from /api/list_property_images with type "360").
        - `name` string: Room name. Omit it and AI names the room in the tour's language (free). Names you pass are never changed.
      - string: Shorthand for { imageUrl }.
  - `linking` 'sequential' | 'none'

## Response `200`

Scenes being added.

- object
  - `tourId` string
  - `propertyId` string
  - `name` string, nullable
  - `status` 'processing' | 'ready' | 'failed'
  - `tourUrl` string: Public tour page. Stable across edits.
  - `embedCode` string: Ready-to-paste <iframe> for the tour.
  - `appUrl` string, nullable: The property in the Pedra app.
  - `shareable` boolean: false on free-plan accounts: the tour builds, but its public link shows an upgrade page.
  - `shareableNote` string: Present when shareable is false.
  - `sceneCount` integer
  - `linkCount` integer
  - `coverImageUrl` string, nullable
  - `createdAt` string, date-time
  - `updatedAt` string, date-time
  - `progress` object: Present while status is processing.
    - `stage` 'queued' | 'importing' | 'naming' | 'linking'
    - `done` integer
    - `total` integer
  - `error` string: Present when status is failed.
  - `lastError` string: Present on a ready tour whose last add_virtual_tour_scenes failed.
  - `failedScenes` object[]
    - `index` integer
    - `imageUrl` string
    - `error` string
  - `addedScenes` object[]
    - `sceneId` string
    - `name` string, nullable
    - `source` string
  - `creditsCost` integer
  - `estimatedSeconds` integer
  - `message` string

## Other responses

- `400`: Invalid request. code no_new_scenes when every scene is already in the tour.
- `402`: Not enough credits. Nothing is created or charged.
- `404`: Missing, invalid, or revoked API key, or a tour/property that isn't on this account.
- `405`: Wrong HTTP method — all endpoints accept POST (credits also accepts GET).
- `409`: The tour is still building (tour_processing) or its build failed (tour_failed).
- `429`: Daily limit reached. Nothing is stored.
- `500`: Unexpected server error.

---

[API](https://skmtc.dev/pedra/apis/pedra-api.md) · [All operations](https://skmtc.dev/pedra/apis/pedra-api/llms.txt) · [OpenAPI document](https://skmtc.dev/pedra/apis/pedra-api/revisions/87b2e76912c8?raw)
