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

> ## Agent Instructions
> Postploy's MCP server for posting is https://api.postploy.com/mcp and signs in with OAuth. The REST API base URL is https://api.postploy.com/public/v1 and takes an API key as a Bearer token. The API calls channels accounts.

# Check posts

> Checks up to 50 posts against their platforms' rules without saving anything. Give each post a `socialAccountId`, or just a `platform` while you're still planning.



## OpenAPI

````yaml /openapi.yaml post /posts/validate
openapi: 3.1.0
info:
  title: Postploy API
  version: '1'
  description: Schedule and manage social media posts in your Postploy team.
  contact:
    name: Postploy support
    email: support@postploy.com
servers:
  - url: https://api.postploy.com/public/v1
security:
  - apiKey: []
tags:
  - name: Channels
  - name: Posts
  - name: Approvals
  - name: Media
  - name: Trash
  - name: Webhooks
paths:
  /posts/validate:
    post:
      tags:
        - Posts
      summary: Check posts
      description: >-
        Checks up to 50 posts against their platforms' rules without saving
        anything. Give each post a `socialAccountId`, or just a `platform` while
        you're still planning.
      operationId: validatePosts
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ValidatePosts'
            example:
              posts:
                - platform: twitter
                  text: >-
                    Our spring blend is here. Bright, citrusy and roasted this
                    week.
                - platform: instagram
                  text: Spring, in a cup.
      responses:
        '200':
          description: One result per post, in the order you sent them.
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/ValidationResult'
              example:
                data:
                  - socialAccountId: null
                    platform: twitter
                    valid: true
                    errors: []
                    warnings: []
                  - socialAccountId: null
                    platform: instagram
                    valid: false
                    errors:
                      - field: mediaIds
                        message: Instagram posts need at least one image or video
                    warnings: []
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
components:
  schemas:
    ValidatePosts:
      type: object
      required:
        - posts
      additionalProperties: false
      properties:
        posts:
          type: array
          minItems: 1
          maxItems: 50
          items:
            type: object
            additionalProperties: false
            properties:
              socialAccountId:
                type: string
                format: uuid
                description: The channel the post is for.
              platform:
                $ref: '#/components/schemas/Platform'
              text:
                type: string
              title:
                type: string
              mediaIds:
                type: array
                maxItems: 35
                items:
                  type: string
                  format: uuid
              thread:
                type: array
                maxItems: 25
                items:
                  type: string
              platformFields:
                $ref: '#/components/schemas/PlatformFields'
    ValidationResult:
      type: object
      required:
        - socialAccountId
        - platform
        - valid
        - errors
        - warnings
      properties:
        socialAccountId:
          type:
            - string
            - 'null'
          format: uuid
        platform:
          $ref: '#/components/schemas/Platform'
        valid:
          type: boolean
          description: '`true` when the post would be accepted.'
        errors:
          type: array
          description: Problems that stop the post being saved.
          items:
            $ref: '#/components/schemas/ValidationIssue'
        warnings:
          type: array
          description: >-
            Things worth a look that don't stop the post, such as going over a
            recommended length.
          items:
            $ref: '#/components/schemas/ValidationIssue'
    Platform:
      type: string
      description: '`twitter` is X.'
      enum:
        - linkedin
        - twitter
        - instagram
        - facebook
        - tiktok
        - youtube
    PlatformFields:
      type: object
      description: >-
        Options for the post's platform, under the platform's name. See
        [Platform options](/api/platform-options).
      properties:
        linkedin:
          type: object
          additionalProperties: false
          properties:
            visibility:
              type: string
              enum:
                - PUBLIC
                - CONNECTIONS
            firstComment:
              type: string
              description: Posted as the first comment.
            link:
              type: string
              description: Added to the end of the post.
        twitter:
          type: object
          properties:
            replyRule:
              type: string
              enum:
                - everyone
                - follow
                - mention
              default: everyone
              description: >-
                Who can reply. `follow` is people you follow; `mention` is
                people you mention.
            retweetConfig:
              type: object
              description: Repost the post this long after it goes out.
              required:
                - value
                - frequency
              properties:
                value:
                  type: integer
                  minimum: 1
                frequency:
                  type: string
                  enum:
                    - hour
                    - day
        instagram:
          type: object
          additionalProperties: false
          properties:
            postType:
              type: string
              enum:
                - post
                - reel
                - story
              default: post
            reelGrid:
              type: string
              enum:
                - reel_only
                - reel_and_main
              default: reel_only
              description: '`reel_and_main` also shows a reel in your main feed.'
            firstComment:
              type: string
              description: Posted as the first comment. Not on stories.
            collaborators:
              type: array
              maxItems: 3
              description: Instagram usernames to invite as collaborators.
              items:
                type: string
        tiktok:
          type: object
          required:
            - visibility
            - discloseContent
            - allowMusic
            - promotion
            - allowUsersTo
          additionalProperties: false
          properties:
            visibility:
              type: string
              enum:
                - public
                - friends
                - followers
                - private
            discloseContent:
              type: boolean
              description: Whether the post promotes a brand, product or service.
            allowMusic:
              type: boolean
              description: Let TikTok add music to photo posts.
            promotion:
              type: array
              description: >-
                Whose promotion it is, when `discloseContent` is true (it's
                ignored otherwise): `brand` is your own, `branded_content` is a
                paid partnership. Pick at least one. Branded content can't be
                private.
              items:
                type: string
                enum:
                  - brand
                  - branded_content
            allowUsersTo:
              type: array
              description: What viewers may do.
              items:
                type: string
                enum:
                  - comment
                  - duet
                  - stitch
        youtube:
          type: object
          required:
            - visibility
            - forKids
          additionalProperties: false
          properties:
            visibility:
              type: string
              enum:
                - public
                - unlisted
                - private
            forKids:
              type: boolean
              description: Whether the video is made for kids.
    ValidationIssue:
      type: object
      required:
        - field
        - message
      properties:
        field:
          type: string
          description: >-
            The field with the problem, named the way you send it, such as
            `text`, `title`, `mediaIds`, `mediaIds[1]`, `thread[0]` or
            `platformFields.tiktok.visibility`.
        message:
          type: string
    Error:
      type: object
      required:
        - statusCode
        - message
        - errors
        - timestamp
        - route
      properties:
        statusCode:
          type: integer
        message:
          type: string
          description: What went wrong, in plain words. Safe to show to people.
        errors:
          type:
            - array
            - 'null'
          description: Every problem, when there's more than one place to look.
          items:
            type: object
            properties:
              message:
                type: string
              path:
                type: array
                description: Where the problem is, such as `["posts", 0, "scheduledAt"]`.
                items:
                  type:
                    - string
                    - integer
              cause:
                type: string
              code:
                type: string
                description: >-
                  On plan limits, `PLATFORM_LIMIT_REACHED` or
                  `TOTAL_LIMIT_REACHED`.
              platform:
                type: string
        timestamp:
          type: string
          format: date-time
        route:
          type: string
  responses:
    BadRequest:
      description: >-
        The request is invalid, or a post breaks its platform's rules. `message`
        gives the first problem, and `errors` lists every one with its `path`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            statusCode: 400
            message: Scheduled date and time must be in the future
            errors:
              - message: Scheduled date and time must be in the future
                path:
                  - posts
                  - 0
                  - scheduledAt
                cause: custom
            timestamp: '2030-01-10T12:00:00.000Z'
            route: /public/v1/posts
    Unauthorized:
      description: The API key is missing, unknown or revoked.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            statusCode: 401
            message: Invalid API key
            errors: null
            timestamp: '2030-01-10T12:00:00.000Z'
            route: /public/v1/accounts
    Forbidden:
      description: Your role in the team doesn't allow this.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: It doesn't exist, or you can't see it.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    TooManyRequests:
      description: >-
        More than 120 requests a minute to this endpoint. All of a person's keys
        count together. Wait the number of seconds in `Retry-After-caller`, then
        try again.
      headers:
        Retry-After-caller:
          description: Seconds to wait before trying again.
          schema:
            type: integer
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: >-
        An API key from **Settings › AI apps & API** in Postploy. Keys start
        with `ppk_`.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.