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

# Update a draft or scheduled post



## OpenAPI

````yaml /openapi.yaml patch /social/posts/{id}
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/{id}:
    parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
        description: The post id (`post_id` / Zernio post id)
    patch:
      tags:
        - Social
      summary: Update a draft or scheduled post
      operationId: updateSocialPost
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateSocialPostInput'
      responses:
        '200':
          description: Updated post
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      zernio_post_id:
                        type: string
                      status:
                        type: string
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
      security:
        - apiKeyAuth: []
components:
  schemas:
    UpdateSocialPostInput:
      type: object
      properties:
        content:
          type: string
        scheduled_for:
          type: string
          format: date-time
          nullable: true
        scheduled_timezone:
          type: string
        media_items:
          type: array
          items:
            $ref: '#/components/schemas/SocialMediaItem'
        hashtags:
          type: array
          items:
            type: string
        recycling:
          $ref: '#/components/schemas/SocialRecycling'
        platform_specific_data:
          type: string
          description: >-
            JSON-encoded string of platform-specific options (same shape as on
            create — e.g. linkedin
            `{"organizationUrn":"urn:li:organization:<id>"}`, googlebusiness
            `{"locationId":"<id>"}`).
    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
  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'
    NotFound:
      description: Resource not found
      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_)

````