Project webhooks: HTTP notices when something happens.
Class Webhooks: 6 methods (0 in @owbase/web, 6 in @owbase/node). The examples use the object form of the parameters; replace the values between < and > with your own.
List webhooks
GET /webhooks · method page
SDK: @owbase/node only
Get a list of all webhooks belonging to the project. You can use the query params to filter your results.
| Parameter | Type | Required | Description |
|---|---|---|---|
queries |
string[] |
no | Array of query strings generated using the Query class provided by the SDK. Learn more about queries. Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, url, authUsername, tls, events, enabled, logs, attempts |
total |
boolean |
no | When set to false, the total count returned will be 0 and will not be calculated. |
Access: API key with the webhooks.read scope.
import { Client, Webhooks } from '@owbase/node';
const client = new Client() .setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint .setProject('<YOUR_PROJECT_ID>') // Your project ID .setKey('<YOUR_API_KEY>'); // Your secret API key
const webhooks = new Webhooks(client);
const result = await webhooks.list({ queries: [], // optional total: false, // optional});create
Section titled “create”Create webhook
POST /webhooks · method page
SDK: @owbase/node only
Create a new webhook. Use this endpoint to configure a URL that will receive events from Owbase when specific events occur.
| Parameter | Type | Required | Description |
|---|---|---|---|
webhookId |
string |
yes | Webhook ID. Choose a custom ID or generate a random ID with ID.unique(). Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can’t start with a special char. Max length is 36 chars. |
url |
string |
yes | Webhook URL. |
name |
string |
yes | Webhook name. Max length: 128 chars. |
events |
string[] |
yes | Events list. Maximum of 100 events are allowed. |
enabled |
boolean |
no | Enable or disable a webhook. |
tls |
boolean |
no | Certificate verification, false for disabled or true for enabled. |
authUsername |
string |
no | Webhook HTTP user. Max length: 255 chars. |
authPassword |
string |
no | Webhook HTTP password. Max length: 2048 chars. |
secret |
string |
no | Webhook secret key. If not provided, a new key will be generated automatically. Key must be at least 8 characters long, and at max 256 characters. |
description |
string |
no | Optional description for the webhook. |
headers |
object |
no | Custom HTTP headers sent with every delivery, as an object of name and value, for example {“Authorization”:“Bearer token”}. Up to 10 headers. Write-only: the values are never returned, only their names (headerNames). On update, omit to keep the current headers, send an object to replace them or an empty object to remove them; they are removed when the URL changes or TLS verification is disabled. |
bodyTemplate |
string |
no | Optional body template. Empty sends the event JSON. Otherwise the template is sent after each {{variable}} becomes its JSON value. Variables: event, events, projectId, webhookId, deliveryId, timestamp, payload and payload.<path>. Max length: 4096 chars. |
Access: API key with the webhooks.write scope.
import { Client, Webhooks } from '@owbase/node';
const client = new Client() .setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint .setProject('<YOUR_PROJECT_ID>') // Your project ID .setKey('<YOUR_API_KEY>'); // Your secret API key
const webhooks = new Webhooks(client);
const result = await webhooks.create({ webhookId: '<WEBHOOK_ID>', url: 'https://example.com/webhook', name: '<NAME>', events: ['users.*.create'], enabled: false, // optional tls: false, // optional authUsername: '<AUTH_USERNAME>', // optional authPassword: 'password', // optional secret: '<SECRET>', // optional description: '<DESCRIPTION>', // optional headers: {}, // optional bodyTemplate: '<BODY_TEMPLATE>', // optional});Get webhook
GET /webhooks/{webhookId} · method page
SDK: @owbase/node only
Get a webhook by its unique ID. This endpoint returns details about a specific webhook configured for a project.
| Parameter | Type | Required | Description |
|---|---|---|---|
webhookId |
string |
yes | Webhook ID. |
Access: API key with the webhooks.read scope.
import { Client, Webhooks } from '@owbase/node';
const client = new Client() .setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint .setProject('<YOUR_PROJECT_ID>') // Your project ID .setKey('<YOUR_API_KEY>'); // Your secret API key
const webhooks = new Webhooks(client);
const result = await webhooks.get({ webhookId: '<WEBHOOK_ID>',});update
Section titled “update”Update webhook
PUT /webhooks/{webhookId} · method page
SDK: @owbase/node only
Update a webhook by its unique ID. Use this endpoint to update the URL, events, or status of an existing webhook.
| Parameter | Type | Required | Description |
|---|---|---|---|
webhookId |
string |
yes | Webhook ID. |
name |
string |
yes | Webhook name. Max length: 128 chars. |
url |
string |
yes | Webhook URL. |
events |
string[] |
yes | Events list. Maximum of 100 events are allowed. |
enabled |
boolean |
no | Enable or disable a webhook. |
tls |
boolean |
no | Certificate verification, false for disabled or true for enabled. |
authUsername |
string |
no | Webhook HTTP user. Max length: 255 chars. |
authPassword |
string |
no | Webhook HTTP password. Max length: 2048 chars. Omit to keep the current password; it is cleared when the URL changes or TLS verification is disabled. |
description |
string |
no | Optional description for the webhook. |
headers |
object |
no | Custom HTTP headers sent with every delivery, as an object of name and value, for example {“Authorization”:“Bearer token”}. Up to 10 headers. Write-only: the values are never returned, only their names (headerNames). On update, omit to keep the current headers, send an object to replace them or an empty object to remove them; they are removed when the URL changes or TLS verification is disabled. |
bodyTemplate |
string |
no | Optional body template. Omit to keep the current one, send an empty text to go back to the event JSON. Variables: event, events, projectId, webhookId, deliveryId, timestamp, payload and payload.<path>. Max length: 4096 chars. |
Access: API key with the webhooks.write scope.
import { Client, Webhooks } from '@owbase/node';
const client = new Client() .setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint .setProject('<YOUR_PROJECT_ID>') // Your project ID .setKey('<YOUR_API_KEY>'); // Your secret API key
const webhooks = new Webhooks(client);
const result = await webhooks.update({ webhookId: '<WEBHOOK_ID>', name: '<NAME>', url: 'https://example.com/webhook', events: ['users.*.create'], enabled: false, // optional tls: false, // optional authUsername: '<AUTH_USERNAME>', // optional authPassword: 'password', // optional description: '<DESCRIPTION>', // optional headers: {}, // optional bodyTemplate: '<BODY_TEMPLATE>', // optional});delete
Section titled “delete”Delete webhook
DELETE /webhooks/{webhookId} · method page
SDK: @owbase/node only
Delete a webhook by its unique ID. Once deleted, the webhook will no longer receive project events.
| Parameter | Type | Required | Description |
|---|---|---|---|
webhookId |
string |
yes | Webhook ID. |
Access: API key with the webhooks.write scope.
import { Client, Webhooks } from '@owbase/node';
const client = new Client() .setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint .setProject('<YOUR_PROJECT_ID>') // Your project ID .setKey('<YOUR_API_KEY>'); // Your secret API key
const webhooks = new Webhooks(client);
const result = await webhooks.delete({ webhookId: '<WEBHOOK_ID>',});updateSecret
Section titled “updateSecret”Update webhook secret key
PATCH /webhooks/{webhookId}/secret · method page
SDK: @owbase/node only
Update the webhook signing key. This endpoint can be used to regenerate the signing key used to sign and validate payload deliveries for a specific webhook.
| Parameter | Type | Required | Description |
|---|---|---|---|
webhookId |
string |
yes | Webhook ID. |
secret |
string |
no | Webhook secret key. If not provided, a new key will be generated automatically. Key must be at least 8 characters long, and at max 256 characters. |
Access: API key with the webhooks.write scope.
import { Client, Webhooks } from '@owbase/node';
const client = new Client() .setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint .setProject('<YOUR_PROJECT_ID>') // Your project ID .setKey('<YOUR_API_KEY>'); // Your secret API key
const webhooks = new Webhooks(client);
const result = await webhooks.updateSecret({ webhookId: '<WEBHOOK_ID>', secret: '<SECRET>', // optional});The descriptions on this page come from the server API specification (BSD-3-Clause license), and the examples come from the SDK generator (MIT license). The full notices are in the NOTICE file of the @owbase/web and @owbase/node packages.