NAV
cURL

Introduction

Welcome to the KalendMe's API! You can use our API endpoints to build your next platform and skip all scheduling headaches with a simple to use integration.

You can view code examples in the dark area to the right.

Authentication

To test authentication works, use this code:

# With shell, you can just pass the correct header with each request
curl "https://www.kalendme.com/api/v1/users" \
  -H "Authorization: Bearer abcdef123456"

Make sure to replace abcdef123456 with your API key.

KalendMe uses API keys to allow access to the API. You can get an API key by creating a free account and then heading over to settings to create an Organization.

KalendMe expects for the API key to be included in all API requests to the server in a header that looks like the following:

Authorization: Bearer abcdef123456

Users

User Resource

An example user model looks like this:

{
  "user": {
    "id": "123213232",
    "createdAt": "2020-09-01T00:00:00.000Z",
    "updatedAt": "2020-09-01T00:00:00.000Z",
    "name": "Jim Halpert",
    "email": "jim@dundermifflin.com",
    "urlString": "jim-123456",
    "timeZone": "America/New_York",
    "status": "ACTIVE",
    "weekAvailability": {
      "0": [ { "start": "00:00", "end": "00:00" } ],
      "1": [ { "start": "08:00", "end": "18:00" } ],
      "2": [ { "start": "08:00", "end": "18:00" } ],
      "3": [ { "start": "08:00", "end": "18:00" } ],
      "4": [ { "start": "08:00", "end": "18:00" } ],
      "5": [ { "start": "08:00", "end": "18:00" } ],
      "6": [ { "start": "08:00", "end": "18:00" } ],
    }
  }
}

Users are all users under your organization. Users are formed by the following fields.

Parameter Type Description
id string The resource's id
createdAt timestamp The resource's creation timesstamp
updatedAt timestamp The resource's last updated timestamp
email string The email of the user. Must be a valid email address.
name string The name of the user
language string The language of the user. We currently support only en (english), es (spanish) and pt (portuguese).
urlString string A globally unique URL for the user. Used for their bookings page such as kalendme.com/john-123. If none is specified, a random one will be generated on user creation.
timeZone string The time zone of the user. Must be a valid IANA time zone name such as America/New_York.
status string The status of the user. Can only be: ACTIVE or INVITED. Note that invited users do not affect your bill until they accept to join your organization.
weekAvailability WeekAvailability An object containing the user's week availability from Sunday [0] through Saturday [7] and each day's availability slots with a start and end times.

Create a User

curl "https://www.kalendme.com/api/v1/users?sendInvitationEmail=true" \
  -X POST
  -H "Authorization: Bearer abcdef123456"
  -H "Content-Type: application/json"
  -d '{
    "name": "Jim Halpert",
    "email": "jim@dundermifflin.com",
    "language": "en",
    "timeZone": "America/New_York"
  }'

The above command returns JSON structured like this:

{
  "user": {
    "id": "123213232",
    "createdAt": "2020-09-01T00:00:00.000Z",
    "updatedAt": "2020-09-01T00:00:00.000Z",
    "name": "Jim Halpert",
    "email": "jim@dundermifflin.com",
    "urlString": "jim-123456",
    "timeZone": "America/New_York",
    "weekAvailability": {
      "0": [ { "start": "00:00", "end": "00:00" } ],
      "1": [ { "start": "08:00", "end": "18:00" } ],
      "2": [ { "start": "08:00", "end": "18:00" } ],
      "3": [ { "start": "08:00", "end": "18:00" } ],
      "4": [ { "start": "08:00", "end": "18:00" } ],
      "5": [ { "start": "08:00", "end": "18:00" } ],
      "6": [ { "start": "08:00", "end": "18:00" } ],
    }
  }
}

This endpoint creates a new user under your organization.

HTTP Request

POST https://www.kalendme.com/api/v1/users

Body Parameters

Parameter Type Required Description
email string Required The email of the user. Must be a valid email address.
name string Optional The name of the user
language string Required The language of the user. We currently support only en (english), es (spanish) and pt (portuguese).
urlString string Optional A globally unique URL for the user. Used for their bookings page such as kalendme.com/john-123. If none is specified, a random one will be generated on user creation.
timeZone string Required The time zone of the user. Must be a valid IANA time zone name such as America/New_York.
weekAvailability WeekAvailability Optional An object containing the user's week availability from Sunday [0] through Saturday [7] and each day's availability slots with a start and end times.

URL Parameters

Parameter Type Description
sendInvitationEmail boolean Send the newly created user an invitation email on behalf of your organization to join your organization and configure their account.

Get All Users

curl "https://www.kalendme.com/api/v1/users" \
  -H "Authorization: Bearer abcdef123456"

The above command returns JSON structured like this:

{
  "users": [
    {
      "id": "123213233",
      "createdAt": "2020-09-01T00:00:00.000Z",
      "updatedAt": "2020-09-01T00:00:00.000Z",
      "name": "Michael Scott",
      "email": "michael@dundermifflin.com",
      "urlString": "michael-scott",
      "timeZone": "America/New_York",
      "weekAvailability": {
        "0": [ { "start": "00:00", "end": "00:00" } ],
        "1": [ { "start": "08:00", "end": "18:00" } ],
        "2": [ { "start": "08:00", "end": "18:00" } ],
        "3": [ { "start": "08:00", "end": "18:00" } ],
        "4": [ { "start": "08:00", "end": "18:00" } ],
        "5": [ { "start": "08:00", "end": "18:00" } ],
        "6": [ { "start": "08:00", "end": "18:00" } ],
      }
    },
    {
      "id": "123213232",
      "createdAt": "2020-09-01T00:00:00.000Z",
      "updatedAt": "2020-09-01T00:00:00.000Z",
      "name": "Pam Beesly",
      "email": "pam@dundermifflin.com",
      "urlString": "pam-beesly",
      "timeZone": "America/New_York",
      "weekAvailability": {
        "0": [ { "start": "00:00", "end": "00:00" } ],
        "1": [ { "start": "08:00", "end": "18:00" } ],
        "2": [ { "start": "08:00", "end": "18:00" } ],
        "3": [ { "start": "08:00", "end": "18:00" } ],
        "4": [ { "start": "08:00", "end": "18:00" } ],
        "5": [ { "start": "08:00", "end": "18:00" } ],
        "6": [ { "start": "08:00", "end": "18:00" } ],
      }
    },
  ]
}

This endpoint retrieves all users.

HTTP Request

GET https://www.kalendme.com/api/v1/users

Get a Specific User

curl "https://www.kalendme.com/api/v1/users/123213232" \
  -H "Authorization: Bearer abcdef123456"

The above command returns JSON structured like this:

{
  "user": {
    "id": "123213232",
    "createdAt": "2020-09-01T00:00:00.000Z",
    "updatedAt": "2020-09-01T00:00:00.000Z",
    "name": "Pam Beesly",
    "email": "pam@dundermifflin.com",
    "urlString": "pam-beesly",
    "timeZone": "America/New_York",
    "weekAvailability": {
      "0": [ { "start": "00:00", "end": "00:00" } ],
      "1": [ { "start": "08:00", "end": "18:00" } ],
      "2": [ { "start": "08:00", "end": "18:00" } ],
      "3": [ { "start": "08:00", "end": "18:00" } ],
      "4": [ { "start": "08:00", "end": "18:00" } ],
      "5": [ { "start": "08:00", "end": "18:00" } ],
      "6": [ { "start": "08:00", "end": "18:00" } ],
    }
  }
}

This endpoint retrieves a specific user.

HTTP Request

GET https://www.kalendme.com/api/v1/users/<userId>

URL Parameters

Parameter Type Required Description
userId string Required The ID of the user to retrieve

Update a User

curl "https://www.kalendme.com/api/v1/users" \
  -X PATCH
  -H "Authorization: Bearer abcdef123456"
  -H "Content-Type: application/json"
  -d '{
    "timeZone": "America/Los_Angeles"
  }'

