cURL
curl --request PUT \
--url https://api.novacal.io/v1/webhooks/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "https://example.com/hooks/novacal-v2",
"events": [
"event.rescheduled"
],
"is_active": false
}
'import requests
url = "https://api.novacal.io/v1/webhooks/{id}"
payload = {
"url": "https://example.com/hooks/novacal-v2",
"events": ["event.rescheduled"],
"is_active": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
url: 'https://example.com/hooks/novacal-v2',
events: ['event.rescheduled'],
is_active: false
})
};
fetch('https://api.novacal.io/v1/webhooks/{id}', 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.novacal.io/v1/webhooks/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'url' => 'https://example.com/hooks/novacal-v2',
'events' => [
'event.rescheduled'
],
'is_active' => false
]),
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://api.novacal.io/v1/webhooks/{id}"
payload := strings.NewReader("{\n \"url\": \"https://example.com/hooks/novacal-v2\",\n \"events\": [\n \"event.rescheduled\"\n ],\n \"is_active\": false\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.novacal.io/v1/webhooks/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"https://example.com/hooks/novacal-v2\",\n \"events\": [\n \"event.rescheduled\"\n ],\n \"is_active\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.novacal.io/v1/webhooks/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"https://example.com/hooks/novacal-v2\",\n \"events\": [\n \"event.rescheduled\"\n ],\n \"is_active\": false\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": 1,
"url": "https://example.com/hooks/novacal",
"events": [
"event.created",
"event.canceled"
],
"secret": "novacal_wh_YOUR_SIGNING_SECRET",
"is_active": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}Webhooks
Update Webhook
Update a Novacal webhook to change its target URL, adjust which events it subscribes to, or pause deliveries without deleting it.
PUT
/
v1
/
webhooks
/
{id}
cURL
curl --request PUT \
--url https://api.novacal.io/v1/webhooks/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "https://example.com/hooks/novacal-v2",
"events": [
"event.rescheduled"
],
"is_active": false
}
'import requests
url = "https://api.novacal.io/v1/webhooks/{id}"
payload = {
"url": "https://example.com/hooks/novacal-v2",
"events": ["event.rescheduled"],
"is_active": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
url: 'https://example.com/hooks/novacal-v2',
events: ['event.rescheduled'],
is_active: false
})
};
fetch('https://api.novacal.io/v1/webhooks/{id}', 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.novacal.io/v1/webhooks/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'url' => 'https://example.com/hooks/novacal-v2',
'events' => [
'event.rescheduled'
],
'is_active' => false
]),
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://api.novacal.io/v1/webhooks/{id}"
payload := strings.NewReader("{\n \"url\": \"https://example.com/hooks/novacal-v2\",\n \"events\": [\n \"event.rescheduled\"\n ],\n \"is_active\": false\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.novacal.io/v1/webhooks/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"https://example.com/hooks/novacal-v2\",\n \"events\": [\n \"event.rescheduled\"\n ],\n \"is_active\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.novacal.io/v1/webhooks/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"https://example.com/hooks/novacal-v2\",\n \"events\": [\n \"event.rescheduled\"\n ],\n \"is_active\": false\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": 1,
"url": "https://example.com/hooks/novacal",
"events": [
"event.created",
"event.canceled"
],
"secret": "novacal_wh_YOUR_SIGNING_SECRET",
"is_active": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}What this endpoint is for
Change an existing webhook without re-registering it. Send only the fields you want to change.What you can change
url— move deliveries to a different endpointevents— replace the list of subscribed events, chosen from the available eventsis_active— set tofalseto pause deliveries, and back totrueto resume
events replaces the whole list rather than adding to it, so include the events you already subscribe to alongside any new ones. A webhook registered before a new event existed keeps its original list until you update it.
Pausing instead of deleting
Setis_active to false while you deploy or debug your receiver. Novacal stops sending deliveries but keeps the webhook and its secret intact.
Access
You can only update webhooks registered on your own account. Updating another account’s webhook returns403 access_denied.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
ID of the webhook to update
Body
application/json
Webhook fields to update
A new target URL for deliveries
Example:
"https://example.com/hooks/novacal-v2"
Replaces the subscribed events
Minimum array length:
1Available options:
event.created, event.rescheduled, event.canceled, event.started, event.ended Example:
["event.rescheduled"]
Set to false to pause deliveries without deleting the webhook
Example:
false