POST /api/v1/posts/validate

Validate a post without creating it: runs every check creation and publishing would (content, targets, account ownership and health, per-platform data and offline media rules, approval, 24-hour duplicate, x-request-id replay) and collects all errors. Same body as POST /api/v1/posts plus checkMedia. A failing post still answers 200 with valid:false

POST
/api/v1/posts/validate

Authorization

BearerAuth
headerAuthorizationBearer <token>

API key sk_...

Header Parameters

x-request-id?string

Checked for replay, never used up

Request Body

application/json
  1. body
content*string
Lengthlength <= 40000
platforms*array<>
Items1 <= items <= 20
scheduledFor?string

ISO 8601 with time zone

Formatdate-time
publishNow?boolean

Publish live now (subject to approval). Without publishNow or scheduledFor the post is a draft

dryRun?boolean

Validate only: answers 200 with the PostValidation result (see POST /api/v1/posts/validate) and creates nothing; x-request-id is not used up

checkMedia?boolean

With dryRun: also HEAD-check each media URL

Response Body

PostValidation

application/json
  1. response
valid?boolean
errors?array<>
warnings?array<>
targets?array<>
wouldRequireApproval?boolean
approvalReasons?array<>
duplicateOfPostId?string

Post with the same content in the last 24 hours

replayOfPostId?string

Post that x-request-id already created

scheduledFor?string
status?string

The status creating it now would give

Value in"draft""scheduled""queued""pending_approval"
Example Request
curl -X POST 'https://example.com/api/v1/posts/validate' \  -H 'Content-Type: application/json' \  -d '{  "content": "string",  "platforms": [    {      "accountId": "string"    }  ]}'
Example Response
{  "valid": true,  "errors": [    {      "code": "string",      "message": "string",      "accountId": "string",      "field": "string"    }  ],  "warnings": [    {      "code": "string",      "message": "string",      "accountId": "string",      "field": "string"    }  ],  "targets": [    {      "accountId": "string",      "platform": "string",      "accountName": "string",      "ok": true,      "errors": [        {          "code": "string",          "message": "string",          "accountId": "string",          "field": "string"        }      ],      "warnings": [        {          "code": "string",          "message": "string",          "accountId": "string",          "field": "string"        }      ]    }  ],  "wouldRequireApproval": true,  "approvalReasons": [    "string"  ],  "duplicateOfPostId": "string",  "replayOfPostId": "string",  "scheduledFor": "string",  "status": "draft"}