The above command returns JSON structured like this:

{
  "user": {
    "id": "123213232",
    "createdAt": "2020-09-01T00:00:00.000Z",
    "updatedAt": "2020-09-01T00:00:00.000Z",
    "name": "Jim Halpert",
    "email": "jim@dundermifflin.com",
    "urlString": "jim-123456",
    "timeZone": "America/Los_Angeles",
    "weekAvailability": {
      "0": [ { "start": "00:00", "end": "00:00" } ],
      "1": [ { "start": "08:00", "end": "18:00" } ],
      "2": [ { "start": "08:00", "end": "18:00" } ],
      "3": [ { "start": "08:00", "end": "18:00" } ],
      "4": [ { "start": "08:00", "end": "18:00" } ],
      "5": [ { "start": "08:00", "end": "18:00" } ],
      "6": [ { "start": "08:00", "end": "18:00" } ],
    }
  }
}

This endpoint updates a user under your organization.

HTTP Request

PATCH https://www.kalendme.com/api/v1/users/<userId>

Body Parameters

Parameter Type Required Description
name string Optional The name of the user
language string Optional The language of the user. We currently support only en (english), es (spanish) and pt (portuguese).
urlString string Optional A globally unique URL for the user. Used for their bookings page such as kalendme.com/john-123.
timeZone string Optional The time zone of the user. Must be a valid IANA time zone name such as America/New_York.
weekAvailability WeekAvailability Optional An object containing the user's week availability from Sunday [0] through Saturday [7] and each day's availability slots with a start and end times.

URL Parameters

Parameter Type Required Description
userId string Required The ID of the user to update

Delete a Specific User

curl "https://www.kalendme.com/api/v1/users/123213232" \
  -X DELETE
  -H "Authorization: Bearer abcdef123456"

The above command returns JSON structured like this:

{
  "user": {
    "id": "123213232",
    "createdAt": "2020-09-01T00:00:00.000Z",
    "updatedAt": "2020-09-01T00:00:00.000Z",
    "name": "Pam Beesly",
    "email": "pam@dundermifflin.com",
    "urlString": "pam-beesly",
    "timeZone": "America/New_York",
    "weekAvailability": {
      "0": [ { "start": "00:00", "end": "00:00" } ],
      "1": [ { "start": "08:00", "end": "18:00" } ],
      "2": [ { "start": "08:00", "end": "18:00" } ],
      "3": [ { "start": "08:00", "end": "18:00" } ],
      "4": [ { "start": "08:00", "end": "18:00" } ],
      "5": [ { "start": "08:00", "end": "18:00" } ],
      "6": [ { "start": "08:00", "end": "18:00" } ],
    }
  }
}

This endpoint deletes a specific user from your organization.

HTTP Request

DELETE https://www.kalendme.com/api/v1/users/<userId>

URL Parameters

Parameter Type Required Description
userId string Required The ID of the user to delete

Calendar Accounts

Calendar Account Resource

An example calendar account model looks like this:

{
  "calendarAccount": {
    "id": "123213232",
    "userId": "123123123",
    "createdAt": "2020-09-01T00:00:00.000Z",
    "updatedAt": "2020-09-01T00:00:00.000Z",
    "type": "KALENDME",
    "nickname": "My Calendar"
  }
}

Calendar accounts belong to users, they are unique calendars that can contain several events and can be used to calculate a user's availability. Calendar accounts are needed if you want that user to use a KalendMe calendar without needing to connect their Google/Microsoft accounts. Calendar Accounts are formed by the following fields.

Parameter Type Description
id string The resource's id
createdAt timestamp The resource's creation timesstamp
updatedAt timestamp The resource's last updated timestamp
userId string The ID of the user that this calendar belongs to.
type string The type of the calendar account.
nickname string A description of the calendar account.

Create a Calendar Account

curl "https://www.kalendme.com/api/v1/users/123123123/calendar-accounts?linkCalendarAccountAsInput=true" \
  -X POST
  -H "Authorization: Bearer abcdef123456"
  -H "Content-Type: application/json"
  -d '{
    "nickname": "My Calendar"
  }'

The above command returns JSON structured like this:

{
  "calendarAccount": {
    "id": "123213232",
    "userId": "123123123",
    "createdAt": "2020-09-01T00:00:00.000Z",
    "updatedAt": "2020-09-01T00:00:00.000Z",
    "type": "KALENDME",
    "nickname": "My Calendar"
  }
}

This endpoint creates a new calendar account for a user.

HTTP Request

POST https://www.kalendme.com/api/v1/users/<userId>/calendar-accounts

Body Parameters

Parameter Type Required Description
nickname string Required A description of this user's calendar account.

URL Parameters

Parameter Type Required Description
userId string Required The id of the user this calendar account will belong to.
linkCalendarAccountAsInput boolean Optional Default: false This links the newly created calendar account to the user’s general availability. In other words, when you query for available date times, these calendar events will affect and block calendar times if there’s events present.
linkCalendarAccountAsOutput boolean Optional Default: false This links the newly created calendar account to be the user’s main calendar for creating events. All scheduled events will be created on this calendar account.

Get a user's Calendar Accounts

curl "https://www.kalendme.com/api/v1/users/123123123/calendar-accounts" \
  -H "Authorization: Bearer abcdef123456"

The above command returns JSON structured like this:

{
  "calendarAccounts": [
    {
      "id": "123213232",
      "userId": "123123123",
      "createdAt": "2020-09-01T00:00:00.000Z",
      "updatedAt": "2020-09-01T00:00:00.000Z",
      "type": "KALENDME",
      "nickname": "My Personal Calendar"
    },
    {
      "id": "123213232",
      "userId": "123123123",
      "createdAt": "2020-09-01T00:00:00.000Z",
      "updatedAt": "2020-09-01T00:00:00.000Z",
      "type": "KALENDME",
      "nickname": "My Work Calendar"
    }
  ]
}

This endpoint retrieves all calendar accounts for a user.

HTTP Request

GET https://www.kalendme.com/api/v1/users/<userId>/calendar-accounts

URL Parameters

Parameter Type Required Description
userId string Required The ID of the user's calendar accounts to retrieve

Get a Specific Calendar Account

curl "https://www.kalendme.com/api/v1/users/123123123/calendar-accounts/123213232" \
  -H "Authorization: Bearer abcdef123456"

The above command returns JSON structured like this:

{
  "calendarAccount": {
    "id": "123213232",
    "userId": "123123123",
    "createdAt": "2020-09-01T00:00:00.000Z",
    "updatedAt": "2020-09-01T00:00:00.000Z",
    "type": "KALENDME",
    "nickname": "My Calendar"
  }
}

This endpoint retrieves a specific calendar account for a user.

HTTP Request

GET https://www.kalendme.com/api/v1/users/<userId>/calendar-accounts/<calendarAccountId>

URL Parameters

Parameter Type Required Description
userId string Required The ID of the user's calendar accounts to retrieve
calendarAccountId string Required The ID of the calendar account to retrieve

User Event Types

DEPRECATED

User Event Type Resource

An example user event type model looks like this:

{
  "userEventType": {
    "id": "123213232",
    "createdAt": "2020-09-01T00:00:00.000Z",
    "updatedAt": "2020-09-01T00:00:00.000Z",
    "userId": "112323321",
    "title": "Quick Meeting",
    "durationMinutes": 30,
    "urlString": "quick-meeting",
    "description": "A quick session to catch up",
    "minimumNotice": 0,
    "active": true,
    "public": true,
    "weekAvailability": [],
    "customQuestions": [
      {
        "id": "3656475289d4aecd03804ec4d6045953", // An ID of your choosing to map to your system
        "order": 0,
        "question": "What's your phone number?"
      }
    ]
  }
}

User event types are the different types of events a user can have booked. They have pre-defined parameters like duration or specific minimum notice times. They can be accessed by a user's urlString followed by the User Event Type's urlString (example: kalendme.com/john/quick-meeting). User event types are formed by the following fields.

