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

# Create webhook

> Create a webhook subscription

Subscribe to events by providing a URL that will receive `POST` requests when events occur. Each webhook is signed with HMAC-SHA256 for verification.

**Scope required:** `webhooks:write`

## Request body

<ParamField body="url" type="string" required>
  HTTPS endpoint URL that will receive webhook payloads.
</ParamField>

<ParamField body="events" type="array" required>
  List of event types to subscribe to. See [Webhook events](/api-reference/reference/webhook-events) for all options.
</ParamField>

## Response

Returns the subscription details including the signing `secret`. Save this secret - it is only shown once.

<ResponseExample>
  ```json 201 theme={"theme":{"light":"github-light","dark":"github-dark"}}
  {
    "data": {
      "id": "008ca3b4-3e47-48bd-89d0-cd3d46689f30",
      "url": "https://webhook.site/test-endpoint",
      "events": [
        "content.completed",
        "ideacloud.completed"
      ],
      "secret": "c7788a44ceaa36581f2d11be7efca748cfe10389310c762888242be609372395",
      "is_active": true,
      "created_at": "2026-02-28T11:46:25.244782+00:00"
    }
  }
  ```
</ResponseExample>

<Danger>
  Save the `secret` value immediately. It is only returned when the webhook is created and cannot be retrieved later. You will need it to verify incoming [webhook signatures](/webhooks#verifying-signatures).
</Danger>


## OpenAPI

````yaml POST /webhooks
openapi: 3.1.0
info:
  title: Hrizn Public API
  version: 1.2.0
  description: >
    The Hrizn Public API allows partners to programmatically create content,
    manage inventory descriptions, and integrate with the Hrizn platform.


    All endpoints are prefixed with `/public` and require an API key passed via
    the `X-API-Key` header (except the health check).
  contact:
    email: support@hrizn.io
servers:
  - url: https://api.app.hrizn.io/v1/public
    description: Production
security:
  - apiKeyAuth: []
tags:
  - name: IdeaClouds
    description: Create and manage AI-powered keyword research
  - name: Content Intelligence
    description: AI-powered content gap analysis and recommendations
  - name: Content
    description: Generate content from IdeaClouds
  - name: Compliance
    description: Run OEM compliance checks on content
  - name: Content Tools
    description: Generate SEO metadata, schemas, and social snippets
  - name: Inventory
    description: Access vehicle data and AI descriptions
  - name: Site
    description: View dealership details and configuration
  - name: Webhooks
    description: Manage webhook subscriptions for real-time events
  - name: Reference
    description: Look up available types, scopes, and events
  - name: Social
    description: >-
      Zernio-backed social posting and reviews across all connected platforms
      (X, Facebook, Instagram, LinkedIn, Google Business Profile)
  - name: Health
    description: Health check (no authentication)
paths:
  /webhooks:
    post:
      tags:
        - Webhooks
      summary: Create webhook subscription
      description: >-
        Creates a new webhook. The response includes a secret for HMAC
        verification (only shown once).
      operationId: createWebhook
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateWebhookInput'
      responses:
        '201':
          description: Webhook created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookCreatedResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  schemas:
    CreateWebhookInput:
      type: object
      required:
        - url
        - events
      properties:
        url:
          type: string
          format: uri
          description: HTTPS URL to receive webhooks
        events:
          type: array
          items:
            $ref: '#/components/schemas/WebhookEventType'
          minItems: 1
    WebhookCreatedResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            id:
              type: string
            url:
              type: string
            events:
              type: array
              items:
                type: string
            secret:
              type: string
              description: HMAC secret (only returned at creation)
            is_active:
              type: boolean
            created_at:
              type: string
              format: date-time
    WebhookEventType:
      type: string
      enum:
        - ideacloud.completed
        - ideacloud.failed
        - content.progress
        - content.completed
        - content.failed
        - content.published
        - content.unpublished
        - content.scheduled
        - content.approval.submitted
        - content.approval.approved
        - content.approval.rejected
        - content.approval.escalated
        - content.approval.overridden
        - compliance.completed
        - content_tools.completed
        - inventory.description.completed
        - inventory.description.batch_completed
        - inventory.feed.updated
        - social.post.published
        - social.post.scheduled
        - social.post.failed
        - social.review.created
        - social.review.updated
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: validation_error
            message:
              type: string
              example: 'keyword: Required'
            details:
              type: object
            request_id:
              type: string
  responses:
    BadRequest:
      description: Validation error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorized:
      description: Missing or invalid API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Forbidden:
      description: API key lacks required scope
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    RateLimited:
      description: Rate limit exceeded
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    InternalError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: Your Hrizn API key (prefix hzk_)

````