Reminders

Setup reminders to send emails or trigger webhooks before or after a booking takes place.

This article will give you an overview of how to configure reminders on Timekit.
You can choose to setup reminders on app-level, project-level or simply directly when creating a booking.

Timekit currently operates with two types of reminders: emails and webhooks.

Email reminders

The easiest way to send reminder emails before or after a booking is to use the built-in reminder emails. If you prefer using your own emails, jump to the next section where we talk about using webhooks to achieve the same result.

The emails will look like this in the recipients inbox:

email example

Setting up an email-reminder to be send to the owner 15 minutes before a booking takes place looks like this:

{
  "type": "email",
  "settings": { 
    "recipient": "owner", 
    "subject": "Sales call in 15 mins!"
  },
  "when": {
    "type": "before", 
    "unit": "mins", 
    "time": 15
  }
}

Valid values for recipient are "owner" (the resource being booked) or "customer" (the person/email booking the resource).
Valid values for when.type are "before" (the booking begins) and "after" (the booking begins).
Valid values for when.unit are "secs", "mins" and "hours"

Webhook reminders

In addition to emails, you can also set up webhook reminders that will be triggered either before or after the booking begins. This is useful if you want to send your own emails, and just want to know when to send them.

Webhooks can be used for many other things than just reminders. Maybe you want to send out a questionnaire to your customers a day after the booking?

Setting up a webhook-reminder to be executed one hour after the booking starts looks like this:

{
	"type": "webhook",
  "settings": {
  	"url": "https://example.com/timekit-webhook",
  	"method": "post",
  	"expected_response_code": 201
  },
  "when": {
  	"type": "after",
  	"unit": "hours",
  	"time": 1
  }
}

Valid values for settings.method are "post" and "get".

The payload of the webhook request looks similar to the response you get when you [GET] the /bookings/:id endpoint.

App-level reminders

Setting up reminders on app-level is done through our admin interface: https://admin.timekit.io

Project-level reminders

Setting up reminders on a project is done by providing the 'reminders' attribute when creating or updating a project, like so:

curl --request PUT \
  --url https://api.timekit.io/v2/projects/<id> \
  --header 'Content-Type: application/json' \
  --user :test_api_key_nvHfRSlhvsnlg4rS7Wt28Ty47qdgegwSu3YK7hPW \
  --data '{
  "reminders": [
    {
    	"type":"email",
      "settings": { 
      	"recipient": "owner", 
        "subject": "Time for take-off!"
      },      
      "when": {
      	"type": "before", 
        "unit": "mins", 
        "time": 15
      }
    }
  ]
}'

Please note that you are not limited to one single reminder per project.