Skip to main content
GET
/
v1
/
calendars
List calendars
curl --request GET \
  --url https://api.plane.com/v1/calendars \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.plane.com/v1/calendars"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.plane.com/v1/calendars', 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://api.plane.com/v1/calendars",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);

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

curl_close($curl);

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

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

func main() {

url := "https://api.plane.com/v1/calendars"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "Bearer <token>")

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

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

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.plane.com/v1/calendars")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.plane.com/v1/calendars")

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

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{
  "calendars": [
    {
      "id": "cal_cNqYX2J3s9bI2Aa",
      "object": "calendar",
      "name": "Company Events",
      "description": "Company-wide events and meetings",
      "purpose": [ "holidays" ],
      "metadata": {},
      "created": "2024-01-15T00:00:00Z",
      "updated": "2024-02-01T00:00:00Z"
    }
  ]
}
Use this endpoint to discover calendar IDs before listing or retrieving calendar events. Filter by purpose to find system calendars such as the holidays or time-off calendar without matching on name.

Parameters

purpose
string
Only return calendars tagged with this purpose. Known values include holidays, leaves, anniversaries, and starting. This list is not exhaustive.
limit
number
A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
cursor
string
A value from a previous response that lets you fetch the next page.
starting_after
string
Return results after this calendar ID.
ending_before
string
Return results before this calendar ID.

Returns

Returns a dictionary with a calendars property that contains an array of Calendar objects. If no calendars exist, the array is empty.
{
  "calendars": [
    {
      "id": "cal_cNqYX2J3s9bI2Aa",
      "object": "calendar",
      "name": "Company Events",
      "description": "Company-wide events and meetings",
      "purpose": [ "holidays" ],
      "metadata": {},
      "created": "2024-01-15T00:00:00Z",
      "updated": "2024-02-01T00:00:00Z"
    }
  ]
}