Create a webhook endpoint
POST/organization/webhooks
Subscribes an HTTPS URL to listing events. The signing secret is in the response once: store it now, you'll need it to verify deliveries. Filters must include a city.
- Authentication
- Send an admin key (dk_admin_…) as a Bearer token. Data keys are refused here.
- Scope
organization- Cost
- Free
Parameters
| Name | Type | Description |
|---|---|---|
Idempotency-Keyheader | string | A unique string (a UUID is ideal) making this call safe to retry. The same key with the same body replays the first response and sets |
Request body
| Name | Type | Description |
|---|---|---|
urlrequired | string | |
event_typesrequired | string[] | See the webhooks guide. One of: |
filtersrequired | object | Which listings this endpoint wants, in the vocabulary of GET /listings. |
description | string |
Response
The data field is an object with these fields.
| Name | Type | Description |
|---|---|---|
idrequired | string | |
urlrequired | string | |
event_typesrequired | string[] | |
filtersrequired | object | |
descriptionrequired | string | null | |
statusrequired | string | One of: |
disabled_reasonrequired | string | null |
|
consecutive_failuresrequired | integer | |
created_atrequired | string (date-time) | ISO 8601 time |
secret |
Example request
curl -X POST "https://api.kite.sa/v1/organization/webhooks" \
-H "Authorization: Bearer $KITE_ADMIN_KEY" \
-H "Content-Type: application/json" \
-d '{"url":"https://example.com/kite-webhook","event_types":["listing.created"],"filters":{"city":"riyadh"}}'import { Kite } from "@kite-sa/sdk";
const kite = new Kite({ apiKey: process.env.KITE_ADMIN_KEY });
const result = await kite.organization.webhooks.create({ url: "https://example.com/kite-webhook", event_types: ["listing.created"], filters: { city: "riyadh" } });import os
from kite_sa import Kite
kite = Kite(api_key=os.environ["KITE_ADMIN_KEY"])
result = kite.organization.webhooks.create(url="https://example.com/kite-webhook", event_types=["listing.created"], filters={"city": "riyadh"})Open in the interactive reference
Related endpoints
- Get your organization
GET /organization - List data keys
GET /organization/keys - Create a data key
POST /organization/keys - Revoke a key
POST /organization/keys/{key_id}/revoke - List projects
GET /organization/projects - Daily usage
GET /organization/usage - List members and invitations
GET /organization/members - List audit events
GET /organization/audit-events - List request logs
GET /organization/request-logs - List webhook endpoints
GET /organization/webhooks - Delete a webhook endpoint
POST /organization/webhooks/{webhook_id}/delete - List deliveries
GET /organization/webhooks/{webhook_id}/deliveries - Replay a delivery
POST /organization/webhooks/{webhook_id}/deliveries/{delivery_id}/replay