---
title: "POST /cohort"
method: POST
path: "/cohort"
---

# POST /cohort

`POST /cohort`

## Request

- Base URL: `/analytics-svc/api/services/` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/analytics-svc/api/services/cohort`
- Auth: none declared

Sends mriquery to patient analytics service to get list of patient from mriquery, extracts all patient ids, then creates cohort definition and cohort entries in database

## Request body

- object
  - `datasetId` string, required: Id of dataset
  - `mriquery` string, required: Filtercard information in bookmark form. This is a binary string encoded in base64
  - `description` string, required: Cohort Description
  - `definitionTypeConceptId` string: Cohort Definition Type Concept Id
  - `subjectConceptId` number: Cohort Definition Subject Concept Id
  - `syntax` string: Cohort Definition Syntax

## Response `200`

Success

- string

## Other responses

- `default`: Error

---

[API](https://skmtc.dev/ohdsi/apis/health-for-clinical-research.md) - [All operations](https://skmtc.dev/ohdsi/apis/health-for-clinical-research/llms.txt) - [OpenAPI document](https://skmtc.dev/ohdsi/apis/health-for-clinical-research/revisions/5655f01517bc?raw)