Parameter Type Description
id string The resource's id
createdAt timestamp The resource's creation timesstamp
updatedAt timestamp The resource's last updated timestamp
userId string The ID of the user that this event type belongs to.
title string The title of the event. For example, Interview
description string The description of the event
durationMinutes int Required
urlString string A unique URL for the user's event type. Used for their bookings page such as kalendme.com/john-123/event-type. If none is specified, a random one will be generated on user event type creation.
minimumNoticeMinutes int The minimum number of minutes notice for a user event type. For example, 120 if this event type requires a minimum of 2 hours of notice to be booked in advance.
enabled boolean Default: true Specifies whether this user event type is enabled or not. Disabled event types cannot be booked or found through their urlString
public boolean Default: true Specifies whether this user event type is public or not. Making an event non-public hides it from a user's main urlString.
weekAvailability WeekAvailability An object containing an override to the user's general avialability. A specific user event types's week availability from Sunday [0] through Saturday [7] and each day's availability slots with a start and end times.
customQuestions CustomQuestion[] An array containing custom questions to ask user's when booking this event type.

Create a User Event Type

curl "https://www.kalendme.com/api/v1/users/112323321/event-types" \
  -X POST
  -H "Authorization: Bearer abcdef123456"
  -H "Content-Type: application/json"
  -d '{
    "title": "Quick Meeting",
    "durationMinutes": 30,
    "urlString": "quick-meeting",
    "description": "A quick session to catch up",
    "weekAvailability": [],
    "customQuestions": [
      {
        "id": "3656475289d4aecd03804ec4d6045953", // An ID of your choosing to map to your system
        "order": 0,
        "question": "Whats your phone number?"
      }
    ]
  }'

The above command returns JSON structured like this:

{
  "userEventType": {
    "id": "123213232",
    "createdAt": "2020-09-01T00:00:00.000Z",
    "updatedAt": "2020-09-01T00:00:00.000Z",
    "userId": "112323321",
    "title": "Quick Meeting",
    "durationMinutes": 30,
    "urlString": "quick-meeting",
    "description": "A quick session to catch up",
    "minimumNotice": 0,
    "active": true,
    "public": true,
    "weekAvailability": [],
    "customQuestions": [
      {
        "id": "3656475289d4aecd03804ec4d6045953", // An ID of your choosing to map to your system
        "order": 0,
        "question": "What's your phone number?"
      }
    ]
  }
}

This endpoint creates a new event type for a user.

HTTP Request

POST https://www.kalendme.com/api/v1/users/<userId>/event-types

Body Parameters

Parameter Type Required Description
title string Required The title of the event. For example, Interview
description string Optional The description of the event. Can be blank.
durationMinutes int Required The duration in minutes of the event.
urlString string Optional A unique URL for the user's event type. Used for their bookings page such as kalendme.com/john-123/event-type. If none is specified, a random one will be generated on user event type creation.
minimumNoticeMinutes int Optional The minimum number of minutes notice for a user event type. For example, 120 if this event type requires a minimum of 2 hours of notice to be booked in advance.
enabled boolean Optional Default: true Specifies whether this user event type is enabled or not. Disabled event types cannot be booked or found through their urlString
public boolean Optional Default: true Specifies whether this user event type is public or not. Making an event non-public hides it from a user's main urlString.
weekAvailability Optional WeekAvailability An object containing an override to the user's general avialability. A specific user event types's week availability from Sunday [0] through Saturday [7] and each day's availability slots with a start and end times.
customQuestions Optional CustomQuestion[] An array containing custom questions to ask user's when booking this event type.

URL Parameters

Parameter Type Required Description
userId string Required The id of the user this event type will belong to.

Get a User's Event Types

curl "https://www.kalendme.com/api/v1/users/123213233/event-types" \
  -H "Authorization: Bearer abcdef123456"

The above command returns JSON structured like this:

{
  "userEventTypes": [
    {
      "id": "123213232",
      "createdAt": "2020-09-01T00:00:00.000Z",
      "updatedAt": "2020-09-01T00:00:00.000Z",
      "userId": "112323321",
      "title": "Quick Meeting",
      "durationMinutes": 30,
      "urlString": "quick-meeting",
      "description": "A quick session to catch up",
      "minimumNotice": 0,
      "active": true,
      "public": true,
      "weekAvailability": [],
      "customQuestions": [
        {
          "id": "3656475289d4aecd03804ec4d6045953", // An ID of your choosing to map to your system
          "order": 0,
          "question": "What's your phone number?"
        }
      ]
    }, // ...
  ]
}

This endpoint retrieves all user event types for a specific user.

HTTP Request

GET https://www.kalendme.com/api/v1/users/<userId>/event-types

URL Parameters

Parameter Type Required Description
userId string Required The id of the user these event types belong to.

Get a Specific User Event Type

curl "https://www.kalendme.com/api/v1/users/112323321/event-types/123213232" \
  -H "Authorization: Bearer abcdef123456"

The above command returns JSON structured like this:

{
  "userEventType": {
    "id": "123213232",
    "createdAt": "2020-09-01T00:00:00.000Z",
    "updatedAt": "2020-09-01T00:00:00.000Z",
    "userId": "112323321",
    "title": "Quick Meeting",
    "durationMinutes": 30,
    "urlString": "quick-meeting",
    "description": "A quick session to catch up",
    "minimumNotice": 0,
    "active": true,
    "public": true,
    "weekAvailability": [],
    "customQuestions": [
      {
        "id": "3656475289d4aecd03804ec4d6045953", // An ID of your choosing to map to your system
        "order": 0,
        "question": "What's your phone number?"
      }
    ]
  }
}

This endpoint retrieves a specific user's event type.

HTTP Request

GET https://www.kalendme.com/api/v1/users/<userId>/event-types/<eventTypeId>

URL Parameters

Parameter Type Required Description
userId string Required The id of the user this event type belong to.
eventTypeId string Required The id of the user event type.

Update a User Event Type

curl "https://www.kalendme.com/api/v1/users/112323321/event-types/123213232" \
  -X PATCH
  -H "Authorization: Bearer abcdef123456"
  -H "Content-Type: application/json"
  -d '{
    "public": false,
    "customQuestions: []
  }'
  -

The above command returns JSON structured like this:

{
  "userEventType": {
    "id": "123213232",
    "createdAt": "2020-09-01T00:00:00.000Z",
    "updatedAt": "2020-09-01T00:00:00.000Z",
    "userId": "112323321",
    "title": "Quick Meeting",
    "durationMinutes": 30,
    "urlString": "quick-meeting",
    "description": "A quick session to catch up",
    "minimumNotice": 0,
    "active": true,
    "public": false,
    "weekAvailability": [],
    "customQuestions": []
  }
}

This endpoint updates a user's event type.

HTTP Request

PATCH https://www.kalendme.com/api/v1/users/<userId>/event-types/<eventTypeId>

Body Parameters

Parameter Type Required Description
title string Optional The title of the event. For example, Interview
description string Optional The description of the event. Can be blank.
durationMinutes int Optional The duration in minutes of the event.
urlString string Optional A unique URL for the user's event type. Used for their bookings page such as kalendme.com/john-123/event-type. If none is specified, a random one will be generated on user event type creation.
minimumNoticeMinutes int Optional The minimum number of minutes notice for a user event type. For example, 120 if this event type requires a minimum of 2 hours of notice to be booked in advance.
enabled boolean Optional Specifies whether this user event type is enabled or not. Disabled event types cannot be booked or found through their urlString
public boolean Optional Specifies whether this user event type is public or not. Making an event non-public hides it from a user's main urlString.
weekAvailability Optional WeekAvailability An object containing an override to the user's general avialability. A specific user event types's week availability from Sunday [0] through Saturday [7] and each day's availability slots with a start and end times.
customQuestions Optional CustomQuestion[] An array containing custom questions to ask user's when booking this event type.

