> ## 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 sales event page

> Generate a promotional page for a dealership event

Creates and generates a promotional page for a dealership sales event. Supports multiple event categories and generates compelling marketing content. Generation is asynchronous; use `GET /content/{id}` to check status and retrieve the result.

**Scope required:** `content:write`

## Request body

<ParamField body="event_name" type="string" required>
  Name of the event (max 500 characters).
</ParamField>

<ParamField body="start_date" type="string" required>
  Event start date/time in ISO 8601 format.
</ParamField>

<ParamField body="end_date" type="string" required>
  Event end date/time in ISO 8601 format.
</ParamField>

<ParamField body="location" type="string" required>
  Event location or address (max 500 characters).
</ParamField>

<ParamField body="category" type="string" required>
  Event category. One of: `Sales Event`, `New Model Launch`, `Owner Appreciation`, `Service Special`, `Community Event`, `Holiday Celebration`, `Test Drive Event`.
</ParamField>

<ParamField body="description" type="string">
  Additional context about the event for the AI to use during generation (max 2000 characters).
</ParamField>

<ParamField body="brand_voice_id" type="string">
  ID of a brand voice profile to use for tone and style.
</ParamField>

<ParamField body="language" type="string" default="English">
  Language for generated content. One of: `English`, `Spanish`, `Mandarin Chinese`, `Japanese`, `Korean`, `Arabic`, `Farsi`, `Hebrew`, `French`, `Tagalog`, `Vietnamese`, `Portuguese`, `Russian`.
</ParamField>

<ParamField body="title" type="string">
  Custom page title (max 500 characters). Defaults to the event name.
</ParamField>

<ParamField body="content_depth" type="string" default="balanced">
  Content depth preset that drives the article body. One of `concise`, `steady`, `balanced`, `substantial`, or `in-depth`. Replaces `content_length`.
</ParamField>

<ParamField body="content_length" type="integer" deprecated>
  **Deprecated.** Article length is now driven by `content_depth`; this field is accepted for backward compatibility but has no effect.
</ParamField>

## Response

Returns `202 Accepted` when the sales event page starts generating:

<ResponseExample>
  ```json 202 theme={"theme":{"light":"github-light","dark":"github-dark"}}
  {
    "data": {
      "id": "d97902b2-be6f-4f0e-8a80-e48a18df90cf",
      "status": "generating",
      "article_type": "salesevent",
      "title": "Spring Clearance Sale",
      "event": {
        "name": "Spring Clearance Sale",
        "location": "315 W Jericho Tpke, Huntington, NY 11743",
        "category": "Sales Event",
        "start_date": "2026-04-01T09:00:00Z",
        "end_date": "2026-04-07T21:00:00Z",
        "description": null
      },
      "created_at": "2026-02-28T11:43:57.502664+00:00",
      "message": "Generation typically completes within a few minutes. Configure webhooks to receive real-time status notifications: https://api-docs.hrizn.io/webhooks"
    }
  }
  ```
</ResponseExample>

<Tip>
  Content generation is asynchronous and typically completes within a few minutes. Configure [webhooks](/webhooks) to receive real-time `content.completed` and `content.failed` notifications instead of polling.
</Tip>

Use `GET /content/{id}` to poll for completion, then `GET /content/{id}/html` to retrieve the generated HTML.


## OpenAPI

````yaml POST /sales-events
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:
  /sales-events:
    post:
      tags:
        - Content
      summary: Create sales event page
      description: >
        Creates a promotional page for a dealership sales event. Supports
        various

        event categories including Sales Events, New Model Launches, Service
        Specials, and more.

        The page is generated asynchronously. Use the returned `id` with

        `GET /content/{id}` to check status and retrieve the result.
      operationId: createSalesEvent
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateSalesEventInput'
      responses:
        '202':
          description: Sales event page generation started
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SalesEventCreatedResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  schemas:
    CreateSalesEventInput:
      type: object
      required:
        - event_name
        - start_date
        - end_date
        - location
        - category
      properties:
        event_name:
          type: string
          minLength: 1
          maxLength: 500
          example: Summer Blowout Sale
        description:
          type: string
          maxLength: 2000
          description: >-
            Additional context about the event for the AI to use during
            generation
        start_date:
          type: string
          format: date-time
          example: '2026-07-04T09:00:00Z'
        end_date:
          type: string
          format: date-time
          example: '2026-07-07T21:00:00Z'
        location:
          type: string
          minLength: 1
          maxLength: 500
          example: 123 Main St, Springfield, IL
        category:
          $ref: '#/components/schemas/SalesEventCategory'
        brand_voice_id:
          type: string
          description: ID of a brand voice profile to use for tone and style
        language:
          type: string
          enum:
            - English
            - Spanish
            - Mandarin Chinese
            - Japanese
            - Korean
            - Arabic
            - Farsi
            - Hebrew
            - French
            - Tagalog
            - Vietnamese
            - Portuguese
            - Russian
          default: English
        title:
          type: string
          maxLength: 500
          description: Custom page title. Defaults to the event name
        content_length:
          type: integer
          minimum: 200
          maximum: 5000
          deprecated: true
          description: >
            **Deprecated.** Article length is now driven by `content_depth`;
            this field is accepted for backward compatibility but has no effect.
        content_depth:
          type: string
          enum:
            - concise
            - steady
            - balanced
            - substantial
            - in-depth
          description: >
            Content depth preset that drives the article body. Defaults to
            `balanced`. Replaces the legacy `content_length` field.
    SalesEventCreatedResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            id:
              type: string
              format: uuid
            status:
              $ref: '#/components/schemas/ContentStatus'
            article_type:
              type: string
              example: salesevent
            title:
              type: string
            event:
              type: object
              properties:
                name:
                  type: string
                location:
                  type: string
                category:
                  $ref: '#/components/schemas/SalesEventCategory'
                start_date:
                  type: string
                  format: date-time
                end_date:
                  type: string
                  format: date-time
                description:
                  type: string
                  nullable: true
            created_at:
              type: string
              format: date-time
            message:
              type: string
              description: >-
                Informational message about async processing and webhook
                configuration
    SalesEventCategory:
      type: string
      enum:
        - Sales Event
        - New Model Launch
        - Owner Appreciation
        - Service Special
        - Community Event
        - Holiday Celebration
        - Test Drive Event
    ContentStatus:
      type: string
      enum:
        - generating
        - complete
        - failed
      description: Content generation status
    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'
    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_)

````