> For the complete documentation index, see [llms.txt](https://dev.guardian.hedera.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dev.guardian.hedera.com/api-reference-webhooks/webhooks.md).

# Webhooks

## GET /webhooks

> Get all webhooks

```json
{"openapi":"3.1.1","info":{"title":"Webhook API","version":"1.0.0"},"servers":[{"url":"/api"}],"paths":{"/webhooks":{"get":{"summary":"Get all webhooks","tags":["Webhooks"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Webhook"}}}}}}}}},"components":{"schemas":{"Webhook":{"type":"object","properties":{"_id":{"type":"string","description":"Unique identifier of the webhook."},"url":{"type":"string","description":"URL where the webhook will receive notifications.","format":"url"},"events":{"type":"array","description":"array with events name","format":"array","items":{"type":"string"}}}}}}}
```

## POST /webhooks

> Create a new webhook

```json
{"openapi":"3.1.1","info":{"title":"Webhook API","version":"1.0.0"},"servers":[{"url":"/api"}],"paths":{"/webhooks":{"post":{"summary":"Create a new webhook","tags":["Webhooks"],"responses":{"201":{"description":"A webhook id","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The webhook ID."}}}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook"}}},"required":true}}}},"components":{"schemas":{"Webhook":{"type":"object","properties":{"_id":{"type":"string","description":"Unique identifier of the webhook."},"url":{"type":"string","description":"URL where the webhook will receive notifications.","format":"url"},"events":{"type":"array","description":"array with events name","format":"array","items":{"type":"string"}}}}}}}
```

## GET /webhooks/{id}

> Get a webhook by id

```json
{"openapi":"3.1.1","info":{"title":"Webhook API","version":"1.0.0"},"servers":[{"url":"/api"}],"paths":{"/webhooks/{id}":{"get":{"summary":"Get a webhook by id","tags":["Webhooks"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook"}}}}}}}},"components":{"schemas":{"Webhook":{"type":"object","properties":{"_id":{"type":"string","description":"Unique identifier of the webhook."},"url":{"type":"string","description":"URL where the webhook will receive notifications.","format":"url"},"events":{"type":"array","description":"array with events name","format":"array","items":{"type":"string"}}}}}}}
```

## PUT /webhooks/{id}

> Update a webhook by id

```json
{"openapi":"3.1.1","info":{"title":"Webhook API","version":"1.0.0"},"servers":[{"url":"/api"}],"paths":{"/webhooks/{id}":{"put":{"summary":"Update a webhook by id","tags":["Webhooks"],"responses":{"204":{"description":"Success"}}}}}}
```

## DELETE /webhooks/{id}

> Delete a webhook by id

```json
{"openapi":"3.1.1","info":{"title":"Webhook API","version":"1.0.0"},"servers":[{"url":"/api"}],"paths":{"/webhooks/{id}":{"delete":{"summary":"Delete a webhook by id","tags":["Webhooks"],"responses":{"204":{"description":"Success"}}}}}}
```
