Skip to content

Announcing the Webhooks API: Manage webhooks programmatically with Server SDKs_

Webhooks are no longer console-only. Create, update, and delete webhooks using the Appwrite Server SDKs and API keys with the new webhooks.read and webhooks.write scopes.

4 min read

Webhooks have always been a core part of how developers integrate Appwrite into their workflows. Subscribe to an event, receive an HTTP POST, and let your server handle the rest. Until now, managing those webhooks meant logging into the Appwrite Console and configuring them by hand.

Today, we are announcing the Webhooks API, a fully programmable interface for managing webhooks through Server SDKs and API keys.

Why this matters

If you have ever needed to set up webhooks across multiple projects, automate webhook provisioning as part of a deployment pipeline, or manage webhook lifecycles from code, you know the friction of doing it through a UI.

The Webhooks API removes that friction entirely. Webhooks become just another resource you can create, update, and delete programmatically, the same way you already manage databases, functions, and storage buckets.

This is especially valuable for:

  • CI/CD pipelines that need to register webhooks as part of environment setup
  • Multi-tenant platforms that provision webhooks per customer or workspace
  • Migration and seeding scripts that replicate webhook configurations across environments
  • Admin dashboards that let non-technical team members manage webhooks without Console access

How it works

The Webhooks API introduces two new API key scopes:

  • webhooks.read for listing and retrieving webhooks
  • webhooks.write for creating, updating, and deleting webhooks

Once your API key has the appropriate scopes, you can manage webhooks through any Appwrite Server SDK. To get started:

  1. Navigate to Overview > Integration > API keys and create or update an API key with the webhooks.read and webhooks.write scopes.
  2. Initialize a Server SDK with your API key.
  3. Use the Webhooks service to manage your webhooks from code.

Create a webhook

The response includes a secret field containing the webhook's signing key. This is the only time the secret is returned, so store it securely right away.

Node.js
import { Client, Webhooks, ID } from 'node-appwrite';

const client = new Client()
    .setEndpoint('https://<REGION>.cloud.appwrite.io/v1')
    .setProject('<PROJECT_ID>')
    .setKey('<YOUR_API_KEY>');

const webhooks = new Webhooks(client);

const result = await webhooks.create({
    webhookId: ID.unique(),
    url: 'https://example.com/webhook',
    name: 'My Webhook',
    events: ['users.*.create', 'users.*.update'],
    tls: true,
    secret: '<SECRET>' // optional
});

console.log(result.secret); // store it now, not returned again

Update a webhook

Node.js
const result = await webhooks.update({
    webhookId: '<WEBHOOK_ID>',
    name: 'Updated Webhook',
    url: 'https://example.com/webhook-v2',
    events: ['users.*.create', 'users.*.update', 'users.*.delete'],
    tls: true
});

Delete a webhook

Node.js
await webhooks.delete({
    webhookId: '<WEBHOOK_ID>'
});

Rotate signing key

By default, calling updateSecret generates a fresh random signing key. You can also pass your own secret (8-256 characters), which is useful for zero-downtime key rotation.

Node.js
const result = await webhooks.updateSecret({
    webhookId: '<WEBHOOK_ID>',
    secret: '<SECRET>' // optional
});

The API supports all the same configuration options available in the Console, including event selection, SSL/TLS certificate verification, and HTTP basic authentication.

Get started

The Webhooks API is available on Appwrite Cloud today. Full documentation, including examples for all supported SDKs, is available on the webhooks documentation page.

Resources

The Webhooks API is a programmable interface for managing Appwrite webhooks through Server SDKs and API keys. Instead of clicking through the Console, you can create, list, update, and delete webhooks from code, the same way you already manage databases, Functions, and storage buckets.

You need webhooks.read for listing and retrieving webhooks, and webhooks.write for creating, updating, and deleting them. Create or update an API key under Overview > Integration > API keys with the scopes you need.

The secret field is only returned in the response of the create call, never again. Save it to your secret manager or environment variables right away so you can verify webhook signatures when events are delivered to your endpoint.

Use it whenever webhook configuration is part of a workflow that should be reproducible. Common cases include CI/CD pipelines that register webhooks during environment setup, multi-tenant platforms that provision per-customer webhooks, and migration scripts that replicate webhooks across environments.

Webhooks deliver event payloads to an HTTP endpoint you control, so the logic runs in your own infrastructure. Functions run inside Appwrite and can be triggered by the same events, which is useful when you do not want to host a separate server.

Read next

Ready to build?_