# Webhooks

Endpoints for managing webhooks that notify your systems about events in the workspace.

## List webhooks

 - [GET /public/v2/webhooks](https://developers.docue.com/platform-api/openapi/webhooks/getwebhooks.md): Fetch the webhooks registered to the authenticated workspace.

A webhook consists of a configuration (which events it listens to) and one or more endpoints (the URLs that receive the event deliveries). Use the include parameter to load the endpoints for each webhook.

Use the filter[enabled] parameter to return only enabled or only disabled webhooks, and the sort parameter to order the results.

## Create webhook

 - [POST /public/v2/webhooks](https://developers.docue.com/platform-api/openapi/webhooks/createwebhook.md): Register a new webhook for the workspace. Provide the events the webhook should listen to in accepted_events, and one or more endpoints that receive the deliveries.

Each endpoint can be secured with an optional auth_type and credentials. Use basic with a username and password, or bearer with a token. Credentials are write-only and are never returned in API responses.

## Update webhook

 - [PATCH /public/v2/webhooks/{id}](https://developers.docue.com/platform-api/openapi/webhooks/updatewebhook.md): Update an existing webhook. Only the fields included in the request are changed; omitted fields are left untouched.

Providing endpoints replaces the webhook's existing endpoints with the supplied set.

## Delete webhook

 - [DELETE /public/v2/webhooks/{id}](https://developers.docue.com/platform-api/openapi/webhooks/deletewebhook.md): Delete a webhook and all of its endpoints from the workspace. The webhook stops receiving event deliveries immediately.

## Test webhook

 - [POST /public/v2/webhooks/{id}/test/{documentId}](https://developers.docue.com/platform-api/openapi/webhooks/testwebhook.md): Send a test delivery to the webhook's endpoints. The given document is used to build a document-updated event, which is then dispatched to the webhook so you can verify that your endpoints receive and process deliveries correctly.

The event is dispatched regardless of the webhook's accepted_events, so the webhook does not need to listen to document-updated to be testable.

