Skip to main content
DELETE
/
medical
/
v1
/
cohort
/
{id}
Delete Cohort
curl --request DELETE \
  --url https://api.sandbox.metriport.com/medical/v1/cohort/{id} \
  --header 'x-api-key: <api-key>'
import { MetriportMedicalApi } from "@metriport/api-sdk";

const metriport = new MetriportMedicalApi("YOUR_API_KEY");

const cohortId = "00000000-0000-0000-0000-000000000000";
await metriport.deleteCohort(cohortId);
For more information, see the guide about Cohorts
Prerequisites: You must remove all patients from a cohort before deleting it. If there are still patients in the cohort, the API will return a 400 error.Use the remove patients from cohort endpoint to clear all patients first.

Path Params

id
string
required
The ID of the cohort to delete.

Response

204 - No Content, upon successful delete.
import { MetriportMedicalApi } from "@metriport/api-sdk";

const metriport = new MetriportMedicalApi("YOUR_API_KEY");

const cohortId = "00000000-0000-0000-0000-000000000000";
await metriport.deleteCohort(cohortId);