Webhooks
Create Webhook
Creates a new webhook subscription to receive notifications when database events occur.
POST
/
bases
/
{databaseId}
/
webhooks
Create webhook
curl --request POST \
--url https://tables.zite.com/api/v1/bases/{databaseId}/webhooks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "https://your-server.com/webhooks/zite",
"events": [
"record.created",
"record.updated",
"record.deleted"
],
"tableId": "tbl_abc123"
}
'import requests
url = "https://tables.zite.com/api/v1/bases/{databaseId}/webhooks"
payload = {
"url": "https://your-server.com/webhooks/zite",
"events": ["record.created", "record.updated", "record.deleted"],
"tableId": "tbl_abc123"
}
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://your-server.com/webhooks/zite',
events: ['record.created', 'record.updated', 'record.deleted'],
tableId: 'tbl_abc123'
})
};
fetch('https://tables.zite.com/api/v1/bases/{databaseId}/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://tables.zite.com/api/v1/bases/{databaseId}/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([
'url' => 'https://your-server.com/webhooks/zite',
'events' => [
'record.created',
'record.updated',
'record.deleted'
],
'tableId' => 'tbl_abc123'
]),
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://tables.zite.com/api/v1/bases/{databaseId}/webhooks"
payload := strings.NewReader("{\n \"url\": \"https://your-server.com/webhooks/zite\",\n \"events\": [\n \"record.created\",\n \"record.updated\",\n \"record.deleted\"\n ],\n \"tableId\": \"tbl_abc123\"\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://tables.zite.com/api/v1/bases/{databaseId}/webhooks")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"https://your-server.com/webhooks/zite\",\n \"events\": [\n \"record.created\",\n \"record.updated\",\n \"record.deleted\"\n ],\n \"tableId\": \"tbl_abc123\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://tables.zite.com/api/v1/bases/{databaseId}/webhooks")
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://your-server.com/webhooks/zite\",\n \"events\": [\n \"record.created\",\n \"record.updated\",\n \"record.deleted\"\n ],\n \"tableId\": \"tbl_abc123\"\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"secret": "<string>"
}Event Types
Subscribe to any combination of these events:| Event | Description |
|---|---|
record.created | Triggered when new records are added |
record.updated | Triggered when existing records are modified |
record.deleted | Triggered when records are deleted |
table.created | Triggered when new tables are added |
table.updated | Triggered when table properties change |
table.deleted | Triggered when tables are deleted |
field.created | Triggered when new fields are added |
field.updated | Triggered when field properties change |
field.deleted | Triggered when fields are deleted |
Filtering by Table
Use the optionaltableId parameter to receive events only for a specific table:
{
"url": "https://your-server.com/webhook",
"events": ["record.created", "record.updated"],
"tableId": "tbl_abc123"
}
tableId to receive events from all tables in the database.
Example: Subscribe to Record Changes
curl -X POST "https://tables.zite.com/api/v1/bases/{databaseId}/webhooks" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://your-server.com/webhooks/zite",
"events": ["record.created", "record.updated", "record.deleted"]
}'
{
"id": 123,
"secret": "a1b2c3d4e5f6..."
}
Store the
secret securely - it is only returned once on creation and cannot be retrieved later. You’ll need this secret to verify webhook signatures.Authorizations
Enter your Zite API key. Format: Bearer <api_key>
Path Parameters
The unique identifier of the database
Body
application/json
The URL to receive webhook POST requests
Maximum string length:
2048Array of event types to subscribe to
Minimum array length:
1The type of database event that triggers the webhook
Available options:
record.created, record.updated, record.deleted, table.created, table.updated, table.deleted, field.created, field.updated, field.deleted Optional table ID to filter events. Omit to receive events from all tables.
⌘I
Create webhook
curl --request POST \
--url https://tables.zite.com/api/v1/bases/{databaseId}/webhooks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "https://your-server.com/webhooks/zite",
"events": [
"record.created",
"record.updated",
"record.deleted"
],
"tableId": "tbl_abc123"
}
'import requests
url = "https://tables.zite.com/api/v1/bases/{databaseId}/webhooks"
payload = {
"url": "https://your-server.com/webhooks/zite",
"events": ["record.created", "record.updated", "record.deleted"],
"tableId": "tbl_abc123"
}
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://your-server.com/webhooks/zite',
events: ['record.created', 'record.updated', 'record.deleted'],
tableId: 'tbl_abc123'
})
};
fetch('https://tables.zite.com/api/v1/bases/{databaseId}/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://tables.zite.com/api/v1/bases/{databaseId}/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([
'url' => 'https://your-server.com/webhooks/zite',
'events' => [
'record.created',
'record.updated',
'record.deleted'
],
'tableId' => 'tbl_abc123'
]),
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://tables.zite.com/api/v1/bases/{databaseId}/webhooks"
payload := strings.NewReader("{\n \"url\": \"https://your-server.com/webhooks/zite\",\n \"events\": [\n \"record.created\",\n \"record.updated\",\n \"record.deleted\"\n ],\n \"tableId\": \"tbl_abc123\"\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://tables.zite.com/api/v1/bases/{databaseId}/webhooks")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"https://your-server.com/webhooks/zite\",\n \"events\": [\n \"record.created\",\n \"record.updated\",\n \"record.deleted\"\n ],\n \"tableId\": \"tbl_abc123\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://tables.zite.com/api/v1/bases/{databaseId}/webhooks")
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://your-server.com/webhooks/zite\",\n \"events\": [\n \"record.created\",\n \"record.updated\",\n \"record.deleted\"\n ],\n \"tableId\": \"tbl_abc123\"\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"secret": "<string>"
}