URL Parameters

Parameter Type Required Description
userId string Required The id of the user this event type belong to.
eventTypeId string Required The id of the user event type.

Delete a Specific User Event Type

curl "https://www.kalendme.com/api/v1/users/112323321/event-types/123213232" \
  -X DELETE
  -H "Authorization: Bearer abcdef123456"

The above command returns JSON structured like this:

{
  "userEventType": {
    "id": "123213232",
    "createdAt": "2020-09-01T00:00:00.000Z",
    "updatedAt": "2020-09-01T00:00:00.000Z",
    "userId": "112323321",
    "title": "Quick Meeting",
    "durationMinutes": 30,
    "urlString": "quick-meeting",
    "description": "A quick session to catch up",
    "minimumNotice": 0,
    "active": true,
    "public": false,
    "weekAvailability": [],
    "customQuestions": []
  }
}

This endpoint deletes a specific user event type.

HTTP Request

DELETE https://www.kalendme.com/api/v1/users/<userId>/event-types/<eventTypeId>

URL Parameters

Parameter Type Required Description
userId string Required The id of the user this event type belong to.
eventTypeId string Required The id of the user event type.

User Links

An example user link model looks like this:

{
  "link": {
    "id": "123213232",
    "createdAt": "2020-09-01T00:00:00.000Z",
    "updatedAt": "2020-09-01T00:00:00.000Z",
    "userId": "112323321",
    "title": "Quick Meeting",
    "durationMinutes": 30,
    "urlString": "quick-meeting",
    "description": "A quick session to catch up",
    "minimumNotice": 0,
    "active": true,
    "visible": true,
    "weekAvailability": [],
    "location": {
      "type": "ONLINE"
    },
    "padding": {
      "before": 10,
      "after": 10
    },
    "customQuestions": [
      {
        "id": "3656475289d4aecd03804ec4d6045953", // An ID of your choosing to map to your system
        "order": 0,
        "question": "What's your phone number?"
      }
    ]
  }
}

Links are the different types of events or rules that a user can be booked through. They have pre-defined parameters like duration or specific minimum notice times. They can be accessed by a user's urlString followed by the Link's urlString (example: kalendme.com/john/quick-meeting). Links are formed by the following fields.

Parameter Type Description
id string The resource's id
createdAt timestamp The resource's creation timesstamp
updatedAt timestamp The resource's last updated timestamp
userId string The ID of the user that this link belongs to
title string The title of the event this link will create. For example, Interview
description string The description of the event this link will create
durationMinutes int Required
urlString string A unique URL for the user's link. Used for their bookings page such as kalendme.com/john-123/link-url. If none is specified, a random one will be generated on link creation.
minimumNoticeMinutes int The minimum number of minutes notice required to book through this link. For example, 120 if this link type requires a minimum of 2 hours of notice to be booked in advance
enabled boolean Default: true Specifies whether this link is enabled or not. Disabled links cannot be booked or found through their urlString
visible boolean Default: true Specifies whether this link is visible or not. Making a link non-visible hides it from a user's main urlString.
weekAvailability WeekAvailability An object containing an override to the user's general avialability. A specific link's week availability from Sunday [0] through Saturday [7] and each day's availability slots with a start and end times.
customQuestions CustomQuestion[] An array containing custom questions to ask user's when booking this link.
padding EventPadding Used to specify if an event needs time padding before and/or after to be scheduled. Must be numbers in minutes of the padding needed and values can be anywhere between 0 and 180.
location EventLocation See Special Models definitions, this defines the event's location.
curl "https://www.kalendme.com/api/v1/users/112323321/links" \
  -X POST
  -H "Authorization: Bearer abcdef123456"
  -H "Content-Type: application/json"
  -d '{
    "title": "Quick Meeting",
    "durationMinutes": 30,
    "urlString": "quick-meeting",
    "description": "A quick session to catch up",
    "weekAvailability": [],
    "location": {
      "type": "ONLINE"
    },
    "padding": {
      "before": 10,
      "after": 10,
    },
    "customQuestions": [
      {
        "id": "3656475289d4aecd03804ec4d6045953", // An ID of your choosing to map to your system
        "order": 0,
        "question": "Whats your phone number?"
      }
    ]
  }'

The above command returns JSON structured like this:

{
  "link": {
    "id": "123213232",
    "createdAt": "2020-09-01T00:00:00.000Z",
    "updatedAt": "2020-09-01T00:00:00.000Z",
    "userId": "112323321",
    "title": "Quick Meeting",
    "durationMinutes": 30,
    "urlString": "quick-meeting",
    "description": "A quick session to catch up",
    "minimumNotice": 0,
    "active": true,
    "visible": true,
    "weekAvailability": [],
    "location": {
      "type": "ONLINE"
    },
    "padding": {
      "before": 10,
      "after": 10
    },
    "customQuestions": [
      {
        "id": "3656475289d4aecd03804ec4d6045953", // An ID of your choosing to map to your system
        "order": 0,
        "question": "What's your phone number?"
      }
    ]
  }
}

This endpoint creates a new link for a user.

HTTP Request

POST https://www.kalendme.com/api/v1/users/<userId>/links

Body Parameters

Parameter Type Required Description
title string Required The title of the event this link will create. For example, Interview
description string Optional The description of the event this link will create. Can be blank.
durationMinutes int Required The duration in minutes of the event this link will create.
urlString string Optional A unique URL for the user's link. Used for their bookings page such as kalendme.com/john-123/link-url. If none is specified, a random one will be generated on link creation.
minimumNoticeMinutes int Optional The minimum number of minutes notice required to book through this link. For example, 120 if this link type requires a minimum of 2 hours of notice to be booked in advance.
enabled boolean Optional Default: true Specifies whether this link is enabled or not. Disabled links cannot be booked or found through their urlString
visible boolean Optional Default: true Specifies whether this link is visible or not. Making a link non-visible hides it from a user's main urlString.
weekAvailability Optional WeekAvailability An object containing an override to the user's general avialability. A specific link's week availability from Sunday [0] through Saturday [7] and each day's availability slots with a start and end times.
customQuestions Optional CustomQuestion[] An array containing custom questions to ask user's when booking through this link.

URL Parameters

Parameter Type Required Description
userId string Required The id of the user this link will belong to.
curl "https://www.kalendme.com/api/v1/users/123213233/links" \
  -H "Authorization: Bearer abcdef123456"

The above command returns JSON structured like this:

{
  "links": [
    {
      "id": "123213232",
      "createdAt": "2020-09-01T00:00:00.000Z",
      "updatedAt": "2020-09-01T00:00:00.000Z",
      "userId": "112323321",
      "title": "Quick Meeting",
      "durationMinutes": 30,
      "urlString": "quick-meeting",
      "description": "A quick session to catch up",
      "minimumNotice": 0,
      "active": true,
      "visible": true,
      "weekAvailability": [],
      "location": {
        "type": "ONLINE"
      },
      "customQuestions": [
        {
          "id": "3656475289d4aecd03804ec4d6045953", // An ID of your choosing to map to your system
          "order": 0,
          "question": "What's your phone number?"
        }
      ]
    } // ...
  ]
}

This endpoint retrieves all user links for a specific user.

HTTP Request

GET https://www.kalendme.com/api/v1/users/<userId>/links

URL Parameters

Parameter Type Required Description
userId string Required The id of the user these links belong to.
curl "https://www.kalendme.com/api/v1/users/112323321/links/123213232" \
  -H "Authorization: Bearer abcdef123456"

The above command returns JSON structured like this:

