---
title: "Populate demo data (only available for demo organizations)."
method: POST
path: "/api/v1/organizations/{id}/populate-demo"
tags: ["Organizations", "internal"]
---

# Populate demo data (only available for demo organizations).

`POST /api/v1/organizations/{id}/populate-demo`

Runs the population off the request thread (a `tokio::spawn`) and returns
`202` immediately — the work is a few hundred sequential DB round-trips and
would otherwise exceed the reverse-proxy request timeout against a remote
database. Poll `GET /{id}/populate-demo/status` for completion/failure.

## Path parameters

- `id` string, uuid, required

## Response `202`

Demo data population started

- ApiResponseDemoPopulateStatus
  - `data` union — Lifecycle of a demo-populate task. `Running` is set synchronously in the POST handler (before the `202`), then flipped to a terminal variant by the spawned task. `Failed` carries the error string so the UI can show why.
    - object
      - `started_at` string, date-time, required
      - `state` 'running', required
    - object
      - `finished_at` string, date-time, required
      - `state` 'complete', required
    - object
      - `error` string, required
      - `finished_at` string, date-time, required
      - `state` 'failed', required
  - `error` string, nullable
  - `meta` ApiMeta, required — API metadata included in all responses
    - `api_version` integer, required — API version (integer, increments on breaking changes)
    - `server_version` string, required — Server version (semver)
  - `success` boolean, required

## Other responses

- `403` — Only available for demo organizations
- `404` — Organization not found
- `409` — Population already in progress

## Changes

- **2026-07-23** `c037832cd07f` — 1 breaking, 2 info
  - removed the success response with the status `200`
  - added the non-success response with the status `409`
  - added the success response with the status `202`

[Change history](https://skmtc.dev/scanopy/apis/scanopy-api/changes/api/v1/organizations/:id/populate-demo/post.md)

---

[API](https://skmtc.dev/scanopy/apis/scanopy-api.md) · [All operations](https://skmtc.dev/scanopy/apis/scanopy-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/scanopy/scanopy-api/revisions/49ea97c8bb7e/schema)
