Skip to main content
POST
/
api
/
v1
/
calendars
/
{calendarId}
/
event-types
Create an event type
curl --request POST \
  --url https://prod.featherhq.com/api/v1/calendars/{calendarId}/event-types \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "name": "<string>",
  "slug": "<string>",
  "duration": 2,
  "description": "<string>",
  "slotInterval": 2,
  "minimumBookingNotice": 120,
  "beforeEventBuffer": 0,
  "afterEventBuffer": 0,
  "periodType": "UNLIMITED",
  "periodDays": 2,
  "periodStartDate": "2023-12-25",
  "periodEndDate": "2023-12-25",
  "scheduleId": "<string>",
  "location": "<string>",
  "addGoogleMeet": false,
  "metadata": null
}
'
import requests

url = "https://prod.featherhq.com/api/v1/calendars/{calendarId}/event-types"

payload = {
"name": "<string>",
"slug": "<string>",
"duration": 2,
"description": "<string>",
"slotInterval": 2,
"minimumBookingNotice": 120,
"beforeEventBuffer": 0,
"afterEventBuffer": 0,
"periodType": "UNLIMITED",
"periodDays": 2,
"periodStartDate": "2023-12-25",
"periodEndDate": "2023-12-25",
"scheduleId": "<string>",
"location": "<string>",
"addGoogleMeet": False,
"metadata": None
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
slug: '<string>',
duration: 2,
description: '<string>',
slotInterval: 2,
minimumBookingNotice: 120,
beforeEventBuffer: 0,
afterEventBuffer: 0,
periodType: 'UNLIMITED',
periodDays: 2,
periodStartDate: '2023-12-25',
periodEndDate: '2023-12-25',
scheduleId: '<string>',
location: '<string>',
addGoogleMeet: false,
metadata: null
})
};

fetch('https://prod.featherhq.com/api/v1/calendars/{calendarId}/event-types', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://prod.featherhq.com/api/v1/calendars/{calendarId}/event-types",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'slug' => '<string>',
'duration' => 2,
'description' => '<string>',
'slotInterval' => 2,
'minimumBookingNotice' => 120,
'beforeEventBuffer' => 0,
'afterEventBuffer' => 0,
'periodType' => 'UNLIMITED',
'periodDays' => 2,
'periodStartDate' => '2023-12-25',
'periodEndDate' => '2023-12-25',
'scheduleId' => '<string>',
'location' => '<string>',
'addGoogleMeet' => false,
'metadata' => null
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://prod.featherhq.com/api/v1/calendars/{calendarId}/event-types"

payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"duration\": 2,\n \"description\": \"<string>\",\n \"slotInterval\": 2,\n \"minimumBookingNotice\": 120,\n \"beforeEventBuffer\": 0,\n \"afterEventBuffer\": 0,\n \"periodType\": \"UNLIMITED\",\n \"periodDays\": 2,\n \"periodStartDate\": \"2023-12-25\",\n \"periodEndDate\": \"2023-12-25\",\n \"scheduleId\": \"<string>\",\n \"location\": \"<string>\",\n \"addGoogleMeet\": false,\n \"metadata\": null\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://prod.featherhq.com/api/v1/calendars/{calendarId}/event-types")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"duration\": 2,\n \"description\": \"<string>\",\n \"slotInterval\": 2,\n \"minimumBookingNotice\": 120,\n \"beforeEventBuffer\": 0,\n \"afterEventBuffer\": 0,\n \"periodType\": \"UNLIMITED\",\n \"periodDays\": 2,\n \"periodStartDate\": \"2023-12-25\",\n \"periodEndDate\": \"2023-12-25\",\n \"scheduleId\": \"<string>\",\n \"location\": \"<string>\",\n \"addGoogleMeet\": false,\n \"metadata\": null\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://prod.featherhq.com/api/v1/calendars/{calendarId}/event-types")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"duration\": 2,\n \"description\": \"<string>\",\n \"slotInterval\": 2,\n \"minimumBookingNotice\": 120,\n \"beforeEventBuffer\": 0,\n \"afterEventBuffer\": 0,\n \"periodType\": \"UNLIMITED\",\n \"periodDays\": 2,\n \"periodStartDate\": \"2023-12-25\",\n \"periodEndDate\": \"2023-12-25\",\n \"scheduleId\": \"<string>\",\n \"location\": \"<string>\",\n \"addGoogleMeet\": false,\n \"metadata\": null\n}"

response = http.request(request)
puts response.read_body
{
  "id": "<string>",
  "calendarId": "<string>",
  "name": "<string>",
  "slug": "<string>",
  "description": "<string>",
  "duration": 123,
  "slotInterval": 123,
  "minimumBookingNotice": 123,
  "beforeEventBuffer": 123,
  "afterEventBuffer": 123,
  "periodDays": 123,
  "periodStartDate": "<string>",
  "periodEndDate": "<string>",
  "scheduleId": "<string>",
  "location": "<string>",
  "addGoogleMeet": true,
  "active": true,
  "archived": true,
  "createdAt": "<string>",
  "updatedAt": "<string>",
  "metadata": null
}
{
"status": 400,
"message": "Bad request",
"code": "BAD_REQUEST",
"success": false
}
{
"status": 404,
"message": "Not found",
"code": "NOT_FOUND",
"success": false
}
{
"status": 500,
"message": "Internal server error",
"code": "INTERNAL_SERVER_ERROR",
"success": false
}

Authorizations

X-API-Key
string
header
required

Path Parameters

calendarId
string
required

Body

application/json
name
string
required
Required string length: 1 - 255
slug
string
required
Required string length: 1 - 255
duration
number
required
Required range: x >= 1
description
string
Maximum string length: 1000
slotInterval
number
Required range: x >= 1
minimumBookingNotice
number
default:120
Required range: x >= 0
beforeEventBuffer
number
default:0
Required range: x >= 0
afterEventBuffer
number
default:0
Required range: x >= 0
periodType
enum<string>
default:UNLIMITED
Available options:
UNLIMITED,
ROLLING,
RANGE
periodDays
number
Required range: x >= 1
periodStartDate
string<date>
periodEndDate
string<date>
scheduleId
string
location
string
addGoogleMeet
boolean
default:false
metadata
unknown

Response

Event type created

id
string
required
calendarId
string
required
name
string
required
slug
string
required
description
string | null
required
duration
number
required
slotInterval
number | null
required
minimumBookingNotice
number
required
beforeEventBuffer
number
required
afterEventBuffer
number
required
periodType
enum<string>
required
Available options:
UNLIMITED,
ROLLING,
RANGE
periodDays
number | null
required
periodStartDate
string | null
required
periodEndDate
string | null
required
scheduleId
string | null
required
location
string | null
required
addGoogleMeet
boolean
required
active
boolean
required
archived
boolean
required
createdAt
string
required
updatedAt
string
required
metadata
unknown