By default, emails get sent out to owners and customers when bookings are created and move from state to state. Some emails take parameters, like a message, and you can choose to disable them if you'd like to handle communication yourself (e.g. with the help of webhooks).
Enabled by default
All emails are enabled by default and you have to manually disable them if you don't want to Timekit to send out any emails at all.
Disabling emails
Disabling emails is done by setting the app-setting "disable_emails" to true like so:
curl --request PUT \
--url https://api.timekit.io/v2/apps/back-to-the-future \
--header 'Content-Type: application/json' \
--user [email protected]:nvHfRSlhvsnlg4rS7Wt28Ty47qdgegwSu3YK7hPW \
--data '{
"settings": {
"disableEmail": true
}
}'
Invites
Invites are a google-specific thing that you might want to also disable along with emails. Whenever we create an event in a google calendar, we tell google to invite the participants(usually the customer doing requesting the booking) to the event. This means that google will send invitations so that the invitees can easily add the event to their own calendar.
To disable invites, you'll need to add the invite-setting in the event and set it to false, when you create a booking like so:
curl --request POST \
--url https://api.timekit.io/v2/bookings \
--header 'Content-Type: application/json' \
--user :live_api_key_7nzvc7wsBQQISLeFSVhROys9V1bUJ1z7 \
--data '{
"graph": "confirm_decline",
"action": "create",
"event": {
"start": "1955-11-12T21:30:00-07:00",
"end": "1955-11-12T22:15:00-07:00",
"what": "Catch the lightning",
"where": "Courthouse, Hill Valley, CA 95420, USA",
"calendar_id": "bfa0b9fa-36aa-4ae6-8096-f3b20fbed1d2",
"description": "The lightning strikes at 10:04 PM exactly! I need you to be there Doc!",
"invite": false,
},
"customer": {
"name": "Marty McFly",
"email": "[email protected]",
"phone": "(916) 555-4385",
"voip": "McFly",
"timezone": "America/Los_Angeles"
},
"settings": {
"allow_double_bookings": true
}
}'