{
  "userEventType": {
    "id": "123213232",
    "createdAt": "2020-09-01T00:00:00.000Z",
    "updatedAt": "2020-09-01T00:00:00.000Z",
    "userId": "112323321",
    "title": "Quick Meeting",
    "durationMinutes": 30,
    "urlString": "quick-meeting",
    "description": "A quick session to catch up",
    "minimumNotice": 0,
    "active": true,
    "visible": true,
    "weekAvailability": [],
    "location": {
      "type": "ONLINE"
    },
    "padding": {
      "before": 10,
      "after": 10
    },
    "customQuestions": [
      {
        "id": "3656475289d4aecd03804ec4d6045953", // An ID of your choosing to map to your system
        "order": 0,
        "question": "What's your phone number?"
      }
    ]
  }
}

This endpoint retrieves a specific user's link.

HTTP Request

GET https://www.kalendme.com/api/v1/users/<userId>/links/<linkId>

URL Parameters

Parameter Type Required Description
userId string Required The id of the user this link belong to.
linkId string Required The id of the user link.
curl "https://www.kalendme.com/api/v1/users/112323321/links/123213232" \
  -X PATCH
  -H "Authorization: Bearer abcdef123456"
  -H "Content-Type: application/json"
  -d '{
    "visible": false,
    "customQuestions: []
  }'
  -

The above command returns JSON structured like this:

{
  "userEventType": {
    "id": "123213232",
    "createdAt": "2020-09-01T00:00:00.000Z",
    "updatedAt": "2020-09-01T00:00:00.000Z",
    "userId": "112323321",
    "title": "Quick Meeting",
    "durationMinutes": 30,
    "urlString": "quick-meeting",
    "description": "A quick session to catch up",
    "minimumNotice": 0,
    "active": true,
    "visible": false,
    "location": {
      "type": "ONLINE"
    },
    "padding": {
      "before": 10,
      "after": 10
    },
    "weekAvailability": [],
    "customQuestions": []
  }
}

This endpoint updates a user's link.

HTTP Request

PATCH https://www.kalendme.com/api/v1/users/<userId>/links/<linkId>

Body Parameters

Parameter Type Required Description
title string Optional The title of the event. For example, Interview
description string Optional The description of the event. Can be blank.
durationMinutes int Optional The duration in minutes of the event.
urlString string Optional A unique URL for the user's link. Used for their bookings page such as kalendme.com/john-123/event-type. If none is specified, a random one will be generated on user link creation.
minimumNoticeMinutes int Optional The minimum number of minutes notice required to book through this link. For example, 120 if this link type requires a minimum of 2 hours of notice to be booked in advance
enabled boolean Optional Specifies whether this user link is enabled or not. Disabled links cannot be booked or found through their urlString
visible boolean Optional Specifies whether this user link is visible or not. Making an event non-visible hides it from a user's main urlString.
weekAvailability Optional WeekAvailability An object containing an override to the user's general avialability. A specific user link's week availability from Sunday [0] through Saturday [7] and each day's availability slots with a start and end times.
customQuestions Optional CustomQuestion[] An array containing custom questions to ask user's when booking through this link.

URL Parameters

Parameter Type Required Description
userId string Required The id of the user this link belong to.
linkId string Required The id of the user link.
curl "https://www.kalendme.com/api/v1/users/112323321/links/123213232" \
  -X DELETE
  -H "Authorization: Bearer abcdef123456"

The above command returns JSON structured like this:

{
  "userEventType": {
    "id": "123213232",
    "createdAt": "2020-09-01T00:00:00.000Z",
    "updatedAt": "2020-09-01T00:00:00.000Z",
    "userId": "112323321",
    "title": "Quick Meeting",
    "durationMinutes": 30,
    "urlString": "quick-meeting",
    "description": "A quick session to catch up",
    "minimumNotice": 0,
    "active": true,
    "visible": false,
    "location": {
      "type": "ONLINE"
    },
    "padding": {
      "before": 10,
      "after": 10
    },
    "weekAvailability": [],
    "customQuestions": []
  }
}

This endpoint deletes a specific user link.

HTTP Request

DELETE https://www.kalendme.com/api/v1/users/<userId>/links/<linkId>

URL Parameters

Parameter Type Required Description
userId string Required The id of the user this link belong to.
linkId string Required The id of the user link.

User Availability

General booking endpoints to consult user's availaibilities.

Get a User's Availability

curl "https://www.kalendme.com/api/v1/users/123123/availability?month=10&year=2021&durationMinutes=30" \
  -X GET
  -H "Authorization: Bearer abcdef123456"

The above command returns JSON structured like this:

{
  "availableDateTimes": [
    1234567890000, // Timestamps in epoch milliseconds
    1234567890000,
    1234567890000
  ],
  "potentialAvailableDateTimes": [
    // When passing the optional flag `includePotentialAvailableDateTimes`
    1234567890000, // Timestamps in epoch milliseconds
    1234567890000,
    1234567890000
  ]
}

This endpoint returns a user's general availability for the requrested month, year and duration in minutes.

HTTP Request

GET https://www.kalendme.com/api/v1/users/<userId>/availability

URL Parameters

Parameter Type Required Description
userId string Required The id of the user.
startTimestamp int Required The start timestamp in epoch milliseconds to start the query for.
endTimestamp int Required The end timestamp in epoch milliseconds to start the query for. It cannot span for more than a month.
durationMinutes int Required The duration of the session you want to schedule this user.
timeZone int Required The time zone you want to get the availability for.
year int Optional Instead of querying a specific startTimestamp and endTimestamp you can pass in a year and month.
month int Optional Instead of querying a specific startTimestamp and endTimestamp you can pass in a year and month.
includePotentialAvailableDateTimes boolean Optional Output an optional array of what would be all the potential available date times for a user if they did not have any events.
curl "https://www.kalendme.com/api/v1/users/123123/links/654654/availability?month=10&year=2021" \
  -X GET
  -H "Authorization: Bearer abcdef123456"

The above command returns JSON structured like this:

{
  "availableDateTimes": [
    1234567890000, // Timestamps in epoch milliseconds
    1234567890000,
    1234567890000
  ],
  "potentialAvailableDateTimes": [
    // When passing the optional flag `includePotentialAvailableDateTimes`
    1234567890000, // Timestamps in epoch milliseconds
    1234567890000,
    1234567890000
  ]
}

This endpoint returns a user's specific link's availability for the requested month and year.

HTTP Request

GET https://www.kalendme.com/api/v1/users/<userId>/links/<linkId>/availability

URL Parameters

Parameter Type Required Description
userId string Required The id of the user.
startTimestamp int Required The start timestamp in epoch milliseconds to start the query for.
endTimestamp int Required The end timestamp in epoch milliseconds to start the query for. It cannot span for more than a month.
durationMinutes int Required The duration of the session you want to schedule this user.
timeZone int Required The time zone you want to get the availability for.
year int Optional Instead of querying a specific startTimestamp and endTimestamp you can pass in a year and month.
month int Optional Instead of querying a specific startTimestamp and endTimestamp you can pass in a year and month.
includePotentialAvailableDateTimes boolean Optional Output an optional array of what would be all the potential available date times for a user if they did not have any events.

Calendar Events

Calendar Event Resource

An example calendar event model looks like this:

{
  "calendarEvent": {
    "id": "123213232",
    "userId": "123123123",
    "createdAt": "2020-09-01T00:00:00.000Z",
    "updatedAt": "2020-09-01T00:00:00.000Z",
    "title": "Quick Meeting",
    "description": "Let's discuss a quick topic",
    "startTimestamp": 1634099600000,
    "startTimeUtc": "2020-09-01T00:00:00.000Z",
    "durationMinutes": 30,
    "location": "https://myvideoconferencing.com/my-link"
    "guests": [
      "michael@dundermifflin.com"
    ],
    "mainGuestName": "Pam Beesly",
    "mainGuestTimeZone": "America/New_York",
    "mainGuestLanguage": "en",
    "status": "CONFIRMED"
  }
}

Calendar events belong to users, they are unique instances in time that a user is booked for. Having a calendar event blocks that user's availability for the duration of the event. Calendar Events are formed by the following fields.

