Create a holiday
curl --request POST \
--url https://www.ruddr.io/api/workspace/holidays \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"isActive": true,
"occurrences": [
"2023-12-25"
]
}
'import requests
url = "https://www.ruddr.io/api/workspace/holidays"
payload = {
"name": "<string>",
"description": "<string>",
"isActive": True,
"occurrences": ["2023-12-25"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
isActive: true,
occurrences: ['2023-12-25']
})
};
fetch('https://www.ruddr.io/api/workspace/holidays', 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://www.ruddr.io/api/workspace/holidays",
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>',
'description' => '<string>',
'isActive' => true,
'occurrences' => [
'2023-12-25'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://www.ruddr.io/api/workspace/holidays"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"isActive\": true,\n \"occurrences\": [\n \"2023-12-25\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://www.ruddr.io/api/workspace/holidays")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"isActive\": true,\n \"occurrences\": [\n \"2023-12-25\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.ruddr.io/api/workspace/holidays")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"isActive\": true,\n \"occurrences\": [\n \"2023-12-25\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "d2f4a891-c73b-4e16-85d9-e1c0f3b27a64",
"name": "Company Retreat",
"description": "Annual team-building event and company holiday.",
"readOnly": false,
"isActive": true,
"createdAt": "2026-02-10T09:15:42.318Z",
"occurrences": [
"2026-06-15",
"2027-06-14"
]
}{
"status": 400,
"message": "There was a problem processing your request. See errors for more details.",
"errors": [
"'name' is required"
]
}{
"status": 409,
"message": "A Holiday with the same name already exists."
}Holidays
Create a holiday
POST
/
holidays
Create a holiday
curl --request POST \
--url https://www.ruddr.io/api/workspace/holidays \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"isActive": true,
"occurrences": [
"2023-12-25"
]
}
'import requests
url = "https://www.ruddr.io/api/workspace/holidays"
payload = {
"name": "<string>",
"description": "<string>",
"isActive": True,
"occurrences": ["2023-12-25"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
isActive: true,
occurrences: ['2023-12-25']
})
};
fetch('https://www.ruddr.io/api/workspace/holidays', 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://www.ruddr.io/api/workspace/holidays",
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>',
'description' => '<string>',
'isActive' => true,
'occurrences' => [
'2023-12-25'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://www.ruddr.io/api/workspace/holidays"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"isActive\": true,\n \"occurrences\": [\n \"2023-12-25\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://www.ruddr.io/api/workspace/holidays")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"isActive\": true,\n \"occurrences\": [\n \"2023-12-25\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.ruddr.io/api/workspace/holidays")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"isActive\": true,\n \"occurrences\": [\n \"2023-12-25\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "d2f4a891-c73b-4e16-85d9-e1c0f3b27a64",
"name": "Company Retreat",
"description": "Annual team-building event and company holiday.",
"readOnly": false,
"isActive": true,
"createdAt": "2026-02-10T09:15:42.318Z",
"occurrences": [
"2026-06-15",
"2027-06-14"
]
}{
"status": 400,
"message": "There was a problem processing your request. See errors for more details.",
"errors": [
"'name' is required"
]
}{
"status": 409,
"message": "A Holiday with the same name already exists."
}A day off that can be added to a holiday schedule. Ruddr includes several built-in standard holidays, and you can also create custom holidays.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Response
200
The unique identifier for the object.
The name of the holiday.
A description of the holiday.
Whether the holiday is read-only. Read-only holidays are system defaults shared across all workspaces.
Whether the holiday is active.
The timestamp when the object was created.
The list of occurrence dates for this holiday (YYYY-MM-DD).
⌘I