# Webhooks

## List Webhooks

`TOOL discourse_list_webhooks`

List safe webhook summaries and the live authoring catalog without exposing webhook secrets or destination credentials.

Authentication: no security requirement declared for this operation.

Parameters:

- `offset` (argument, integer, optional)
  Type: integer
  
  minimum: 0

- `limit` (argument, integer, optional)
  Type: integer
  
  minimum: 1
  
  maximum: 50

- `active` (argument, boolean, optional)
  Type: boolean

- `delivery_status` (argument, string, optional)
  Type: string
  
  enum: ["inactive","failed","successful","disabled"]

- `include_catalog` (argument, boolean, optional)
  Type: boolean

Declared MCP annotations:

```json
{
  "readOnlyHint": true,
  "destructiveHint": false,
  "idempotentHint": true,
  "openWorldHint": true
}
```

## Examples

### JSON-RPC

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "discourse_list_webhooks",
    "arguments": {
        "offset": 0,
        "limit": 1,
        "active": true,
        "delivery_status": "inactive",
        "include_catalog": true
      }
  }
}
```

### TypeScript

```typescript
const result = await client.callTool({
  "name": "discourse_list_webhooks",
  "arguments": {
    "offset": 0,
    "limit": 1,
    "active": true,
    "delivery_status": "inactive",
    "include_catalog": true
  }
});
```

### Python

```python
result = await session.call_tool("discourse_list_webhooks", arguments={
  "offset": 0,
  "limit": 1,
  "active": true,
  "delivery_status": "inactive",
  "include_catalog": true
})
```


## Get Webhook

`TOOL discourse_get_webhook`

Get one fresh safe webhook configuration for inspection and mutation preconditions.

Authentication: no security requirement declared for this operation.

Parameters:

- `webhook_id` (argument, integer, required)
  Type: integer
  
  exclusiveMinimum: 0

- `include_catalog` (argument, boolean, optional)
  Type: boolean

Declared MCP annotations:

```json
{
  "readOnlyHint": true,
  "destructiveHint": false,
  "idempotentHint": true,
  "openWorldHint": true
}
```

## Examples

### JSON-RPC

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "discourse_get_webhook",
    "arguments": {
        "webhook_id": 0,
        "include_catalog": true
      }
  }
}
```

### TypeScript

```typescript
const result = await client.callTool({
  "name": "discourse_get_webhook",
  "arguments": {
    "webhook_id": 0,
    "include_catalog": true
  }
});
```

### Python

```python
result = await session.call_tool("discourse_get_webhook", arguments={
  "webhook_id": 0,
  "include_catalog": true
})
```


## Create Webhook

`TOOL discourse_create_webhook`

Create a guarded outbound webhook using the live event and content-type catalog. External delivery and risky options require explicit confirmation.

Authentication: no security requirement declared for this operation.

Parameters:

- `payload_url` (argument, string, uri, required)
  Type: string, uri
  
  maxLength: 2048

- `content_type` (argument, string, required)
  Type: string
  
  enum: ["application/json","application/x-www-form-urlencoded"]

- `secret` (argument, string, optional)
  Type: string
  
  minLength: 12
  
  maxLength: 1024

- `active` (argument, boolean, optional)
  Type: boolean

- `verify_certificate` (argument, boolean, optional)
  Type: boolean

- `wildcard_web_hook` (argument, boolean, optional)
  Type: boolean

- `event_type_ids` (argument, Array<integer>, optional)
  Type: Array<integer>
  
  maxItems: 100
  
  Items:
    Type: integer
    
    exclusiveMinimum: 0

- `category_ids` (argument, Array<integer>, optional)
  Type: Array<integer>
  
  maxItems: 100
  
  Items:
    Type: integer
    
    exclusiveMinimum: 0

- `tag_ids` (argument, Array<integer>, optional)
  Type: Array<integer>
  
  maxItems: 100
  
  Items:
    Type: integer
    
    exclusiveMinimum: 0

- `group_ids` (argument, Array<integer>, optional)
  Type: Array<integer>
  
  maxItems: 100
  
  Items:
    Type: integer
    
    exclusiveMinimum: 0

- `confirm_activate` (argument, boolean, optional)
  Type: boolean
  
  const: true

- `confirm_wildcard` (argument, boolean, optional)
  Type: boolean
  
  const: true

- `confirm_insecure_http` (argument, boolean, optional)
  Type: boolean
  
  const: true

- `confirm_disable_tls_verification` (argument, boolean, optional)
  Type: boolean
  
  const: true

