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

# Get post preview

> Shows the text each enabled destination will send, after the network's formatting rules, and its length against the account's limit. Nothing is published.



## OpenAPI

````yaml /openapi.json get /posts/{post}/preview
openapi: 3.1.0
info:
  title: TryPost API
  version: 2.0.0
  description: >-
    REST API for TryPost. Authenticate with a workspace API key as a Bearer
    token.
servers:
  - url: https://app.trypost.it/api
    description: TryPost Cloud
security:
  - bearerAuth: []
tags:
  - name: Posts
    description: Create, read, update, delete and preview posts.
  - name: Post notes
    description: Internal notes on a post, visible to workspace members.
  - name: Approvals
    description: Approve or reject posts waiting for approval.
  - name: Recurrence
    description: Make a post repeat on a schedule.
  - name: Media and uploads
    description: Upload files and attach media to posts.
  - name: Social accounts
    description: Connected social accounts and their network-specific options.
  - name: Channels
    description: A channel's posting schedule and queue.
  - name: Ideas
    description: Ideas on the Create board.
  - name: Idea stages
    description: The groups (columns) of the ideas board.
  - name: Analytics
    description: Workspace and channel insights.
  - name: Labels
    description: Labels to organize posts and ideas.
  - name: Signatures
    description: Reusable text to append to posts.
  - name: Workspace
    description: The workspace the API key belongs to.
  - name: API keys
    description: Personal API keys for this workspace.
  - name: Webhooks
    description: Outgoing webhooks and their delivery logs.
  - name: Repurposes
    description: Automations that republish videos posted outside TryPost.
  - name: Platform
    description: Platform capabilities and content types.
