Generate a cohort
Most teams start by validating a cohort spec, previewing population shape, then generating export-ready records with a fixed seed.
curl -X POST https://app.cloud.medisynth.io/workspace/tenants/$MEDISYNTH_TENANT_ID/cohort-jobs \
-H "Authorization: Bearer $MEDISYNTH_TOKEN" \
-H "X-API-Key: $MEDISYNTH_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "enterprise-mpi-evaluation",
"population": 1000,
"seed": 4107,
"geography": { "state": "Washington", "city": "Vancouver" },
"demographics": {
"ageBands": [
{ "label": "0-17", "min": 0, "max": 17, "weight": 0.18 },
{ "label": "18-64", "min": 18, "max": 64, "weight": 0.58 },
{ "label": "65+", "min": 65, "max": 94, "weight": 0.24 }
],
"sexAtBirth": { "female": 0.52, "male": 0.48 },
"payerMix": { "commercial": 0.48, "medicare": 0.24, "medicaid": 0.23, "self-pay": 0.05 },
"language": { "en": 0.78, "es": 0.15, "other": 0.07 }
},
"conditions": [
{ "name": "diabetes-type-2", "prevalence": 0.42 },
{ "name": "hypertension", "prevalence": 0.64 }
],
"hie": {
"sourceSystems": ["regional-hie", "county-provider", "claims-feed", "lab-network"],
"duplicateRate": 0.11,
"addressDriftRate": 0.22,
"missingPhoneRate": 0.14
},
"exports": { "formats": ["json", "ndjson", "manifest"] }
}'