Parameter Type Description
id string The resource's id
createdAt timestamp The resource's creation timesstamp
updatedAt timestamp The resource's last updated timestamp
userId string The ID of the user that this calendar event belongs to.
title string The title of the event. For example, Interview
description string The description of the event
startTimestamp long The timestamp in epoch milliseconds of when this event starts
durationMinutes int The duration in minutes of the event
guests string[] An array of the guest's emails for this event
mainGuestName string The name of the person that booked the event
mainGuestTimeZone string The time zone of the person that booked the event
mainGuestLanguage string The language of the person that booked the event
status string The status of the event. Can be CONFIRMED or CANCELLED.
padding EventPadding Used to specify if an event needs time padding before and/or after to be scheduled. Must be numbers in minutes of the padding needed and values can be anywhere between 0 and 180.
location EventLocation See Special Models definitions, this defines the event's location.

Create a Calendar Event

curl "https://www.kalendme.com/api/v1/users/123123123/calendar-events?sendGuestNotificationEmails=true" \
  -X POST
  -H "Authorization: Bearer abcdef123456"
  -H "Content-Type: application/json"
  -d '{
    "title": "Quick Meeting",
    "startTimestamp": 1634099600000,
    "durationMinutes": 30,
    "guests": [
      "michael@dundermifflin.com"
    ],
    "mainGuestName": "Pam Beesly",
    "mainGuestTimeZone": "America/New_York",
    "mainGuestLanguage": "en"
  }'

The above command returns JSON structured like this:

{
  "calendarEvent": {
    "id": "123213232",
    "userId": "123123123",
    "createdAt": "2020-09-01T00:00:00.000Z",
    "updatedAt": "2020-09-01T00:00:00.000Z",
    "title": "Quick Meeting",
    "description": "Let's discuss a quick topic",
    "startTimestamp": 1634099600000,
    "startTimeUtc": "2020-09-01T00:00:00.000Z",
    "durationMinutes": 30,
    "guests": ["michael@dundermifflin.com"],
    "mainGuestName": "Pam Beesly",
    "mainGuestTimeZone": "America/New_York",
    "mainGuestLanguage": "en",
    "status": "CONFIRMED",
    "location": {
      "type": "other"
    }
  }
}

This endpoint creates a new calendar event for a user. In other words, it books that user during that time. To control which calendar account this event is written to, you have to configure that user's output calendar account connection.

HTTP Request

POST https://www.kalendme.com/api/v1/users/<userId>/calendar-events

Body Parameters

Parameter Type Required Description
title string Required The title of the event. For example, Interview
startTimestamp long Required The timestamp in epoch milliseconds of when this event starts
durationMinutes int Required The duration in minutes of the event
guests string[] Required An array of the guest's emails for this event
mainGuestName string Required The name of the person that booked the event
mainGuestTimeZone string Required The time zone of the person that booked the event
mainGuestLanguage string Required The language of the person that booked the event
description string Optional The description of the event
location EventLocation Optional The location of this event
padding EventPadding Optional Any padding needed before or after scheduling this event

URL Parameters

Parameter Type Required Description
userId string Required The id of the user this calendar event will belong to.
sendGuestNotificationEmails boolean Optional Default: false Whether you want to send an email notification that this event was created to the guests.
sendOrganizerNotificationEmail boolean Optional Default: false Whether you want to send an email notification that this event was created to the event organizer (the user who's userId you're booking).
linkId string Optional Default: null If you want to apply an event's padding rules from a link, use this to specify which one

Get a Calendar Event

curl "https://www.kalendme.com/api/v1/users/123123123/calendar-events/123213232" \
  -H "Authorization: Bearer abcdef123456"

The above command returns JSON structured like this:

{
  "calendarEvent": {
    "id": "123213232",
    "userId": "123123123",
    "createdAt": "2020-09-01T00:00:00.000Z",
    "updatedAt": "2020-09-01T00:00:00.000Z",
    "title": "Quick Meeting",
    "description": "Let's discuss a quick topic",
    "startTimestamp": 1634099600000,
    "startTimeUtc": "2020-09-01T00:00:00.000Z",
    "durationMinutes": 30,
    "guests": ["michael@dundermifflin.com"],
    "mainGuestName": "Pam Beesly",
    "mainGuestTimeZone": "America/New_York",
    "mainGuestLanguage": "en",
    "status": "CONFIRMED",
    "location": {
      "type": "other"
    }
  }
}

This endpoint gets a specific calendar event for a user.

HTTP Request

GET https://www.kalendme.com/api/v1/users/<userId>/calendar-events/<eventId>

URL Parameters

Parameter Type Required Description
userId string Required The ID of the user's calendar event to retrieve
eventId string Required The ID of the calendar event to retrieve

Get Calendar Events between timestamps

curl "https://www.kalendme.com/api/v1/users/123123123/calendar-events?startTimestamp=0&endTimestamp=100000" \
  -H "Authorization: Bearer abcdef123456"

The above command returns JSON structured like this:

{
  "calendarEvents": [
    {
      "id": "123213232",
      "userId": "123123123",
      "createdAt": "2020-09-01T00:00:00.000Z",
      "updatedAt": "2020-09-01T00:00:00.000Z",
      "title": "Quick Meeting",
      "description": "Let's discuss a quick topic",
      "startTimestamp": 1634099600000,
      "startTimeUtc": "2020-09-01T00:00:00.000Z",
      "durationMinutes": 30,
      "guests": ["michael@dundermifflin.com"],
      "mainGuestName": "Pam Beesly",
      "mainGuestTimeZone": "America/New_York",
      "mainGuestLanguage": "en",
      "status": "CONFIRMED",
      "location": {
        "type": "other"
      }
    } // ...
  ]
}

This endpoint gets a list of calendar events for a user between a start and an end timestamp.

HTTP Request

GET https://www.kalendme.com/api/v1/users/<userId>/calendar-events?startTimestamp=&endTimestamp=

URL Parameters

Parameter Type Required Description
userId string Required The ID of the user's calendar event to retrieve
startTimestamp int Required The start timestamp in epoch milliseconds to start the query for.
endTimestamp int Required The end timestamp in epoch milliseconds to start the query for. It cannot span for more than a month.

Update a Calendar Event

curl "https://www.kalendme.com/api/v1/users/123123123/calendar-events/123213232" \
  -X PATCH
  -H "Authorization: Bearer abcdef123456"
  -H "Content-Type: application/json"
  -d '{
    "status": "CANCELLED"
  }'

The above command returns JSON structured like this:

{
  "calendarEvent": {
    "id": "123213232",
    "userId": "123123123",
    "createdAt": "2020-09-01T00:00:00.000Z",
    "updatedAt": "2020-09-01T00:00:00.000Z",
    "title": "Quick Meeting",
    "description": "Let's discuss a quick topic",
    "startTimestamp": 1634099600000,
    "startTimeUtc": "2020-09-01T00:00:00.000Z",
    "durationMinutes": 30,
    "guests": ["michael@dundermifflin.com"],
    "mainGuestName": "Pam Beesly",
    "mainGuestTimeZone": "America/New_York",
    "mainGuestLanguage": "en",
    "status": "CANCELLED",
    "location": {
      "type": "other"
    }
  }
}

This endpoint updates a calendar event. Used for rescheduling or cancelling calendar events.

HTTP Request

PATCH https://www.kalendme.com/api/v1/users/<userId>/calendar-events/<eventId>

Body Parameters

Parameter Type Required Description
title string Optional The title of the event. For example, Interview
description string Optional The description of the event
startTimestamp long Optional The timestamp in epoch milliseconds of when this event starts
durationMinutes int Optional The duration in minutes of the event
guests string[] Optional An array of the guest's emails for this event
status string Optional The status of the event. Can be CONFIRMED or CANCELLED.

URL Parameters

Parameter Type Required Description
userId string Required The ID of the user's calendar event to update
eventId string Required The ID of the calendar event to update

Webhooks

Overview

