---
title: "Create an allergy"
method: POST
path: "/api/2026-01-01/medical-record/allergies"
tags: ["Allergies"]
---

# Create an allergy

`POST /api/2026-01-01/medical-record/allergies`

## Request

- Base URL: `https://jdpdocsdemo.jane.qa`
- URL: `https://jdpdocsdemo.jane.qa/api/2026-01-01/medical-record/allergies`
- Auth: OAuth 2
  - Authorization code: `https://login.id.janeapp.com/realms/jane_partner_sandbox/protocol/openid-connect/auth?response_type=code&resource=https://jdpdocsdemo.jane.qa&prompt=consent`
  - Token URL: `https://login.id.janeapp.com/realms/jane_partner_sandbox/protocol/openid-connect/token` scopes: `allergies:create`

Create a structured allergy record for a patient.
`source` is set server-side to `clinic_practitioner` and must not be sent in the request body.

## Request body

- CreateAllergyRequest
  - `data` object, required
    - `patient_id` string, uuid, required: Reference to the patient
    - `practitioner_id` string, uuid: Reference to the staff member who recorded the allergy. Defaults to the authenticated staff member when omitted. Must reference an existing staff member when provided.
    - `allergen_name` string, required: Free-text allergen name (v1)
    - `allergen_type` 'medication' | 'food' | 'environmental' | 'other': Classification of the allergen
    - `reaction` string: Free-text reaction description
    - `reaction_type` string: Classification of the reaction
    - `severity` 'severe' | 'moderate' | 'mild', required: Clinical severity of the allergy
    - `onset_date` string, date: Date the allergy was first observed
    - `status` 'active' | 'inactive', required: Lifecycle state of the allergy

## Response `201`

The allergy was created

- Allergy
  - `id` string, uuid, required: Public ID of the allergy
  - `patient_id` string, uuid, required: Reference to the patient
  - `practitioner_id` string, uuid, nullable: Reference to the staff member who recorded the allergy
  - `allergen_name` string, required: Free-text name of the allergen
  - `allergen_type` 'medication' | 'food' | 'environmental' | 'other' | 'null', nullable: The classification of the allergen
  - `reaction` string, nullable: Free-text description of the reaction
  - `reaction_type` string, nullable: The classification of the reaction
  - `severity` 'severe' | 'moderate' | 'mild', required: Severity of the allergy
  - `onset_date` string, date, nullable: Date the allergy was first observed
  - `status` 'active' | 'inactive', required: Whether the allergy is currently active
  - `source` string, required: Origin of the allergy record (e.g. clinic_practitioner, patient_reported). Set server-side; not accepted from the request body.
  - `created_at` string, date-time, required: When the allergy record was created
  - `updated_at` string, date-time, required: When the allergy record was last updated

## Other responses

- `400`: The allergy was not created - validation error
- `401`: Unauthorized
- `403`: Forbidden - insufficient permissions
- `404`: Patient not found or endpoint not available
- `422`: The allergy validation failed

## Changes

- **2026-11-03** `01798f613a5e`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/jane/apis/jdp-api/changes/api/2026-01-01/medical-record/allergies/post.md)

---

[API](https://skmtc.dev/jane/apis/jdp-api.md) - [All operations](https://skmtc.dev/jane/apis/jdp-api/llms.txt) - [OpenAPI document](https://skmtc.dev/jane/apis/jdp-api/revisions/01798f613a5e?raw)
