Timekit developers

POST /calendars

Create calendar

You can create a new calendar for the current user by calling this endpoint.

If the user/resource has a connected Google account, then we will save the new calendar to Google. To get the calendar synced you need to use the [PUT] /calendars/:id endpoint to set the provider_sync flag to true.

Endpoint

POST https://api.timekit.io/v2/calendars

Parameters

Name In Type Required Default Description
name body string yes Name of the calendar
description body string yes Description of the calendar
backgroundcolor body string Hex color to use as background color for events in this calendar
foregroundcolor body string Hex color to use as foreground color for events in this calendar

Request examples

json
{
    "name": "Important encounters with Marty",
    "description": "Througout time, Marty and I really need to meet in order for the world not to collapse into Biffy cazyness",
    "foregroundcolor": "#000000",
    "backgroundcolor": "#FFFFFF"
}
curl
curl -X POST \
  -H 'Timekit-App: back-to-the-future' \
  -u doc.brown@timekit.io:nvHfRSlhvsnlg4rS7Wt28Ty47qdgegwSu3YK7hPW\
  -d '{
    "name": "Important encounters with Marty",
    "description": "Througout time, Marty and I really need to meet in order for the world not to collapse into Biffy cazyness",
    "foregroundcolor": "#000000",
    "backgroundcolor": "#FFFFFF"
	}' \
  https://api.timekit.io/v2/calendars 

Response examples

201

json
{
  "data": {
    "id": "bfa0b9fa-36aa-4ae6-8096-f3b20fbed1d2",
    "name": "Important encounters with Marty",
    "description": "Througout time, Marty and I really need to meet in order for the world not to collapse into Biffy cazyness",
    "foregroundcolor": "#000000",
    "backgroundcolor": "#FFFFFF",
    "provider_id": "my-calendar",
    "provider_access": "owner",
    "provider_primary": false,
    "provider_sync": false,
    "created_at": "2016-02-29T18:41:38+0100",
    "updated_at": "2016-06-02T23:00:03+0200"  }
}