Webhooks are used to keep your system up to date with KalendMe's information in real-time. You can configure which system events from KalendMe you want to subscribe to so that you can take action on your side with the information provided.

These are signed POST requests to a url of your choosing.

Webhook Event Types

Event Type Description Resource Data
user.acceptedInvite Event fired when a user joins the organization (accepts an invitation to join) User
event.created Event fired when an event is created Event
event.cancelled Event fired when an event is cancelled Event

General Body Structure

An example webhook's POST body looks like this:

{
  "id": "123213232",
  "createdAt": "2020-09-01T00:00:00.000Z",
  "type": "event.created",
  "data": {
    "id": "123",
    "userId": "321",
    "createdAt": "2020-09-01T00:00:00.000Z",
    "updatedAt": "2020-09-01T00:00:00.000Z",
    "title": "Quick Meeting",
    "description": "Let's discuss a quick topic",
    "startTimestamp": 1634099600000,
    "durationMinutes": 30,
    "guests": [
      "michael@dundermifflin.com"
    ],
    "mainGuestName": "Pam Beesly",
    "mainGuestTimeZone": "America/New_York",
    "mainGuestLanguage": "en",
    "status": "CONFIRMED"
  }
}

Webhooks are POST requests to your systems. All of KalendMe's requests will come in the shown format with a Content-Type: application/json and the following body structure describing the type of the webhook event and the data.

Security

Sample code snippet to verify an incoming webhook in javascript:

import { createHash, timingSafeEqual } from 'crypto'

// Your server's endpoint receiving the request
export default async function(req, res) {
 const hashedBody = createHash('sha256')
   .update(`${req.body}${process.env.KALENDME_WEBHOOK_SECRET}`)
   .digest('hex')

 if (!timingSafeEqual(hashedBody, req.headers['Kalendme-Signature'])) {
   res.status(401).end()
   return
 }

 // proceed with the processing of the webhook
}

You’ll be provided with a webhook secret on account setup which you’ll use to calculate a hash to compare against the signature of every webhook.

All webhooks will come with a signature header: Kalendme-Signature

That signature has to be compared to the received body of the event.

Webhook Resource

An example webhook resource looks like this:

{
  "webhook": {
    "id": "123213232",
    "createdAt": "2020-09-01T00:00:00.000Z",
    "updatedAt": "2020-09-01T00:00:00.000Z",
    "url": "https://yourdomain.com/my-endpoint",
    "enabledEvents": [ 
      "event.created"
    ],
    "description": "My Webhook",
    "enabled": true
  }
}

Webhooks are all under your organization. Webhooks are formed by the following fields.

Parameter Type Description
id string The resource's id
createdAt timestamp The resource's creation timesstamp
updatedAt timestamp The resource's last updated timestamp
url string The url of your endpoint that will listen to events coming in
enabledEvents string[] An array containing the webhook event types you want to subscribe to
decription string A description of ths webhook
enabled boolean Controls whether this webhook actually emits events or not

Create a Webhook

curl "https://www.kalendme.com/api/v1/webhooks" \
  -X POST
  -H "Authorization: Bearer abcdef123456"
  -H "Content-Type: application/json"
  -d '{
    "url": "https://yourdomain.com/my-endpoint",
    "enabledEvents": [ 
      "event.created"
    ],
    "description": "My Webhook"
  }'

The above command returns JSON structured like this:

{
  "webhook": {
    "id": "123213232",
    "createdAt": "2020-09-01T00:00:00.000Z",
    "updatedAt": "2020-09-01T00:00:00.000Z",
    "url": "https://yourdomain.com/my-endpoint",
    "enabledEvents": [ 
      "event.created"
    ],
    "description": "My Webhook",
    "enabled": true
  }
}

This endpoint creates a new webhook under your organization.

HTTP Request

POST https://www.kalendme.com/api/v1/webhooks

Body Parameters

Parameter Type Required Description
url string Required The url of your endpoint that will listen to events coming in
enabledEvents string[] Required An array containing the webhook event types you want to subscribe to
decription string Optional A description of ths webhook
enabled boolean Optional Default: true Controls whether this webhook actually emits events or not

Get All Webhooks

curl "https://www.kalendme.com/api/v1/webhooks" \
  -H "Authorization: Bearer abcdef123456"

The above command returns JSON structured like this:

{
  "webhooks": [
    {
      "id": "123213232",
      "createdAt": "2020-09-01T00:00:00.000Z",
      "updatedAt": "2020-09-01T00:00:00.000Z",
      "url": "https://yourdomain.com/my-endpoint",
      "enabledEvents": [ 
        "event.created"
      ],
      "description": "My Webhook",
      "enabled": true
    },
    {
      "id": "123213233",
      "createdAt": "2020-09-01T00:00:00.000Z",
      "updatedAt": "2020-09-01T00:00:00.000Z",
      "url": "https://yourdomain.com/my-endpoint-2",
      "enabledEvents": [ 
        "event.cancelled"
      ],
      "description": "My Cancelled Events Webhook",
      "enabled": true
    }
  ]
}

This endpoint retrieves all webhooks for your organization.

HTTP Request

GET https://www.kalendme.com/api/v1/webhooks

Get a Specific Webhook

curl "https://www.kalendme.com/api/v1/webhooks/123213232" \
  -H "Authorization: Bearer abcdef123456"

The above command returns JSON structured like this:

{
  "webhook": {
    "id": "123213232",
    "createdAt": "2020-09-01T00:00:00.000Z",
    "updatedAt": "2020-09-01T00:00:00.000Z",
    "url": "https://yourdomain.com/my-endpoint",
    "enabledEvents": [ 
      "event.created"
    ],
    "description": "My Webhook",
    "enabled": true
  }
}

This endpoint retrieves a specific webhook.

HTTP Request

GET https://www.kalendme.com/api/v1/webhooks/<webhookId>

URL Parameters

Parameter Type Required Description
webhookId string Required The ID of the webhook to retrieve

Get a Webhook's Logs

curl "https://www.kalendme.com/api/v1/webhooks/123213232/logs" \
  -H "Authorization: Bearer abcdef123456"

The above command returns JSON structured like this:

{ 
  "webhookEventsLogs": [
    {
      "createdAt": "2020-09-01T00:00:00.000Z",
      "updatedAt": "2020-09-01T00:00:00.000Z",
      "webhookId": "12312313",
      "statusCode": 200,
      "requestData": {
        "id": "310675722544874052",
        "createdAt": "2021-09-25T00:58:26.866-03:00",
        "type": "event.created",
        "data": {
          "id": "310663991379624516",
          "startTimestamp": 1633834800000,
          "title": "Test Event",
          "durationMinutes": 30,
          "guests": [
            "raimille2@gmail.com"
          ],
          "mainGuestTimeZone": "America/Sao_Paulo",
          "mainGuestName": "Rai",
          "mainGuestLanguage": "es",
          "status": "CONFIRMED"
        }
      },
      "responseText": "",
      "responseJson": {},
      "id": "123123"
    }
  ]
}

This endpoint retrieves a specific webhook's logs. Contains response status code, text and json contents if available.

Webhook Event Log Resource

Parameter Type Description
id string The resource's id
createdAt timestamp The resource's creation timesstamp
updatedAt timestamp The resource's last updated timestamp
webhookId string The id of the webhook this log entry belongs to
statusCode int The http status code your system replied with when this event was emitted
requestData string The JSON data sent over to your system with this event
responseJson object The JSON response from your system if replied with content type of application/json
responseText string The TEXT response from your system if replied with content type other than application/json

HTTP Request

GET https://www.kalendme.com/api/v1/webhooks/<webhookId>/logs

URL Parameters

Parameter Type Required Description
webhookId string Required The ID of the webhook to retrieve

Update a Webhook

curl "https://www.kalendme.com/api/v1/webhooks/123213232" \
  -X PATCH
  -H "Authorization: Bearer abcdef123456"
  -H "Content-Type: application/json"
  -d '{
    "enabled": false
  }'

