curl --request PATCH \
--url https://api-sandbox.unifystays.com/webhooks/endpoints/{endpoint_id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"name": "Production booking events",
"url": "https://example.com/webhooks/unifystays",
"event_types": [
"booking.*"
],
"status": "ACTIVE"
}
'import requests
url = "https://api-sandbox.unifystays.com/webhooks/endpoints/{endpoint_id}"
payload = {
"name": "Production booking events",
"url": "https://example.com/webhooks/unifystays",
"event_types": ["booking.*"],
"status": "ACTIVE"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Production booking events',
url: 'https://example.com/webhooks/unifystays',
event_types: ['booking.*'],
status: 'ACTIVE'
})
};
fetch('https://api-sandbox.unifystays.com/webhooks/endpoints/{endpoint_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-sandbox.unifystays.com/webhooks/endpoints/{endpoint_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Production booking events',
'url' => 'https://example.com/webhooks/unifystays',
'event_types' => [
'booking.*'
],
'status' => 'ACTIVE'
]),
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://api-sandbox.unifystays.com/webhooks/endpoints/{endpoint_id}"
payload := strings.NewReader("{\n \"name\": \"Production booking events\",\n \"url\": \"https://example.com/webhooks/unifystays\",\n \"event_types\": [\n \"booking.*\"\n ],\n \"status\": \"ACTIVE\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api-sandbox.unifystays.com/webhooks/endpoints/{endpoint_id}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Production booking events\",\n \"url\": \"https://example.com/webhooks/unifystays\",\n \"event_types\": [\n \"booking.*\"\n ],\n \"status\": \"ACTIVE\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.unifystays.com/webhooks/endpoints/{endpoint_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Production booking events\",\n \"url\": \"https://example.com/webhooks/unifystays\",\n \"event_types\": [\n \"booking.*\"\n ],\n \"status\": \"ACTIVE\"\n}"
response = http.request(request)
puts response.read_body{
"id": "8b95a9e0-4af3-4c6d-92df-84b64256d27f",
"name": "Production booking events",
"url": "https://example.com/webhooks/unifystays",
"status": "ACTIVE",
"event_types": [
"booking.confirmed",
"booking.cancelled"
],
"consecutive_failures": 0,
"last_success_at": "2026-08-08T08:30:00.000Z",
"last_failure_at": null,
"disabled_at": null,
"disabled_reason": null,
"created_at": "2026-08-08T08:00:00.000Z",
"updated_at": "2026-08-08T08:30:00.000Z"
}Update Webhook Endpoint
Change a webhook URL, subscriptions, name, or delivery status.
curl --request PATCH \
--url https://api-sandbox.unifystays.com/webhooks/endpoints/{endpoint_id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"name": "Production booking events",
"url": "https://example.com/webhooks/unifystays",
"event_types": [
"booking.*"
],
"status": "ACTIVE"
}
'import requests
url = "https://api-sandbox.unifystays.com/webhooks/endpoints/{endpoint_id}"
payload = {
"name": "Production booking events",
"url": "https://example.com/webhooks/unifystays",
"event_types": ["booking.*"],
"status": "ACTIVE"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Production booking events',
url: 'https://example.com/webhooks/unifystays',
event_types: ['booking.*'],
status: 'ACTIVE'
})
};
fetch('https://api-sandbox.unifystays.com/webhooks/endpoints/{endpoint_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-sandbox.unifystays.com/webhooks/endpoints/{endpoint_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Production booking events',
'url' => 'https://example.com/webhooks/unifystays',
'event_types' => [
'booking.*'
],
'status' => 'ACTIVE'
]),
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://api-sandbox.unifystays.com/webhooks/endpoints/{endpoint_id}"
payload := strings.NewReader("{\n \"name\": \"Production booking events\",\n \"url\": \"https://example.com/webhooks/unifystays\",\n \"event_types\": [\n \"booking.*\"\n ],\n \"status\": \"ACTIVE\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api-sandbox.unifystays.com/webhooks/endpoints/{endpoint_id}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Production booking events\",\n \"url\": \"https://example.com/webhooks/unifystays\",\n \"event_types\": [\n \"booking.*\"\n ],\n \"status\": \"ACTIVE\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.unifystays.com/webhooks/endpoints/{endpoint_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Production booking events\",\n \"url\": \"https://example.com/webhooks/unifystays\",\n \"event_types\": [\n \"booking.*\"\n ],\n \"status\": \"ACTIVE\"\n}"
response = http.request(request)
puts response.read_body{
"id": "8b95a9e0-4af3-4c6d-92df-84b64256d27f",
"name": "Production booking events",
"url": "https://example.com/webhooks/unifystays",
"status": "ACTIVE",
"event_types": [
"booking.confirmed",
"booking.cancelled"
],
"consecutive_failures": 0,
"last_success_at": "2026-08-08T08:30:00.000Z",
"last_failure_at": null,
"disabled_at": null,
"disabled_reason": null,
"created_at": "2026-08-08T08:00:00.000Z",
"updated_at": "2026-08-08T08:30:00.000Z"
}event_types replaces
the entire subscription list.
Set status to PAUSED to stop creating deliveries for new events. Set it to
ACTIVE to resume delivery and clear the consecutive-failure counter.
Authorizations
Environment-specific API key created in the Unifystays portal
Headers
Path Parameters
Webhook endpoint UUID.
"8b95a9e0-4af3-4c6d-92df-84b64256d27f"
Body
New human-readable endpoint name.
1 - 120"Production booking events"
New public HTTPS delivery URL.
8 - 2048"https://example.com/webhooks/unifystays"
Replacement event subscriptions. Send the complete desired list.
1 - 20 elementsbooking.created, booking.confirmed, booking.failed, booking.cancellation_requested, booking.cancelled, booking.cancellation_failed, booking.* ["booking.*"]
Activate or pause delivery to this endpoint.
ACTIVE, PAUSED "ACTIVE"
Response
Webhook endpoint updated successfully.
Unique webhook endpoint identifier.
"8b95a9e0-4af3-4c6d-92df-84b64256d27f"
Human-readable endpoint name.
"Production booking events"
URL that receives signed webhook POST requests.
"https://example.com/webhooks/unifystays"
Current endpoint state. Paused and disabled endpoints do not receive new deliveries.
ACTIVE, PAUSED, DISABLED "ACTIVE"
Normalized event subscriptions for this endpoint.
booking.created, booking.confirmed, booking.failed, booking.cancellation_requested, booking.cancelled, booking.cancellation_failed, booking.* ["booking.confirmed", "booking.cancelled"]
Consecutive delivery failures since the last success or reactivation.
0
Time of the most recent successful delivery, if any.
"2026-08-08T08:30:00.000Z"
Time of the most recent failed delivery, if any.
null
Time the endpoint was disabled, if applicable.
null
Reason the endpoint was disabled, if applicable.
null
Endpoint creation time.
"2026-08-08T08:00:00.000Z"
Time the endpoint was last updated.
"2026-08-08T08:30:00.000Z"