# Check a post without creating it

Source: https://ampost.io/docs/api/posts-validate · Full reference: https://ampost.io/llms-full.txt

`POST /api/posts/validate` · MCP tool `posts_validate` · scope `posts:read` · rate limit `apiRead` · success `200`

Check a posts_create request without creating, counting or publishing anything: same input, same checks and error codes. `valid` is true when posts_create would accept it and, with `publishNow`, every account would publish. `errors` holds the post's own problems (content, schedule, plan features, the 30-day post quota, for publishNow the hourly publish limit); `targets` has one entry per platform of each target with its own `valid`, `errors` (platform set, the platform's rules for text, media, placement and options, a Pinterest `boardId` the account cannot pin to, the account it publishes through, its health, and for publishNow the per-account quota), `warnings` (`ALT_TEXT_NOT_SENT` for alt text the platform leaves out, `BOARD_NOT_CHECKED` when Pinterest did not answer the `options.pinterest.boardId` check, account issues to fix before a scheduled post publishes, a login that expires soon; account health issues carry the `accounts_get` health codes) and `mediaConversion` (what Ampost would convert on that platform, per media item). Each platform reports its first rule error, like posts_create. A request that does not fit the schema answers 400 `VALIDATION_FAILED` like posts_create. Takes no post quota, publish limit or X units.

| Field | In | Type | Required | Description |
|---|---|---|---|---|
| `targets` | body | object[] | yes | Where the post goes: one entry per platform set (max 10). A set holds one account per platform, so to reach several accounts of one platform (two LinkedIn accounts, several clients' Instagram) list their sets. The post gets one platformPosts entry per account. |
| `text` | body | string | no | Post text. Use `options.<platform>.text` to vary it per platform. |
| `firstComment` | body | string \| null | no | Comment Ampost posts on each new post right after it publishes (X, Threads and Bluesky: a reply). Every target platform must support it (`firstComment.supported` in GET /api/platforms); use `options.<platform>.firstComment` to set or turn it off (`""`) per platform. A failed comment does not fail the post. |
| `linkUrl` | body | string \| null | no | Link to attach. Ignored by platforms whose `link.supported` is false. |
| `media` | body | object[] | no | Images and videos, in order (at most 35; each platform's `media.maxItems` applies): `{ url, type }` plus optional metadata and `altText`. `url` is a public https URL, such as a completed media upload's `url`. The types and required fields per platform are in GET /api/platforms (`media`). |
| `mediaFit` | body | pad \| crop \| none | no | How media outside a platform's aspect ratio is fitted (`media.conversion` in GET /api/platforms), e.g. Instagram feed 4:5 to 1.91:1, Reels, Stories and TikTok 9:16, and on Pinterest a carousel's later images to the first one's ratio. pad: bars around the whole frame (white on images, black on video); crop: the centre fills the frame; none: the ratio stays as uploaded (a platform that requires one may refuse it). Default: pad. |
| `thread` | body | object[] | no | Follow-up posts published right after the post, in order, each replying to the one before (X, Bluesky, Threads). Item: `{ text, media: [{ url, type, altText }] }`, checked like a post. Every target platform must take it (`thread` in GET /api/platforms); `options.<platform>.thread` overrides it, `[]` for none. Not with `firstComment` on one platform. A failed item fails the account; posts_retry continues from it. |
| `options` | body | object | no | Per-platform options keyed by platform. Every platform accepts `text`, the platforms that take a first comment accept `firstComment` and the ones that take a thread (X, Bluesky, Threads) accept `thread`; see GET /api/platforms for the rest. |
| `scheduledFor` | body | ISO 8601 \| null | no | Publish time in the future. Null or omitted: the post is a draft (or published now with `publishNow`). |
| `publishNow` | body | boolean | no | Publish right after creating. Cannot be combined with `scheduledFor`. |
| `useQueue` | body | boolean | no | Schedule the post in the next free slot of its platform set's queue (see queue_get) instead of at `scheduledFor`. Needs exactly one target and a queue with slots. Cannot be combined with `scheduledFor` or `publishNow`. |
| `metadata` | body | object | no | Your own JSON object (max 4096 bytes), such as your ids. Returned on the post and in every webhook post event. Set on create only. |

Example request:

```json
{
  "targets": [
    {
      "platformSetId": "0b6e4d2a-9c3f-4e1b-8a7d-5f2c1e9b3d40",
      "platforms": [
        "instagram",
        "twitter"
      ]
    }
  ],
  "text": "Our new office, finally.",
  "media": [
    {
      "url": "https://cdn.example.com/office.png",
      "type": "image",
      "mimeType": "image/png",
      "sizeBytes": 9400000,
      "width": 4000,
      "height": 3000,
      "altText": "The team at their desks"
    }
  ],
  "thread": [
    {
      "text": "Moving day photos in the replies."
    }
  ],
  "scheduledFor": "2027-03-02T09:00:00Z"
}
```

Example response:

```json
{
  "valid": false,
  "errors": [],
  "warnings": [],
  "scheduledFor": "2027-03-02T09:00:00Z",
  "targets": [
    {
      "platform": "instagram",
      "platformSetId": "0b6e4d2a-9c3f-4e1b-8a7d-5f2c1e9b3d40",
      "accountId": "c41d8e2f-6a3b-4f9c-b1e5-7d2a9c4e6f80",
      "valid": false,
      "errors": [
        {
          "code": "VALIDATION_FAILED",
          "message": "\"instagram\" takes no thread; only X, Bluesky and Threads do. For a post that also goes to \"instagram\", set the thread in options.<platform>.thread of those platforms instead of thread",
          "details": {
            "platform": "instagram",
            "field": "thread"
          }
        }
      ],
      "warnings": [],
      "mediaConversion": []
    },
    {
      "platform": "twitter",
      "platformSetId": "0b6e4d2a-9c3f-4e1b-8a7d-5f2c1e9b3d40",
      "accountId": "9a4e2c7b-3d1f-4b8a-9c6e-5f2a8d1b7c40",
      "valid": true,
      "errors": [],
      "warnings": [],
      "mediaConversion": [
        {
          "mediaIndex": 0,
          "status": "convert",
          "operations": [
            "compress"
          ],
          "changes": [
            "9.0 MB → at most 5.0 MB"
          ],
          "final": true
        }
      ]
    }
  ]
}
```
