Create new Task

POST {{url}}/{{tenantName}}/{{instanceName}}/tasks

Example overview

A new task is created with the name Patient Review with the description New Patient Profile Review and the priority URGENT and comment Lorem ipsum.... The task assigned to user with id 20eb246e-8099-4c7c-854c-5e0f9a366ddb. The task visible for users specified in the fields author, assignee, watchers (in our example, this is the same user). The task must be completed by May 20, 2021.

HTTP Request

Method: POST

Endpoint: {url}/{tenantName}/{instanceName}/tasks

in our example it would be: https://api.live.welkincloud.io/gh/sb-demo/tasks

Parameters

NameLocated inDescriptionRequiredType
tenantNamepathName of tenantYesstring
instanceNamepathName of instanceYesstring
namebodyShort name of the taskYesstring
descriptionbodyDetailed text description of the taskNostring
prioritybodytask priorityYesLOW, MEDIUM, HIGH, URGENT
statusbodytask statusYesTODO, IN_PROGRESS, COMPLETED, CANCELED
dueDatebodydeadline for the taskNoDatetime in ISO-8601 format
assigneebodyuser responsible for the taskYes{"id": ""}
patientbodytask-related patientNo{"id": ""}
watchersbodyusers subscribed to task notificationsNo[{"id": ""}]
commentsbodysimple text comments to taskNo[{"text": ""}]

Responses

CodeDescription
201Created
401Unauthorized
403Forbidden
404Not Found

Request Body

{"name"=>"New task", "description"=>"Create new patient profile", "dueDate"=>"2021-12-01T12:16:38.514Z", "status"=>"TODO", "priority"=>"URGENT", "assignee"=>{"id"=>"20eb246e-8099-4c7c-854c-5e0f9a366ddb"}, "templateName"=>"templateName"}