Create Event

POST {{url}}/{{tenantName}}/{{instanceName}}/calendar/events

Request to create an event in Calendar.

NOTE: It's required to fill eventColor, otherwise it will be white and not visible on Welkin UI.

For Appointments it should be eventColor: green and for Leave event eventColor: grey.

Event required fields

  • startDateTime
  • endDateTime
  • hostId
  • participants
  • participants.participantId
  • participants.participantRole
  1. HTTP Method: POST
  2. HTTP URL: https://api.live.welkincloud.io/gh/sb-demo/calendar/events

Request Params

KeyDatatypeRequiredDescription
viewerTimezonestring

Request Body

{"eventTitle"=>"Encounter event", "eventDescription"=>"", "startDateTime"=>"2022-10-21T14:00:00.000Z", "endDateTime"=>"2021-10-22T16:00:00.000Z", "eventType"=>"ENCOUNTER", "eventStatus"=>"SCHEDULED", "eventMode"=>"IN-PERSON", "eventColor"=>"Green", "hostId"=>"{{userId}}", "additionalInfo"=>{"location"=>"", "remarks"=>"", "attachment"=>""}, "participants"=>[{"attended"=>false, "deleted"=>nil, "firstName"=>nil, "hasAccess"=>nil, "lastName"=>nil, "participantId"=>"{{patientId}}", "participantRole"=>"patient", "participationStatus"=>""}, {"participantId"=>"{{userId}}", "participantRole"=>"psm", "attended"=>false}]}