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

# Validate post content

> Dry-run validation. Returns errors for hard limit violations and warnings for best-practice issues.



## OpenAPI

````yaml /api-reference/openapi.json post /posts/validate
openapi: 3.0.0
info:
  description: >-
    Unified social media inbox API. Read and respond to comments, DMs, reviews,
    and mentions across Instagram, Facebook, Threads, Google Business Profile,
    TikTok, LinkedIn, and YouTube through a single REST API. X/Twitter and
    Trustpilot coming soon.
  title: SocialAPI.AI
  contact:
    name: SocialAPI.AI Support
    email: support@social-api.ai
  license:
    name: MIT
  version: '1.0'
servers:
  - url: https://api.social-api.ai/v1
security: []
paths:
  /posts/validate:
    post:
      tags:
        - Posts
      summary: Validate post content
      description: >-
        Dry-run validation. Returns errors for hard limit violations and
        warnings for best-practice issues.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/api_endpoints.ValidatePostRequest'
        description: Content to validate
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api_endpoints.ValidatePostResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api_endpoints.ErrorResponse'
        '401':
          description: Invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api_endpoints.ErrorResponse'
      security:
        - BearerAuth: []
components:
  schemas:
    api_endpoints.ValidatePostRequest:
      type: object
      properties:
        account_ids:
          description: >-
            AccountIDs lists connected account IDs - their platforms are
            resolved automatically.
          type: array
          items:
            type: string
        media:
          description: >-
            Media is the ordered, agnostic media list. Each item is a url, a
            media_id,

            or a platform_attachment_id; order and mixing are preserved.
            Supersedes media_ids.
          type: array
          items:
            $ref: '#/components/schemas/api_endpoints.MediaInput'
        media_ids:
          description: >-
            MediaIDs are media file IDs to validate (checks count and type
            limits).


            Deprecated: use Media with source_type "media_id". Ignored when
            media is set.
          type: array
          items:
            type: string
        platform_data:
          description: >-
            PlatformData passes platform-specific fields keyed by platform name
            (e.g. {"instagram": {"content_type": "feed"}}). Folded into each
            matching target; a target's own platform_data wins on conflicts.
          type: object
          additionalProperties: {}
        platforms:
          description: >-
            Platforms lists platform names to validate against (e.g.
            ["instagram", "linkedin"]).
          type: array
          items:
            type: string
        scheduled_at:
          description: >-
            ScheduledAt validates the schedule time (must be in the future,
            within platform limits).
          type: string
          example: '2026-04-01T10:00:00Z'
        segments:
          description: >-
            Segments are continuation posts that publish as a native thread on
            X. Threads chaining is temporarily unavailable.
          type: array
          items:
            $ref: '#/components/schemas/api_endpoints.SegmentRequest'
        targets:
          description: Targets validates per-target overrides if provided.
          type: array
          items:
            $ref: '#/components/schemas/api_endpoints.TargetRequest'
        text:
          description: Text is the post content to validate against platform constraints.
          type: string
          example: 'Check out our new product! #launch'
    api_endpoints.ValidatePostResponse:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/api_endpoints.ValidationIssue'
        valid:
          type: boolean
        warnings:
          type: array
          items:
            $ref: '#/components/schemas/api_endpoints.ValidationIssue'
    api_endpoints.ErrorResponse:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/api_endpoints.ErrorBody'
    api_endpoints.MediaInput:
      type: object
      properties:
        source:
          type: string
          example: 550e8400-e29b-41d4-a716-446655440000
        source_type:
          type: string
          enum:
            - url
            - media_id
            - platform_attachment_id
          example: media_id
        type:
          type: string
          enum:
            - image
            - video
            - audio
            - file
          example: image
    api_endpoints.SegmentRequest:
      type: object
      properties:
        media:
          description: >-
            Media is the ordered, agnostic media list. Each item is a url, a
            media_id,

            or a platform_attachment_id; order and mixing are preserved.
            Supersedes media_ids.

            Currently ignored: X drops segment media, and Threads chaining is
            temporarily unavailable.
          type: array
          items:
            $ref: '#/components/schemas/api_endpoints.MediaInput'
        media_ids:
          description: >-
            MediaIDs attach media to this segment.


            Deprecated: use Media with source_type "media_id". Ignored when
            media is set.
          type: array
          items:
            type: string
        text:
          description: Text is the post body for this segment. Required.
          type: string
          example: And here's the second post in the thread.
    api_endpoints.TargetRequest:
      type: object
      properties:
        account_id:
          description: AccountID is the connected account to publish to. Required.
          type: string
          example: acc_01HZ9X3Q4R5M6N7P8V2K0W1J
        board_id:
          description: >-
            BoardID targets a specific board within a Pinterest account.
            Pinterest

            targets use board_id; page_id is also accepted as an alias, but
            supplying

            both is an error.
          type: string
          example: '8828'
        first_comment:
          description: FirstComment overrides the post-level first comment for this target.
          type: string
        media:
          description: >-
            Media is the ordered, agnostic media list. Each item is a url, a
            media_id,

            or a platform_attachment_id; order and mixing are preserved.
            Supersedes media_ids.
          type: array
          items:
            $ref: '#/components/schemas/api_endpoints.MediaInput'
        media_ids:
          description: >-
            MediaIDs overrides the post-level media for this target.


            Deprecated: use Media with source_type "media_id". Ignored when
            media is set.
          type: array
          items:
            type: string
        page_id:
          description: >-
            PageID optionally targets a specific page within the account (e.g.
            Facebook Page).
          type: string
          example: sapi_page_01JRQX...
        platform_data:
          description: >-
            PlatformData passes platform-specific fields (e.g. TikTok privacy
            settings, LinkedIn article metadata).
          type: object
          additionalProperties: {}
        scheduled_at:
          description: ScheduledAt overrides the post-level schedule time for this target.
          type: string
          example: '2026-04-01T10:00:00Z'
        text:
          description: Text overrides the post-level text for this target.
          type: string
          example: Platform-specific version of the post
        title:
          description: Title overrides the post-level title for this target.
          type: string
          example: Custom title for LinkedIn
        visibility:
          description: Visibility overrides the post-level visibility for this target.
          type: string
          enum:
            - public
            - private
            - connections_only
            - logged_in
          example: public
    api_endpoints.ValidationIssue:
      type: object
      properties:
        field:
          type: string
          example: text
        message:
          type: string
          example: exceeds 2200 character limit (2350/2200)
        platform:
          type: string
          example: instagram
        segment_index:
          description: >-
            SegmentIndex pins the issue to a continuation segment (0-based); nil
            for the main post.
          type: integer
          example: 0
        target:
          type: string
          example: acc_01HZ9X3Q4R5M6N7P8V2K0W1J
    api_endpoints.ErrorBody:
      type: object
      properties:
        code:
          type: string
          example: resource.not_found
        message:
          type: string
          example: Account not found
        meta:
          type: object
          additionalProperties: {}
  securitySchemes:
    BearerAuth:
      description: >-
        Prefix your API key with "Bearer ". Example: `Authorization: Bearer
        sapi_key_...`
      type: apiKey
      name: Authorization
      in: header

````