# org.tangled.webhook.updateWebhook

> Update an existing webhook. Only supplied fields are changed.

- Kind: procedure
- Authority: webhook.tangled.org
- Lexicon: 1
- Published by [tangled.org](https://lexicon.garden/identity/did:plc:wshs7t2adsemcrrd4snkeqli), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:wshs7t2adsemcrrd4snkeqli/org.tangled.webhook.updateWebhook)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:wshs7t2adsemcrrd4snkeqli/org.tangled.webhook.updateWebhook/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:wshs7t2adsemcrrd4snkeqli/org.tangled.webhook.updateWebhook/analytics)

## Procedure (`org.tangled.webhook.updateWebhook`)

Type: procedure · POST

### Input (application/json)

- `active` (boolean)
- `events` (array)
  - `items` (ref)
    - Reference: `org.tangled.webhook.defs#eventType`
- `repo` (string · did, required): DID of the repository as minted by the knot.
- `secret` (string)
- `url` (string · uri)
- `webhook` (string, required): Webhook ID to update.

### Errors

- `WebhookNotFound`: No description in schema.

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Update an existing webhook. Only supplied fields are changed.",
      "errors": [
        {
          "name": "WebhookNotFound"
        }
      ],
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "active": {
              "type": "boolean"
            },
            "events": {
              "items": {
                "ref": "org.tangled.webhook.defs#eventType",
                "type": "ref"
              },
              "type": "array"
            },
            "repo": {
              "description": "DID of the repository as minted by the knot.",
              "format": "did",
              "type": "string"
            },
            "secret": {
              "type": "string"
            },
            "url": {
              "format": "uri",
              "type": "string"
            },
            "webhook": {
              "description": "Webhook ID to update.",
              "type": "string"
            }
          },
          "required": [
            "repo",
            "webhook"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "id": "org.tangled.webhook.updateWebhook",
  "lexicon": 1
}
```
