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

# Create a webhook subscription



## OpenAPI

````yaml /openapi.json post /public/v1/webhooks
openapi: 3.0.0
info:
  title: Hostreach API
  description: >-
    Public REST API for Hostreach.


    Authenticate with an API key via the `X-Api-Key` header or `Authorization:
    Bearer <key>` header.


    Generate API keys from **Settings › Workspace › Acceso API** in the
    dashboard.
  version: '1.0'
  contact: {}
servers:
  - url: https://api.hostreach.io/v1
    description: Production
  - url: http://localhost:3001/v1
    description: Local
security:
  - apiKey: []
tags:
  - name: Identity
    description: Current workspace and usage
  - name: Platforms
    description: Supported real-estate portals and filter schemas
  - name: Extractions
    description: Lead extraction jobs
  - name: Leads
    description: Lead management
  - name: Campaigns
    description: Campaign management
  - name: Messaging
    description: Inbox and WhatsApp conversations
  - name: Templates
    description: WhatsApp message templates
  - name: Accounts
    description: WhatsApp accounts
  - name: Valuations
    description: Property valuations
  - name: Fichas
    description: Property listing sheets
  - name: Scheduling
    description: Calendar and appointments
  - name: Webhooks
    description: Event subscriptions
paths:
  /public/v1/webhooks:
    post:
      tags:
        - Webhooks
      summary: Create a webhook subscription
      operationId: PublicWebhooksController_createWebhook
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - url
              properties:
                url:
                  type: string
                  format: uri
                  description: HTTPS endpoint that will receive event payloads.
                  example: https://yourapp.com/webhooks/hostreach
                secret:
                  type: string
                  description: >-
                    Secret used to sign the payload via HMAC-SHA256 (sent in
                    `X-Hostreach-Signature` header). Strongly recommended.
                name:
                  type: string
                  description: Human-readable label for this subscription.
                  example: Production webhook
                events:
                  type: array
                  items:
                    type: string
                    enum:
                      - extraction.completed
                      - leads.imported
                      - lead.status_updated
                      - lead.first_response
                  description: >-
                    Event types to subscribe to. Defaults to all events if
                    omitted.
                  example:
                    - leads.imported
                    - lead.status_updated
      responses:
        '201':
          description: ''
      security:
        - bearerApiKey: []
        - apiKey: []
components:
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: X-Api-Key
      description: >-
        API key (hr_live_... or hr_test_...). Generate from Settings › Workspace
        › Acceso API.

````