Create Webhook
curl --request POST \
--url https://ipos.dev.nowbookit.com/Webhooks \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"webhookUrl": "<string>",
"event": "<string>",
"securityKey": "<string>",
"securityToken": "<string>"
}
'import requests
url = "https://ipos.dev.nowbookit.com/Webhooks"
payload = {
"webhookUrl": "<string>",
"event": "<string>",
"securityKey": "<string>",
"securityToken": "<string>"
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
webhookUrl: '<string>',
event: '<string>',
securityKey: '<string>',
securityToken: '<string>'
})
};
fetch('https://ipos.dev.nowbookit.com/Webhooks', 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://ipos.dev.nowbookit.com/Webhooks",
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([
'webhookUrl' => '<string>',
'event' => '<string>',
'securityKey' => '<string>',
'securityToken' => '<string>'
]),
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://ipos.dev.nowbookit.com/Webhooks"
payload := strings.NewReader("{\n \"webhookUrl\": \"<string>\",\n \"event\": \"<string>\",\n \"securityKey\": \"<string>\",\n \"securityToken\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://ipos.dev.nowbookit.com/Webhooks")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"webhookUrl\": \"<string>\",\n \"event\": \"<string>\",\n \"securityKey\": \"<string>\",\n \"securityToken\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://ipos.dev.nowbookit.com/Webhooks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"webhookUrl\": \"<string>\",\n \"event\": \"<string>\",\n \"securityKey\": \"<string>\",\n \"securityToken\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"event": "<string>",
"webhookUrl": "<string>",
"locationId": "<string>",
"errorMessage": "<string>"
}Outbound Webhooks
POST /Webhooks
Subscribe to a new NowBookIt webhook event.
POST
/
Webhooks
Create Webhook
curl --request POST \
--url https://ipos.dev.nowbookit.com/Webhooks \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"webhookUrl": "<string>",
"event": "<string>",
"securityKey": "<string>",
"securityToken": "<string>"
}
'import requests
url = "https://ipos.dev.nowbookit.com/Webhooks"
payload = {
"webhookUrl": "<string>",
"event": "<string>",
"securityKey": "<string>",
"securityToken": "<string>"
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
webhookUrl: '<string>',
event: '<string>',
securityKey: '<string>',
securityToken: '<string>'
})
};
fetch('https://ipos.dev.nowbookit.com/Webhooks', 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://ipos.dev.nowbookit.com/Webhooks",
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([
'webhookUrl' => '<string>',
'event' => '<string>',
'securityKey' => '<string>',
'securityToken' => '<string>'
]),
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://ipos.dev.nowbookit.com/Webhooks"
payload := strings.NewReader("{\n \"webhookUrl\": \"<string>\",\n \"event\": \"<string>\",\n \"securityKey\": \"<string>\",\n \"securityToken\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://ipos.dev.nowbookit.com/Webhooks")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"webhookUrl\": \"<string>\",\n \"event\": \"<string>\",\n \"securityKey\": \"<string>\",\n \"securityToken\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://ipos.dev.nowbookit.com/Webhooks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"webhookUrl\": \"<string>\",\n \"event\": \"<string>\",\n \"securityKey\": \"<string>\",\n \"securityToken\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"event": "<string>",
"webhookUrl": "<string>",
"locationId": "<string>",
"errorMessage": "<string>"
}Subscribe to a new NowBookIt webhook event. NowBookIt will POST a payload to your
Example 200 Response
webhookUrl when the event occurs.
string
required
Your API key
string
required
Must be
application/jsonstring
required
Event to subscribe to. Valid values:
BOOKING_CREATED, BOOKING_UPDATED, GIFTCARDS_CREATED, GIFTCARDS_UPDATED, GIFTCARDS_CANCELLED, GIFTCARDS_REDEEMEDstring
required
Your endpoint URL where NowBookIt will POST the event payload
string
Auth key sent in the webhook request header
string
Auth token sent alongside
securityKeycurl --location '[BASE_URL]/Webhooks' \
--header 'X-API-KEY: your_api_key_here' \
--header 'Content-Type: application/json' \
--data '{ "event": "BOOKING_CREATED", "webhookUrl": "https://your-system.com/webhooks/nbi/booking-created" }'
{
"event": "BOOKING_CREATED",
"webhookUrl": "https://your-system.com/webhooks/nbi/booking-created",
"locationId": "loc-9",
"errorMessage": null
}
| Status | Description |
|---|---|
200 | Subscription created |
400 | API key not associated with a venue |
400 | No Venue Subscribed to your App. |
400 | Giftcard Webhook Request Failed Verification. |
400 | request does not contain a valid Event and/or webhook Url |
401 | X-API-KEY missing or invalid |
Authorizations
Headers
API Key authentication header
Body
application/json
A valid URL that can receive POST requests with NBI events.
Minimum string length:
1The event that this webhook will subscribe to
Minimum string length:
1The key used in the webhook authentication.
The token used in the webhook authentication.