Skip to main content
POST
/
v1
/
populations
Create Population
curl --request POST \
  --url https://api.example.com/v1/populations \
  --header 'Content-Type: multipart/form-data' \
  --form seed_data='@example-file' \
  --form 'name=<string>' \
  --form 'population_options={
  "question_options": [
    {
      "question_number": 123,
      "question_type": "single-choice",
      "limit": 123
    }
  ]
}' \
  --form 'description=<string>' \
  --form 'data_source=<string>' \
  --form 'reality_target=<string>' \
  --form effective_date=2023-12-25 \
  --form simulation_engine=answers-1 \
  --form run_test=false
{
  "data": {
    "id": "d670f351-8567-4586-9bba-b81add1bebe3",
    "created_at": "2025-06-23T15:38:01Z",
    "name": "Developers",
    "public": true,
    "question_count": 42,
    "simulacrum_count": 984,
    "status": "Tested",
    "average_accuracy": 0.8528,
    "average_squared_error": 0.1607,
    "average_normalised_information_loss": 0.0063,
    "data_source": "User onboarding flow",
    "description": "A model of Developers based on the 2024 Stack Overflow Developer Survey.",
    "effective_date": "2024-01-09",
    "reality_target": "Professional software developers",
    "simulation_engine": "answers-1",
    "test_finished_at": "2023-11-07T05:31:56Z",
    "test_started_at": "2023-11-07T05:31:56Z",
    "upload_filename": "seed_data.csv"
  },
  "errors": [
    {
      "code": "<string>",
      "message": "<string>"
    }
  ]
}

Headers

authorization
string

Body

multipart/form-data
seed_data
file
required
name
string
required

Name of the new population

population_options
PopulationOptions · object

Optional. If not provided, all questions default to single-choice. Important: the API expects population_options to be sent as JSON string. Use json.dumps() to convert your object to string format for multipart/form-data requests.

description
string | null

Optional description for the population

data_source
string | null

Where the data comes from

reality_target
string | null

Label for the real-world target the population is modeling

effective_date
string<date> | null

The date when this data was sourced in reality

simulation_engine
string
default:answers-1

Identifier for the simulation engine to be used

run_test
boolean | null
default:false

Whether to run an accuracy test immediately after creation

Response

Successful Response

data
PopulationsResponse · object

The primary response payload. Contains the result of the request if successful.

errors
ErrorResponse · object[] | null

List of structured error messages, if any occurred during the request.