# Creates a medical condition type

`POST /api/configuration/medical-types`

- **Products:** Operator (`FOH`)
- **Features:** Front of House Generic Access (`FOHGENERIC`)

HTML version: [Creates a medical condition type](https://support.gladstonesoftware.cloud/reference/configuration/creates-a-medical-condition-type)

## Overview

Adds a category of medical condition — asthma, epilepsy, a specific allergy — that can then be recorded against individual members. This is a definition only; it does not record anything against a member. Once the type exists, its generated id is what you pass as `medicalConditionTypeId` when you create a member's medical condition, and a member medical condition quoting an id that does not exist is rejected with `Medical condition type does not exist`.

`typeDescription` must be unique across the tenant. It is not checked up front, so a duplicate surfaces as a `409` with a generic message rather than as a validation message.

A successful call returns `201 Created` with an **empty body** and no `Location` header. The endpoint tells you nothing about the id it has just generated, so to find it call `GET /api/configuration/medical-types` and match on the `typeDescription` you sent.

Types are never really removed once in use: `DELETE` on a type referenced by a member's record is rejected with `409`, so retire a type by setting `isActive` to `false` through `PUT /api/configuration/medical-types/{medicalTypeId}` instead.

## Endpoint

`POST {base_url}/api/configuration/medical-types`

`{base_url}` is the environment URL issued to your integration. See [Authenticating with Gladstone APIs](../../guides/authenticating-with-gladstone-apis.md).

## Request body

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `typeDescription` | string | Yes | The name of the condition category, and the only thing that distinguishes one type from another. Maximum 50 characters — longer values are rejected with `400` and `The medical condition type description cannot be more than 50 characters`; an empty or missing value with `A medical condition type description is required in this request`. It must be unique across all medical condition types in the tenant; a duplicate is rejected with `409`. |
| `isActive` | boolean | No | Whether the type is offered when recording a condition against a member. Omit it, or send null, and it defaults to `true` — this is a create-time default, not a "no change" marker. Send `false` to register a type without exposing it yet; you can flip it later with `PUT /api/configuration/medical-types/{medicalTypeId}`, where `isActive` **is** mandatory. |

## Sample request

```bash title="cURL"
curl -X POST '{base_url}/api/configuration/medical-types' \
  -H 'Authorization: Bearer {accessToken}' \
  -H 'X-Use-SSO: true' \
  -H 'Content-Type: application/json' \
  -d '{
  "typeDescription": "string",
  "isActive": true
}'
```

## Errors

| Status | Meaning | When |
|--------|---------|------|
| `400` | Bad request | `typeDescription` is missing or empty (`A medical condition type description is required in this request`), or longer than 50 characters (`The medical condition type description cannot be more than 50 characters`). The body is a validation error object keyed by field name. |
| `400` | Bad request | The body is not valid — for example `isActive` sent as a string rather than a boolean. |
| `409` | Conflict | A medical condition type with this `typeDescription` already exists — `This entry already exists in the database`. There is no up-front check, so this generic message is all you get, not a validation message. Call `GET /api/configuration/medical-types` first if you need to distinguish "already present" from "created". |
| `500` | Internal server error | The type could not be saved for any other reason. Nothing is created, and the request is safe to retry. |