- `confirm_external_delivery` (argument, boolean, required)
  Type: boolean
  
  const: true

Declared MCP annotations:

```json
{
  "readOnlyHint": false,
  "destructiveHint": false,
  "idempotentHint": false,
  "openWorldHint": true
}
```

## Examples

### JSON-RPC

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "discourse_create_webhook",
    "arguments": {
        "payload_url": "https://example.com",
        "content_type": "application/json",
        "secret": "string",
        "active": true,
        "verify_certificate": true,
        "wildcard_web_hook": true,
        "event_type_ids": [
          0
        ],
        "category_ids": [
          0
        ],
        "tag_ids": [
          0
        ],
        "group_ids": [
          0
        ],
        "confirm_activate": true,
        "confirm_wildcard": true,
        "confirm_insecure_http": true,
        "confirm_disable_tls_verification": true,
        "confirm_external_delivery": true
      }
  }
}
```

### TypeScript

```typescript
const result = await client.callTool({
  "name": "discourse_create_webhook",
  "arguments": {
    "payload_url": "https://example.com",
    "content_type": "application/json",
    "secret": "string",
    "active": true,
    "verify_certificate": true,
    "wildcard_web_hook": true,
    "event_type_ids": [
      0
    ],
    "category_ids": [
      0
    ],
    "tag_ids": [
      0
    ],
    "group_ids": [
      0
    ],
    "confirm_activate": true,
    "confirm_wildcard": true,
    "confirm_insecure_http": true,
    "confirm_disable_tls_verification": true,
    "confirm_external_delivery": true
  }
});
```

### Python

```python
result = await session.call_tool("discourse_create_webhook", arguments={
  "payload_url": "https://example.com",
  "content_type": "application/json",
  "secret": "string",
  "active": true,
  "verify_certificate": true,
  "wildcard_web_hook": true,
  "event_type_ids": [
    0
  ],
  "category_ids": [
    0
  ],
  "tag_ids": [
    0
  ],
  "group_ids": [
    0
  ],
  "confirm_activate": true,
  "confirm_wildcard": true,
  "confirm_insecure_http": true,
  "confirm_disable_tls_verification": true,
  "confirm_external_delivery": true
})
```


## Update Webhook

`TOOL discourse_update_webhook`

Partially update a webhook after fresh destination and active-state preconditions. Relationship arrays are complete replacements.

Authentication: no security requirement declared for this operation.

Parameters:

- `payload_url` (argument, string, uri, optional)
  Type: string, uri
  
  maxLength: 2048

- `content_type` (argument, string, optional)
  Type: string
  
  enum: ["application/json","application/x-www-form-urlencoded"]

- `secret` (argument, string, optional)
  Type: string
  
  maxLength: 1024

- `active` (argument, boolean, optional)
  Type: boolean

- `verify_certificate` (argument, boolean, optional)
  Type: boolean

- `wildcard_web_hook` (argument, boolean, optional)
  Type: boolean

- `event_type_ids` (argument, Array<integer>, optional)
  Type: Array<integer>
  
  maxItems: 100
  
  Items:
    Type: integer
    
    exclusiveMinimum: 0

- `category_ids` (argument, Array<integer>, optional)
  Type: Array<integer>
  
  maxItems: 100
  
  Items:
    Type: integer
    
    exclusiveMinimum: 0

- `tag_ids` (argument, Array<integer>, optional)
  Type: Array<integer>
  
  maxItems: 100
  
  Items:
    Type: integer
    
    exclusiveMinimum: 0

- `group_ids` (argument, Array<integer>, optional)
  Type: Array<integer>
  
  maxItems: 100
  
  Items:
    Type: integer
    
    exclusiveMinimum: 0

- `confirm_activate` (argument, boolean, optional)
  Type: boolean
  
  const: true

- `confirm_wildcard` (argument, boolean, optional)
  Type: boolean
  
  const: true

- `confirm_insecure_http` (argument, boolean, optional)
  Type: boolean
  
  const: true

- `confirm_disable_tls_verification` (argument, boolean, optional)
  Type: boolean
  
  const: true

- `webhook_id` (argument, integer, required)
  Type: integer
  
  exclusiveMinimum: 0

- `expected_destination_fingerprint` (argument, string, required)
  Type: string
  
  pattern: "^[a-f0-9]{64}$"

- `expected_active` (argument, boolean, required)
  Type: boolean

- `confirm_update` (argument, boolean, required)
  Type: boolean
  
  const: true

- `confirm_scope_replacement` (argument, boolean, optional)
  Type: boolean
  
  const: true

- `confirm_clear_secret` (argument, boolean, optional)
  Type: boolean
  
  const: true

Declared MCP annotations:

```json
{
  "readOnlyHint": false,
  "destructiveHint": true,
  "idempotentHint": false,
  "openWorldHint": true
}
```

## Examples

### JSON-RPC

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "discourse_update_webhook",
    "arguments": {
        "payload_url": "https://example.com",
        "content_type": "application/json",
        "secret": "string",
        "active": true,
        "verify_certificate": true,
        "wildcard_web_hook": true,
        "event_type_ids": [
          0
        ],
        "category_ids": [
          0
        ],
        "tag_ids": [
          0
        ],
        "group_ids": [
          0
        ],
        "confirm_activate": true,
        "confirm_wildcard": true,
        "confirm_insecure_http": true,
        "confirm_disable_tls_verification": true,
        "webhook_id": 0,
        "expected_destination_fingerprint": "string",
        "expected_active": true,
        "confirm_update": true,
        "confirm_scope_replacement": true,
        "confirm_clear_secret": true
      }
  }
}
```

