# 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"}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://dev.guardian.hedera.com/api-reference-webhooks/webhooks.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
