> ## 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 post

> Create, schedule, or publish a social post across platforms

Create a post for one or more connected platforms. Provide `scheduled_for` to
schedule, or `publish_now: true` to publish immediately. Publishing is
asynchronous; subscribe to `social.post.*` webhooks for status.

**Scope required:** `social:write`


## OpenAPI

````yaml POST /social/posts
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:
  /social/posts:
    post:
      tags:
        - Social
      summary: Create / schedule / publish a social post
      description: |
        Create a post for one or more connected platforms. Provide
        `scheduled_for` to schedule, or `publish_now: true` to publish
        immediately. Publishing is asynchronous; status is reflected on the
        post record and via `social.post.*` webhooks.
      operationId: createSocialPost
      parameters:
        - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateSocialPostInput'
      responses:
        '202':
          description: Post accepted for publishing/scheduling
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SocialPostAcceptedResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/RateLimited'
      security:
        - apiKeyAuth: []
components:
  parameters:
    IdempotencyKey:
      name: X-Idempotency-Key
      in: header
      required: false
      schema:
        type: string
      description: >-
        Optional idempotency key. Repeats with the same key + body within 24h
        return the original response instead of creating a duplicate.
  schemas:
    CreateSocialPostInput:
      type: object
      required:
        - content
        - platforms
      properties:
        content:
          type: string
          description: >-
            Shared post body (per-platform overrides via
            platforms[].custom_content)
        platforms:
          type: array
          minItems: 1
          items:
            $ref: '#/components/schemas/SocialPlatformEntry'
        media_items:
          type: array
          items:
            $ref: '#/components/schemas/SocialMediaItem'
        hashtags:
          type: array
          items:
            type: string
        scheduled_for:
          type: string
          format: date-time
          description: >-
            Schedule for this time. Omit (with publish_now) for immediate
            publishing.
        scheduled_timezone:
          type: string
          description: IANA timezone for the scheduled time
        publish_now:
          type: boolean
          description: Publish immediately instead of scheduling
        recycling:
          $ref: '#/components/schemas/SocialRecycling'
        article_component_id:
          type: string
          format: uuid
    SocialPostAcceptedResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            id:
              type: string
              description: Logical post id (post_id)
            status:
              type: string
            message:
              type: string
    SocialPlatformEntry:
      type: object
      required:
        - platform
        - account_id
      properties:
        platform:
          $ref: '#/components/schemas/SocialPlatform'
        account_id:
          type: string
          description: Zernio account id (from /social/accounts)
        custom_content:
          type: string
          description: Platform-specific content overriding the shared body
        custom_media:
          type: array
          items:
            $ref: '#/components/schemas/SocialMediaItem'
        platform_specific_data:
          type: string
          description: >-
            JSON-encoded string of platform-specific options. By platform:
            googlebusiness — `{"locationId":"<gbp-location-id>"}` (required to
            target a specific Google Business location; see location_id on
            /social/reviews); linkedin —
            `{"organizationUrn":"urn:li:organization:<id>"}` to override the
            account's default organization (the connected organization_urn from
            /social/accounts is used automatically when omitted); twitter —
            `{"poll":{"options":["A","B"],"duration_minutes":1440}}`.
        article_component_id:
          type: string
          format: uuid
    SocialMediaItem:
      type: object
      required:
        - type
        - url
      properties:
        type:
          type: string
          enum:
            - image
            - video
            - gif
            - document
        url:
          type: string
          format: uri
    SocialRecycling:
      type: object
      required:
        - enabled
      properties:
        enabled:
          type: boolean
        gap:
          type: integer
          minimum: 1
        gap_freq:
          type: string
          enum:
            - week
            - month
        start_date:
          type: string
          format: date-time
        expire_count:
          type: integer
          minimum: 1
        expire_date:
          type: string
          format: date-time
        content_variations:
          type: array
          items:
            type: string
    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
    SocialPlatform:
      type: string
      enum:
        - twitter
        - facebook
        - instagram
        - linkedin
        - googlebusiness
  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'
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: Your Hrizn API key (prefix hzk_)

````