paths:
  /posts/{post}/preview:
    parameters:
      - $ref: '#/components/parameters/PostId'
    get:
      tags:
        - Posts
      summary: Get post preview
      description: >-
        Shows the text each enabled destination will send, after the network's
        formatting rules, and its length against the account's limit. Nothing is
        published.
      operationId: getPostPreview
      responses:
        '200':
          description: Preview per destination.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PostPreview'
              example:
                post_id: 9d3c1f2a-6b4e-4c8a-9f1e-2a7b5c8d0e41
                original_content: We just shipped scheduled threads. Here is how they work.
                original_length: 57
                platforms:
                  - post_platform_id: 9d3c1f2b-1a2b-4c3d-8e4f-5a6b7c8d9e10
                    platform: x
                    content_type: x_post
                    sanitized_content: We just shipped scheduled threads. Here is how they work.
                    sanitized_length: 57
                    max_content_length: 280
                    truncated: false
                    thread_replies:
                      - text: 2/ Replies publish under the first post.
                        media: []
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
components:
  parameters:
    PostId:
      name: post
      in: path
      required: true
      description: Post id. A post of another workspace returns `404`.
      schema:
        type: string
        format: uuid
      example: 9d3c1f2a-6b4e-4c8a-9f1e-2a7b5c8d0e41
  schemas:
    PostPreview:
      type: object
      properties:
        post_id:
          type: string
          format: uuid
        original_content:
          type: string
        original_length:
          type: integer
          description: Characters (code points) of the stored content.
        platforms:
          type: array
          description: One entry per enabled destination.
          items:
            type: object
            properties:
              post_platform_id:
                type: string
                format: uuid
              platform:
                $ref: '#/components/schemas/Platform'
              content_type:
                type:
                  - string
                  - 'null'
              sanitized_content:
                type: string
                description: The text the publisher sends to the network.
              sanitized_length:
                type: integer
              max_content_length:
                type: integer
                description: >-
                  Text limit of the account (an X account with long posts gets
                  25000).
              truncated:
                type: boolean
                description: Whether the sent text is shorter than the stored text.
              title:
                type: string
                description: 'YouTube only: the video title.'
              description:
                type: string
                description: 'YouTube only: the video description.'
              description_length_bytes:
                type: integer
                description: YouTube only. The limit is 5000 bytes.
              thread_replies:
                type: array
                description: X, Bluesky and Mastodon, when the post has replies.
                items:
                  type: object
                  properties:
                    text:
                      type: string
                    media:
                      type: array
                      items:
                        $ref: '#/components/schemas/MediaItem'
    Platform:
      type: string
      enum:
        - linkedin
        - linkedin-page
        - x
        - tiktok
        - youtube
        - facebook
        - instagram
        - instagram-facebook
        - threads
        - pinterest
        - bluesky
        - mastodon
        - telegram
        - discord
        - google_business
      description: >-
        Network of a social account. `linkedin-page` is a LinkedIn company page,
        `instagram-facebook` an Instagram account connected through a Facebook
        Page.
    MediaItem:
      type: object
      description: A media item as stored on a post.
      properties:
        id:
          type: string
          format: uuid
          description: Media id. Pass it as `media[].id` to reuse the file on another post.
        path:
          type: string
          description: Storage path, `medias/{uuid}.{ext}`.
        url:
          type: string
          format: uri
          description: Public URL of the file.
        type:
          type:
            - string
            - 'null'
          enum:
            - image
            - video
            - document
            - null
          description: '`null` on older items stored without a type.'
        mime_type:
          type:
            - string
            - 'null'
        original_filename:
          type:
            - string
            - 'null'
        size:
          type:
            - integer
            - 'null'
          description: Size in bytes.
        meta:
          $ref: '#/components/schemas/MediaItemMeta'
        source:
          type:
            - string
            - 'null'
          enum:
            - ai
            - unsplash
            - google_drive
            - google_photos
            - canva
            - null
          description: >-
            Where the file came from in the app. Present only on items added
            from one of these sources.
        source_meta:
          type:
            - object
            - 'null'
          description: Details from that source. Present only when the source gave any.
      examples:
        - id: 9d3c1f30-8a9b-4c0d-9e1f-2a3b4c5d6e7f
          path: medias/9d3c1f30-8a9b-4c0d-9e1f-2a3b4c5d6e7f.jpg
          url: >-
            https://media.trypost.it/medias/9d3c1f30-8a9b-4c0d-9e1f-2a3b4c5d6e7f.jpg
          type: image
          mime_type: image/jpeg
          original_filename: launch.jpg
          size: 482113
          meta:
            width: 1080
            height: 1350
            alt_text: Product launch banner
    ErrorBody:
      type: object
      properties:
        message:
          type: string
    RateLimitErrorBody:
      type: object
      properties:
        name:
          type: string
          const: rate_limit_exceeded
        message:
          type: string
          examples:
            - Rate limit exceeded. Please retry after 30 seconds.
    MediaItemMeta:
      type: object
      description: >-
        Editable settings of one media item. Other keys the server measured (for
        example `width`, `height`, `duration`) may also appear in responses.
      properties:
        alt_text:
          type: string
          maxLength: 2000
          description: >-
            Accessibility description. Applies to images; each network truncates
            it to its own cap.
        user_tags:
          type: array
          maxItems: 20
          description: People tagged on an Instagram image.
          items:
            type: object
            required:
              - username
              - x
              - 'y'
            properties:
              username:
                type: string
                pattern: ^@?[A-Za-z0-9._]{1,30}$
                description: Public Instagram username. A leading `@` is dropped.
              x:
                type: number
                minimum: 0
                maximum: 1
                description: Offset from the left edge, 0 to 1.
              'y':
                type: number
                minimum: 0
                maximum: 1
                description: Offset from the top edge, 0 to 1.
        cover_offset_ms:
          type: integer
          minimum: 0
          description: >-
            Video frame used as the cover, in milliseconds from the start.
            Cannot pass the end of the video.
  responses:
    Unauthorized:
      description: >-
        Missing, invalid, revoked or expired API key. Bodies: `Unauthenticated.`
        (no key, or a key that is invalid or revoked), `Token expired.` (past
        its `expires_at`), `Token not found.` and `No workspace selected.` (the
        key is no longer bound to a workspace).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorBody'
          example:
            message: Unauthenticated.
    PaymentRequired:
      description: >-
        TryPost Cloud only: the workspace's account has no active subscription
        or trial. Body: `{"message": "Active subscription required."}`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorBody'
          example:
            message: Active subscription required.
    Forbidden:
      description: >-
        The request is not allowed. API keys work only for workspace admins (the
        account owner or a member marked as admin): otherwise every request
        returns `Insufficient workspace permissions.`. Other bodies: `Workspace
        access denied.` (the key's user left the workspace) and `Personal access
        token required.` (an MCP OAuth token was sent) and `This action is
        unauthorized.` (the note belongs to another member).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorBody'
    NotFound:
      description: The resource does not exist in this workspace.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorBody'
    TooManyRequests:
      description: 'Rate limit exceeded. Limits: 60 requests per minute per workspace.'
      headers:
        Retry-After:
          description: Seconds to wait before retrying.
          schema:
            type: integer
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/RateLimitErrorBody'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Workspace API key from Settings → API Keys.

````

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