Version 0.6.2  
Docs

Webhooks

Webhooks allow you to build or set up integrations which subscribe to certain events on Appwrite. When one of those events is triggered, we'll send an HTTP POST payload to the webhook's configured URL. Webhooks can be used to purge cache from CDN, calculate data or send a Slack notification. You're only limited by your imagination.

Add Your Webhook

You can set your webhook by adding it from your Appwrite project dashboard. You can access your webhooks settings from your project dashboard or on the left navigation panel. Click the 'Add Webhook' button and choose your webhook name and the events that should trigger it. You can also set an optional basic HTTP authentication username and password to protect your endpoint from unauthorized access.

Events

A list of all currently available events you can hook to:

Name Description
account.create This event triggers when the account is created.
account.update.email This event triggers when the account email address is updated.
account.update.name This event triggers when the account name is updated.
account.update.password This event triggers when the account password is updated.
account.update.prefs This event triggers when the account preferences are updated.
account.delete This event triggers when the account is deleted.
account.sessions.create This event triggers when the account session is created.
account.sessions.delete This event triggers when the account session is deleted.
database.collections.create This event triggers when a database collection is created.
database.collections.update This event triggers when a database collection is updated.
database.collections.delete This event triggers when a database collection is deleted.
database.documents.create This event triggers when a database document is created.
database.documents.patch This event triggers when a database document is patched.
database.documents.delete This event triggers when a database document is deleted.
storage.files.create This event triggers when a storage file is created.
storage.files.update This event triggers when a storage file is updated.
storage.files.delete This event triggers when a storage file is deleted.

Payload

Each event type has a specific payload format with the relevant event information. All event payloads mirror the payloads for the API payload which parallel to the event types.

Headers

HTTP requests made to your webhook's configured URL endpoint will contain several special headers:

Header Description
X-Appwrite-Webhook-Event Name of the event that triggered this delivery.
X-Appwrite-Webhook-Name Name of the webhook as specified in your app settings
User-Agent Each request made by Appwrite will be 'Appwrite-Server'