<< Return to help center
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

CreateEvent Function Definition

The CreateEvent function is used to add an event to your calendar. You can optionally attach contacts and other users to the event if you want.

When calling this function, the Function parameter sent to the API should be CreateEvent.

Parameters

Date - The date of the event. The format should be YYYY-MM-DD

StartTime - The start time of the event. The format should be hh:mm (24 hour format). Enter this in the local time based on the timezone set in your CRM account.

EndTime - The end time of the event. The format should be hh:mm (24 hour format). Enter this in the local time based on the timezone set in your CRM account.

Name - The name of the event.

Description - Optional. A text field for entering any other details about the event.

Contacts - Optional. An array with the Ids of the contacts you want to attach to the event. Here are instructions for finding the correct ContactId.

Users - Optional. And array with the Ids of the users that are attending the event. If you leave this parameter out, it will automatically be assigned to you. If you use this parameter, the event will only be assigned to you if you include your own Id in the array. Here are instructions for finding the correct UserId.

Example Code

This code shows you how to create an event using the API.

CODE: https://gist.github.com/tilikang/d1b9dc593568047ee72d60ffb2171916.js

Next up:
Keywords:
API, function, CreateEvent