> ## Documentation Index
> Fetch the complete documentation index at: https://developer.surefeedback.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create webhook

> Register a new webhook endpoint.

Registers a new webhook URL to receive real-time event notifications.

## Request body

<ParamField body="url" type="string" required>
  The HTTPS URL that will receive POST requests when events fire.
</ParamField>

<ParamField body="events" type="array" required>
  Array of event types to subscribe to. See supported events below.
</ParamField>

<ParamField body="secret" type="string">
  Optional secret used to sign webhook payloads. Verify the `X-Signature` header to ensure requests are from SureFeedback.
</ParamField>

## Supported events

| Event              | Trigger                         |
| ------------------ | ------------------------------- |
| `comment.created`  | A new comment is posted         |
| `comment.resolved` | A comment is resolved           |
| `comment.assigned` | A comment is assigned to a user |
| `comment.replied`  | A reply is added to a comment   |
| `page.approved`    | A page is marked as approved    |
| `page.unapproved`  | A page's approval is removed    |

<ResponseExample>
  ```json 201 theme={null}
  {
    "success": true,
    "data": {
      "id": "dd0e8400-e29b-41d4-a716-446655440008",
      "url": "https://myapp.com/webhooks/surefeedback",
      "events": ["comment.created", "comment.resolved"],
      "is_active": true,
      "created_at": "2026-03-02T12:00:00Z"
    }
  }
  ```
</ResponseExample>
