v1

latestOpenAPI 3.0.02026-07-17121287546.7 KB
Event Types

Create an event type

<Note>Please make sure to pass in the cal-api-version header value as mentioned in the Headers section. Not passing the correct value will default to an older version of this endpoint.</Note>

post/v2/event-types

Headers

cal-api-versionstring required

Must be set to 2024-06-14. If not set to this value, the endpoint will default to an older version.

Authorizationstring required

value must be Bearer <token> where <token> is api key prefixed with cal_ or managed user access token

Request body

lengthInMinutesnumber required
lengthInMinutesOptionsstring[]

If you want that user can choose between different lengths of the event you can specify them here. Must include the provided lengthInMinutes.

titlestring required
slugstring required
descriptionstring
disableGuestsboolean

If true, person booking this event can't add guests via their emails.

slotIntervalnumber

Number representing length of each slot when event is booked. By default it equal length of the event type. If event length is 60 minutes then we would have slots 9AM, 10AM, 11AM etc. but if it was changed to 30 minutes then we would have slots 9AM, 9:30AM, 10AM, 10:30AM etc. as the available times to book the 60 minute event.

minimumBookingNoticenumber

Minimum number of minutes before the event that a booking can be made.

beforeEventBuffernumber

Extra time automatically blocked on your calendar before a meeting starts. This gives you time to prepare, review notes, or transition from your previous activity.

afterEventBuffernumber

Extra time automatically blocked on your calendar after a meeting ends. This gives you time to wrap up, add notes, or decompress before your next commitment.

scheduleIdnumber

If you want that this event has different schedule than user's default one you can specify it here.

onlyShowFirstAvailableSlotboolean

This will limit your availability for this event type to one slot per day, scheduled at the earliest available time.

offsetStartnumber

Offset timeslots shown to bookers by a specified number of minutes

requiresBookerEmailVerificationboolean
hideCalendarNotesboolean
lockTimeZoneToggleOnBookingPageboolean
customNamestring

Customizable event name with valid variables: {Event type title}, {Organiser}, {Scheduler}, {Location}, {Organiser first name}, {Scheduler first name}, {Scheduler last name}, {Event duration}, {LOCATION}, {HOST/ATTENDEE}, {HOST}, {ATTENDEE}, {USER}

useDestinationCalendarEmailboolean
hideCalendarEventDetailsboolean
successRedirectUrlstring

A valid URL where the booker will redirect to, once the booking is completed successfully

hideOrganizerEmailboolean

Boolean to Hide organizer's email address from the booking screen, email notifications, and calendar events

hiddenboolean
bookingRequiresAuthenticationboolean

Boolean to require authentication for booking this event type via api. If true, only authenticated users who are the event-type owner or org/team admin/owner can book this event type.

interfaceLanguage'' | 'en' | 'ar' | 'az' | 'bg' | 'bn' | 'ca' | 'cs' | 'da' | 'de' | 'el' | 'es' | 'es-419' | 'eu' | 'et' | 'fi' | 'fr' | 'he' | 'hu' | 'it' | 'ja' | 'km' | 'ko' | 'nl' | 'no' | 'pl' | 'pt-BR' | 'pt' | 'ro' | 'ru' | 'sk-SK' | 'sr' | 'sv' | 'tr' | 'uk' | 'vi' | 'zh-CN' | 'zh-TW'

Set preferred language for the booking interface. Use empty string for visitor's browser language (default).

allowReschedulingPastBookingsboolean

Enabling this option allows for past events to be rescheduled.

allowReschedulingCancelledBookingsboolean

When enabled, users will be able to create a new booking when trying to reschedule a cancelled booking.

showOptimizedSlotsboolean

Arrange time slots to optimize availability.

Example request

{
  "lengthInMinutes": 60,
  "lengthInMinutesOptions": [
    15,
    30,
    60
  ],
  "title": "Learn the secrets of masterchief!",
  "slug": "learn-the-secrets-of-masterchief",
  "description": "Discover the culinary wonders of the Argentina by making the best flan ever!",
  "bookingFields": [
    {
      "type": "name"
    }
  ],
  "bookingLimitsCount": {
    "day": 1,
    "week": 2,
    "month": 3,
    "year": 4
  },
  "bookerActiveBookingsLimit": {
    "maximumActiveBookings": 3
  },
  "bookingLimitsDuration": {
    "day": 60,
    "week": 120,
    "month": 180,
    "year": 240
  },
  "bookingWindow": {
    "value": 5,
    "rolling": true
  },
  "confirmationPolicy": {
    "type": "always",
    "noticeThreshold": {
      "unit": "minutes",
      "count": 30
    }
  },
  "recurrence": {
    "interval": 10,
    "occurrences": 10
  },
  "color": {
    "lightThemeHex": "#292929",
    "darkThemeHex": "#fafafa"
  },
  "seats": {
    "seatsPerTimeSlot": 4,
    "showAttendeeInfo": true,
    "showAvailabilityCount": true
  },
  "customName": "{Event type title} between {Organiser} and {Scheduler}",
  "successRedirectUrl": "https://masterchief.com/argentina/flan/video/9129412",
  "disableCancelling": {
    "disabled": true
  },
  "disableRescheduling": {
    "disabled": true,
    "minutesBefore": 60
  },
  "locations": [
    {
      "type": "address",
      "address": "123 Example St, City, Country"
    }
  ]
}

Response

status'success' | 'error' required

Example response

{
  "status": "success",
  "data": {
    "id": 1,
    "lengthInMinutes": 60,
    "lengthInMinutesOptions": [
      15,
      30,
      60
    ],
    "title": "Learn the secrets of masterchief!",
    "slug": "learn-the-secrets-of-masterchief",
    "description": "Discover the culinary wonders of Argentina by making the best flan ever!",
    "locations": [
      {
        "type": "address",
        "address": "123 Example St, City, Country"
      }
    ],
    "bookingFields": [
      {
        "type": "name"
      }
    ],
    "recurrence": {
      "interval": 10,
      "occurrences": 10
    },
    "bookerActiveBookingsLimit": {
      "maximumActiveBookings": 3
    },
    "bookingWindow": [
      {
        "value": 5,
        "rolling": true
      }
    ],
    "color": {
      "lightThemeHex": "#292929",
      "darkThemeHex": "#fafafa"
    },
    "seats": {
      "seatsPerTimeSlot": 4,
      "showAttendeeInfo": true,
      "showAvailabilityCount": true
    },
    "disableCancelling": {
      "disabled": true
    },
    "disableRescheduling": {
      "disabled": true,
      "minutesBefore": 60
    },
    "ownerId": 10,
    "bookingUrl": "https://cal.com/john-doe/30min"
  }
}