### TypeScript

```typescript
const result = await client.callTool({
  "name": "discourse_update_webhook",
  "arguments": {
    "payload_url": "https://example.com",
    "content_type": "application/json",
    "secret": "string",
    "active": true,
    "verify_certificate": true,
    "wildcard_web_hook": true,
    "event_type_ids": [
      0
    ],
    "category_ids": [
      0
    ],
    "tag_ids": [
      0
    ],
    "group_ids": [
      0
    ],
    "confirm_activate": true,
    "confirm_wildcard": true,
    "confirm_insecure_http": true,
    "confirm_disable_tls_verification": true,
    "webhook_id": 0,
    "expected_destination_fingerprint": "string",
    "expected_active": true,
    "confirm_update": true,
    "confirm_scope_replacement": true,
    "confirm_clear_secret": true
  }
});
```

### Python

```python
result = await session.call_tool("discourse_update_webhook", arguments={
  "payload_url": "https://example.com",
  "content_type": "application/json",
  "secret": "string",
  "active": true,
  "verify_certificate": true,
  "wildcard_web_hook": true,
  "event_type_ids": [
    0
  ],
  "category_ids": [
    0
  ],
  "tag_ids": [
    0
  ],
  "group_ids": [
    0
  ],
  "confirm_activate": true,
  "confirm_wildcard": true,
  "confirm_insecure_http": true,
  "confirm_disable_tls_verification": true,
  "webhook_id": 0,
  "expected_destination_fingerprint": "string",
  "expected_active": true,
  "confirm_update": true,
  "confirm_scope_replacement": true,
  "confirm_clear_secret": true
})
```


## Delete Webhook

`TOOL discourse_delete_webhook`

Delete one webhook after a fresh exact destination-fingerprint precondition.

Authentication: no security requirement declared for this operation.

Parameters:

- `webhook_id` (argument, integer, required)
  Type: integer
  
  exclusiveMinimum: 0

- `expected_destination_fingerprint` (argument, string, required)
  Type: string
  
  pattern: "^[a-f0-9]{64}$"

- `confirm_delete` (argument, boolean, required)
  Type: boolean
  
  const: true

Declared MCP annotations:

```json
{
  "readOnlyHint": false,
  "destructiveHint": true,
  "idempotentHint": false,
  "openWorldHint": true
}
```

## Examples

### JSON-RPC

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "discourse_delete_webhook",
    "arguments": {
        "webhook_id": 0,
        "expected_destination_fingerprint": "string",
        "confirm_delete": true
      }
  }
}
```

### TypeScript

```typescript
const result = await client.callTool({
  "name": "discourse_delete_webhook",
  "arguments": {
    "webhook_id": 0,
    "expected_destination_fingerprint": "string",
    "confirm_delete": true
  }
});
```

### Python

```python
result = await session.call_tool("discourse_delete_webhook", arguments={
  "webhook_id": 0,
  "expected_destination_fingerprint": "string",
  "confirm_delete": true
})
```


## List Webhook Events

`TOOL discourse_list_webhook_events`

List bounded webhook delivery diagnostics. Payload and response previews are omitted unless explicitly confirmed.

Authentication: no security requirement declared for this operation.

Parameters:

- `webhook_id` (argument, integer, required)
  Type: integer
  
  exclusiveMinimum: 0

- `status` (argument, string, optional)
  Type: string
  
  enum: ["all","successful","failed"]

- `offset` (argument, integer, optional)
  Type: integer
  
  minimum: 0

- `include_content` (argument, boolean, optional)
  Type: boolean

- `confirm_sensitive_content` (argument, boolean, optional)
  Type: boolean
  
  const: true

- `content_limit` (argument, integer, optional)
  Type: integer
  
  minimum: 100
  
  maximum: 20000

Declared MCP annotations:

```json
{
  "readOnlyHint": true,
  "destructiveHint": false,
  "idempotentHint": true,
  "openWorldHint": true
}
```

## Examples

### JSON-RPC

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "discourse_list_webhook_events",
    "arguments": {
        "webhook_id": 0,
        "status": "all",
        "offset": 0,
        "include_content": true,
        "confirm_sensitive_content": true,
        "content_limit": 100
      }
  }
}
```

