preview_post

Read-only

Shows exactly how a post would be adapted for each account, and every problem with its code (for example TEXT_TOO_LONG with the limit), without saving anything.

Permission

Scope posts:write: Create and edit drafts, and upload media. Allowed in every mode.

Input

Input
NameTypeDescription
text Requiredstring0 to 10000 characters
account_ids Requiredstring[]1 to 20 items
variantsobject—
media_idsstring[]0 to 20 items
threadstring[]0 to 25 items

Output

Output
NameTypeDescription
previews Requiredobject[]—

Example

Request

{
  "text": "Lumen 2.0 is here…",
  "account_ids": [
    "acc_x…",
    "acc_bsky…"
  ]
}

Response

{
  "previews": [
    {
      "account_id": "acc_x…",
      "platform": "x",
      "text": "Lumen 2.0 is here…",
      "thread": [],
      "valid": true,
      "issues": [],
      "suggested_fix": null
    },
    {
      "account_id": "acc_bsky…",
      "platform": "bluesky",
      "text": "Lumen 2.0 is here…",
      "thread": [],
      "valid": false,
      "issues": [
        {
          "code": "TEXT_TOO_LONG",
          "severity": "error",
          "message": "Bluesky allows 300 characters; this is 312."
        }
      ],
      "suggested_fix": {
        "text": "Lumen 2.0 is here…",
        "thread": [
          "…the rest of the post"
        ],
        "changes": [
          "Split into a thread of 2"
        ]
      }
    }
  ]
}

Errors

Rate limit

60 calls a minute per connection, and 300 a minute across all tools.

Related tools