---
title: "Creates Task Resource"
method: POST
path: "/fhir/v2/Task"
tags: ["Tasks/Recalls"]
---

# Creates Task Resource

`POST /fhir/v2/Task`

## Request

- Base URL: `https://stage.ema-api.com/ema-dev/firm/apiportal/ema`
- URL: `https://stage.ema-api.com/ema-dev/firm/apiportal/ema/fhir/v2/Task`
- Auth: HTTP bearer and API key in header `x-api-key`

Creates a new EMA Task (Task.code is always assigned as a general EMA task; PM Recalls cannot be created through this endpoint). Required fields: `description` (must be in the form `<TaskType>: <reason>` — the prefix must be one of the values returned by `GET /fhir/v2/ValueSet/task-name` for the authenticated firm), `location` (a valid `Location/` reference), `priority` (`routine`, `urgent`, or `stat`), and at least one assignee in `input` — a `Practitioner/` reference for an individual, or a `CareTeam/` reference for a staff group. `type.text` (e.g. "Performer with Role: DOCTOR") is a free-text label describing the assignee; a `type.coding` is not required and does not appear in the created resource. `Task.status`, `Task.intent`, and `Task.requester` are not required in the request — EMA assigns them (new tasks start as `ready`/`order`; `requester` defaults to the practitioner associated with the API credentials used to create the task). `Task.for`, `Task.encounter`, and `Task.basedOn` are optional but validated if present — `basedOn` must reference a `ServiceRequest` that resolves to a lab request/order belonging to the authenticated firm. If including `Task.note[].time`, either every note must have a time or none may; note times must be non-decreasing.

## Request body

- FHIRJSONRESOURCE: A FHIR resource

## Response `200`

Success

- FHIRJSONRESOURCE: A FHIR resource

## Other responses

- `201`: Created
- `400`: BAD REQUEST - The request was bad, often due to a missing required parameter
- `401`: NOT AUTHORIZED - Authentication error; this token is not allowed access to the API
- `403`: FORBIDDEN
- `404`: NOT FOUND
- `422`: UNPROCESSABLE ENTITY - Request could not be processed; typically a validation error
- `429`: TOO MANY REQUESTS - Request was rate limited (1000 calls/min default); please retry
- `500`: SERVER ERROR - Internal Server Error

---

[API](https://skmtc.dev/modmed/apis/ema-proprietary-api.md) - [All operations](https://skmtc.dev/modmed/apis/ema-proprietary-api/llms.txt) - [OpenAPI document](https://skmtc.dev/modmed/apis/ema-proprietary-api/revisions/c03c1956a05d?raw)