### TypeScript

```typescript
const result = await client.callTool({
  "name": "discourse_list_webhook_events",
  "arguments": {
    "webhook_id": 0,
    "status": "all",
    "offset": 0,
    "include_content": true,
    "confirm_sensitive_content": true,
    "content_limit": 100
  }
});
```

### Python

```python
result = await session.call_tool("discourse_list_webhook_events", arguments={
  "webhook_id": 0,
  "status": "all",
  "offset": 0,
  "include_content": true,
  "confirm_sensitive_content": true,
  "content_limit": 100
})
```


## Ping Webhook

`TOOL discourse_ping_webhook`

Enqueue one explicitly confirmed external webhook ping after a fresh destination precondition.

Authentication: no security requirement declared for this operation.

Parameters:

- `webhook_id` (argument, integer, required)
  Type: integer
  
  exclusiveMinimum: 0

- `expected_destination_fingerprint` (argument, string, required)
  Type: string
  
  pattern: "^[a-f0-9]{64}$"

- `confirm_external_request` (argument, boolean, required)
  Type: boolean
  
  const: true

Declared MCP annotations:

```json
{
  "readOnlyHint": false,
  "destructiveHint": false,
  "idempotentHint": false,
  "openWorldHint": true
}
```

## Examples

### JSON-RPC

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "discourse_ping_webhook",
    "arguments": {
        "webhook_id": 0,
        "expected_destination_fingerprint": "string",
        "confirm_external_request": true
      }
  }
}
```

### TypeScript

```typescript
const result = await client.callTool({
  "name": "discourse_ping_webhook",
  "arguments": {
    "webhook_id": 0,
    "expected_destination_fingerprint": "string",
    "confirm_external_request": true
  }
});
```

### Python

```python
result = await session.call_tool("discourse_ping_webhook", arguments={
  "webhook_id": 0,
  "expected_destination_fingerprint": "string",
  "confirm_external_request": true
})
```


## Redeliver Webhook Event

`TOOL discourse_redeliver_webhook_event`

Redeliver exactly one old webhook event after destination, ownership, and status preconditions. Bulk redelivery is not exposed.

Authentication: no security requirement declared for this operation.

Parameters:

- `webhook_id` (argument, integer, required)
  Type: integer
  
  exclusiveMinimum: 0

- `event_id` (argument, integer, required)
  Type: integer
  
  exclusiveMinimum: 0

- `expected_destination_fingerprint` (argument, string, required)
  Type: string
  
  pattern: "^[a-f0-9]{64}$"

- `expected_event_status` (argument, integer, required)
  Type: integer
  
  minimum: -1
  
  maximum: 999

- `confirm_redelivery` (argument, boolean, required)
  Type: boolean
  
  const: true

Declared MCP annotations:

```json
{
  "readOnlyHint": false,
  "destructiveHint": true,
  "idempotentHint": false,
  "openWorldHint": true
}
```

## Examples

### JSON-RPC

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "discourse_redeliver_webhook_event",
    "arguments": {
        "webhook_id": 0,
        "event_id": 0,
        "expected_destination_fingerprint": "string",
        "expected_event_status": -1,
        "confirm_redelivery": true
      }
  }
}
```

### TypeScript

```typescript
const result = await client.callTool({
  "name": "discourse_redeliver_webhook_event",
  "arguments": {
    "webhook_id": 0,
    "event_id": 0,
    "expected_destination_fingerprint": "string",
    "expected_event_status": -1,
    "confirm_redelivery": true
  }
});
```

### Python

```python
result = await session.call_tool("discourse_redeliver_webhook_event", arguments={
  "webhook_id": 0,
  "event_id": 0,
  "expected_destination_fingerprint": "string",
  "expected_event_status": -1,
  "confirm_redelivery": true
})
```