The above command returns JSON structured like this:

{
  "webhook": {
    "id": "123213232",
    "createdAt": "2020-09-01T00:00:00.000Z",
    "updatedAt": "2020-09-01T00:00:00.000Z",
    "url": "https://yourdomain.com/my-endpoint",
    "enabledEvents": [ 
      "event.created"
    ],
    "description": "My Webhook",
    "enabled": false
  }
}

This endpoint updates a webhook under your organization. Used to switch out the url or disable it by setting the enabled flag to false.

HTTP Request

PATCH https://www.kalendme.com/api/v1/webhooks/<webhookId>

Body Parameters

Parameter Type Required Description
url string Optional The url of your endpoint that will listen to events coming in
enabledEvents string[] Optional An array containing the webhook event types you want to subscribe to
decription string Optional A description of ths webhook
enabled boolean Optional Controls whether this webhook actually emits events or not

URL Parameters

Parameter Type Required Description
webhookId string Required The ID of the webhook to update

Delete a Specific Webhook

curl "https://www.kalendme.com/api/v1/webhooks/123213232" \
  -X DELETE
  -H "Authorization: Bearer abcdef123456"

The above command returns JSON structured like this:

{
  "webhook": {
    "id": "123213232",
    "createdAt": "2020-09-01T00:00:00.000Z",
    "updatedAt": "2020-09-01T00:00:00.000Z",
    "url": "https://yourdomain.com/my-endpoint",
    "enabledEvents": [ 
      "event.created"
    ],
    "description": "My Webhook",
    "enabled": false
  }
}

This endpoint deletes a specific webhook from your organization.

HTTP Request

DELETE https://www.kalendme.com/api/v1/webhooks/<webhookId>

URL Parameters

Parameter Type Required Description
webhookId string Required The ID of the webhook to delete

Time Zones

Overview

Time zones are a critical component for scheduling. KalendMe provides this endpoint to be able to always be up to date with the latest IANA time zone DB.

Current version: 2022a

Get Time Zones

curl "https://www.kalendme.com/api/v1/time-zones" \
  -H "Authorization: Bearer abcdef123456"

The above command returns JSON structured like this:

{
  "timeZones": [
        "Africa/Algiers",
        "Atlantic/Cape_Verde",
        "Africa/Ndjamena",
        "Africa/Abidjan",
        "Africa/Accra",
    ....
  ]
}

Special Models

These are common special models across our API.

Week Availability

{
  "weekAvailability": {
    "0": [{ "start": "00:00", "end": "00:00" }], // Sunday -- Not availabile
    "1": [{ "start": "08:00", "end": "18:00" }], // Monday
    "2": [{ "start": "08:00", "end": "18:00" }], // Tuesday
    "3": [{ "start": "08:00", "end": "18:00" }], // Wednesday
    "4": [{ "start": "08:00", "end": "18:00" }], // Thursday
    "5": [{ "start": "08:00", "end": "18:00" }], // Friday
    "6": [{ "start": "08:00", "end": "18:00" }] // Saturday -- Not availabile
  }
}

Used to describe a user's or an event's week availability. 0 through 6 represent the days of the week starting on sunday. All times are represented in local time to the user's configured time zone.

Custom Question

{
  "id": "3656475289d4aecd03804ec4d6045953", // An ID of your choosing to map to your system
  "order": 0,
  "question": "Whats your phone number?"
}

Used for specific user event types as questions for guests to fill out. They have an id, order in which to display to the user and the question itself.

Event Location

{
  "type": "phone", // Other types can be `online`, `zoom`, `inPerson`, `other`
  "value": "+1234567656324",
  "callDirection": "receive" // Only applicable to `phone` type locations. Valid values are: `make`/`receive`
}

Used to configure an event's location, can be used to pre-create links with these settings and also at the time of creating an event. Types are:

Type Description
online The event will be created with an auto generated link for videoconferencing. Depending on your calendar provider this can be a Google Meet or a Microsoft Teams link. Value is not needed, since links are autogenerated.
inPerson The event will be in person at a physical location. You need to pass in a value specifying the address or place.
zoom The event will be created with an auto generated Zoom link. The user must first have linked their Zoom account to their KalendMe account in integrations.
phone The event will be a phone call. It must include a callDirection property indicating: make if the host will make a call, or receive if the host will receive a call. The value property then becomes the phone number.
other The event will be created with any special instructions you might want to be included under the value field

Event Padding

{
  "before": 0,
  "after": 180
}

Used to specify if an event needs time padding before and/or after to be scheduled. Must be numbers in minutes of the padding needed and values can be anywhere between 0 and 180.

Errors

KalendMe's API can reply with the following error codes:

Error Code Message HTTP Status Code
1000 Missing required body parameter 400
1001 Missing required query parameter 400
1002 Conflict 409
1003 The specified timeZone is invalid 400
1004 The specified weekAvailaibility is invalid. Must contain all 7 days of the week in the required format: start/end keys in 24-hour HH:MM. 400
1005 The specified language is invalid. We only support (en, es, pt). 400
1006 The specified durationMinutes is invalid. Can only be integers between 1 and 480. 400
1007 The specified minimumNoticeMinutes is invalid. Can only be integers between 0 and 90000 (~2 months). 400
1008 The enabled attribute must be a valid boolean. 400
1009 The visible attribute must be a valid boolean. 400
1010 The specified title is invalid. Can only be a string between 1 and 30 characters. 400
1011 The specified description is invalid. Can only be a string up to 60 characters. 400
1012 The specified customQuestions are invalid. Must be an array with { id, order, question } objects. 400
1013 You can't change a user's email. 403
1014 The specified name is invalid. Can only be a string up to 50 characters. 400
1015 The specified urlString is invalid, it can only contain letters, numbers, periods or hyphens (-) without spaces, a minimum of 1 character and a maximum of 30 characters. 400
1016 The specified email is invalid. Has to be a properly formatted email. 400
1017 The specified year is invalid. Must be a positive small integer. 400
1018 The specified month is invalid. Must be a positive integer between 1 and 12. 400
1019 The specified selectedDateTime is invalid. Must be a future unix timestamp. 400
1020 The specified selectedDateTime is not available anymore. There's a conflict. 409
1021 The specified guest array is invalid. Must be an non-empty array with valid email strings. 400
1022 The specified mainGuestName is invalid. Can only be a string up to 50 characters. 400
1023 The specified mainGuestTimeZone is invalid. 400
1024 The specified providerId is invalid. Can only be google or microsoft 400
1025 The specified day is invalid. Must be a real year-month-day combination. 400
1026 The specified nickname is invalid. Can only be a string up to 50 characters. 400
1027 The specified boolean enabled is invalid. Can only be a string equaling true or false. 400
1028 The specified enabledEvents list is invalid. Must contain at least one valid webhook event type lowercased. 400
1029 The specified url is invalid. Must be a valid URL starting with http/https. localhost is not allowed. 400
1030 The specified status is invalid. Must be a string that's either CONFIRMED or CANCELLED. 400
1031 The specified location is invalid. Can only be a string up to 256 characters. 400
1032 The specified description is invalid. Can only be a string up to 300 characters. 400
1033 The specified urlString is already taken, please specify another one. 409
1034 The specified event could not be created because the user doesn't have an output calendar connection. Please specify an output calendar connection and then create the event. 422
1035 The specified event cannot be edited anymore since it's been cancelled. 422
1036 The specified startTimestamp is invalid. Must be a valid unix timestamp. 400
1037 The specified endTimestamp is invalid. Must be a valid unix timestamp. 400
1038 The specified endTimestamp cannot be before or equal to the specified startTimestamp. 400
1039 You cannot specify year/month and startTimestamp/endTimestsamp, please pick only one method. 400
1040 The includePotentialAvailableDateTimes attribute must be a valid boolean. 400
1041 The specified startTimestamp and endTimestamp have a timespan of more than 1 month. Please select a smaller range. 400