---
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 — When population began.
      - `state` 'running', required
    - object
      - `finished_at` string, date-time, required — When population finished.
      - `state` 'complete', required
    - object
      - `error` string, required — Why population failed.
      - `finished_at` string, date-time, required — When it gave up.
      - `state` 'failed', required
  - `error` string, nullable — Human-readable failure message. Omitted on success.
  - `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 — `true` when the request succeeded. `false` responses carry `error` instead of `data`.

## Other responses

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

---

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