Send a test event
curl --request POST \
--url https://platform.uat.nowbookit.com/api/comms/venue/{venueId}/webhooks/{receiverId}/test \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "https://example.com/nowbookit"
}
'import requests
url = "https://platform.uat.nowbookit.com/api/comms/venue/{venueId}/webhooks/{receiverId}/test"
payload = { "url": "https://example.com/nowbookit" }
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({url: 'https://example.com/nowbookit'})
};
fetch('https://platform.uat.nowbookit.com/api/comms/venue/{venueId}/webhooks/{receiverId}/test', 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://platform.uat.nowbookit.com/api/comms/venue/{venueId}/webhooks/{receiverId}/test",
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([
'url' => 'https://example.com/nowbookit'
]),
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://platform.uat.nowbookit.com/api/comms/venue/{venueId}/webhooks/{receiverId}/test"
payload := strings.NewReader("{\n \"url\": \"https://example.com/nowbookit\"\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://platform.uat.nowbookit.com/api/comms/venue/{venueId}/webhooks/{receiverId}/test")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"https://example.com/nowbookit\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://platform.uat.nowbookit.com/api/comms/venue/{venueId}/webhooks/{receiverId}/test")
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 \"url\": \"https://example.com/nowbookit\"\n}"
response = http.request(request)
puts response.read_body{
"result": {
"kind": "response",
"status": 200,
"latencyMs": 184
}
}{
"code": "ValidationError",
"message": "Request body failed validation",
"requestId": "8f14e45f-ceea-4c6f-8f89-example",
"errors": {
"url": [
"Invalid input: expected string, received undefined"
]
}
}{
"code": "UnauthorisedError",
"message": "Invalid API key",
"requestId": "8f14e45f-ceea-4c6f-8f89-example"
}{
"code": "AppError",
"message": "Only an API key for this venue can manage its webhooks.",
"requestId": "8f14e45f-ceea-4c6f-8f89-example"
}{
"code": "AppError",
"message": "This webhook doesn't send to that URL.",
"requestId": "8f14e45f-ceea-4c6f-8f89-example"
}{
"code": "AppError",
"message": "A test event was just sent to this webhook. Wait a few seconds and try again.",
"requestId": "8f14e45f-ceea-4c6f-8f89-example"
}Webhooks
Send a Test Event
Send one signed test event to your endpoint now.
POST
/
venue
/
{venueId}
/
webhooks
/
{receiverId}
/
test
Send a test event
curl --request POST \
--url https://platform.uat.nowbookit.com/api/comms/venue/{venueId}/webhooks/{receiverId}/test \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "https://example.com/nowbookit"
}
'import requests
url = "https://platform.uat.nowbookit.com/api/comms/venue/{venueId}/webhooks/{receiverId}/test"
payload = { "url": "https://example.com/nowbookit" }
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({url: 'https://example.com/nowbookit'})
};
fetch('https://platform.uat.nowbookit.com/api/comms/venue/{venueId}/webhooks/{receiverId}/test', 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://platform.uat.nowbookit.com/api/comms/venue/{venueId}/webhooks/{receiverId}/test",
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([
'url' => 'https://example.com/nowbookit'
]),
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://platform.uat.nowbookit.com/api/comms/venue/{venueId}/webhooks/{receiverId}/test"
payload := strings.NewReader("{\n \"url\": \"https://example.com/nowbookit\"\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://platform.uat.nowbookit.com/api/comms/venue/{venueId}/webhooks/{receiverId}/test")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"https://example.com/nowbookit\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://platform.uat.nowbookit.com/api/comms/venue/{venueId}/webhooks/{receiverId}/test")
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 \"url\": \"https://example.com/nowbookit\"\n}"
response = http.request(request)
puts response.read_body{
"result": {
"kind": "response",
"status": 200,
"latencyMs": 184
}
}{
"code": "ValidationError",
"message": "Request body failed validation",
"requestId": "8f14e45f-ceea-4c6f-8f89-example",
"errors": {
"url": [
"Invalid input: expected string, received undefined"
]
}
}{
"code": "UnauthorisedError",
"message": "Invalid API key",
"requestId": "8f14e45f-ceea-4c6f-8f89-example"
}{
"code": "AppError",
"message": "Only an API key for this venue can manage its webhooks.",
"requestId": "8f14e45f-ceea-4c6f-8f89-example"
}{
"code": "AppError",
"message": "This webhook doesn't send to that URL.",
"requestId": "8f14e45f-ceea-4c6f-8f89-example"
}{
"code": "AppError",
"message": "A test event was just sent to this webhook. Wait a few seconds and try again.",
"requestId": "8f14e45f-ceea-4c6f-8f89-example"
}The request is signed with your venue’s secret, sent once and not retried. See Events for the test event’s body.
You can send one test per webhook every 10 seconds. Another one sooner returns
429.Authorizations
Your API key, with the webhooks:manage permission. See Authorization.