# How to validate a social post before scheduling it with the API > POST the same body you'd send to schedule or publish, without scheduledAt, to /api/posts/validate. You get HTTP 200 with valid & issues, & nothing is created. Check valid, not the status code, because an invalid post still returns 200. Updated: 2026-10-05. ## What the endpoint does `POST /api/posts/validate` runs the same media, character-limit, platform-option & X monthly-cap checks as scheduling or publishing, but doesn't create a post or queue a job. Use it to find problems while they're cheap to fix. ## The request Send the same body you'd send to schedule, without `scheduledAt`: ```bash curl -X POST https://api.dunsocial.com/api/posts/validate \ -H "Authorization: Bearer YOUR_TOKEN" \ -H "X-Workspace-Id: YOUR_WORKSPACE_ID" \ -H "Content-Type: application/json" \ -d '{ "socialAccountIds": ["ACCOUNT_ID"], "content": "Shipping something small today.", "mediaUrls": [] }' ``` The token needs `posts:read`, so a read-only token can validate without being able to publish. ## The response It returns HTTP 200 whether or not the post is valid: ```json { "success": true, "data": { "valid": false, "issues": [ { "socialAccountId": "ACCOUNT_ID", "platform": "X", "code": "content_length", "message": "Content exceeds X character limit: 283/280 characters" } ] } } ``` `valid: true` with an empty `issues` array means the same payload can go straight to schedule or publish. ## Check `valid`, not the status code This is the usual mistake. A 200 doesn't mean the post is fine. It means the check ran. Code that only looks at the HTTP status will treat every post as valid. Always read `data.valid`. DunSocial's SDK helps here: validate can raise a `DunSocialError` instead, if you'd rather not check the flag yourself. ## Fixing the issues Each issue names the account, the platform, a code & a message. Fix the specific rule, such as shortening the text or adding a missing platform option, then validate again. DunSocial returns every issue in one response, so you can fix a whole batch in a single pass instead of finding problems one at a time. ## Using it in a pipeline Validate first, then schedule only if `valid` is true. In a CI job, fail the step when it isn't, & print the issues so a person can see why. DunSocial's CLI, SDK & MCP all expose the same check, so a pipeline can validate the same way whatever surface it uses. ## What it can't catch Validation checks the rules a platform enforces. It can't judge tone, accuracy or timing, & it can't promise a platform will accept a post at publish time. A scheduled post still lands on the DunSocial calendar, where a person can review it before it goes out. ## Related guides - [How to schedule a post with the DunSocial API](https://www.dunsocial.com/hub/dunsocial-api-and-sdk-guides/how-to-schedule-a-post-with-the-dunsocial-api.md) - [How should an AI assistant validate a post before publishing?](https://www.dunsocial.com/hub/dunsocial-mcp-guides/how-should-an-ai-assistant-validate-a-post-before-publishing.md) - [What character limits does the DunSocial API enforce?](https://www.dunsocial.com/hub/dunsocial-api-and-sdk-guides/what-character-limits-does-the-dunsocial-api-enforce.md) - [How to validate a post before publishing with the DunSocial CLI](https://www.dunsocial.com/hub/dunsocial-cli-guides/how-to-validate-a-post-before-publishing-with-the-dunsocial-cli.md) ## About this document This is the Markdown representation of https://www.dunsocial.com/hub/dunsocial-api-and-sdk-guides/how-to-validate-a-social-post-before-scheduling-it-with-the-api. The HTML version of the same page is at the same URL. You can also request Markdown from any page by sending `Accept: text/markdown`. Machine-readable summary of the whole site: https://www.dunsocial.com/llms.txt ## Company - Product: DunSocial, https://www.dunsocial.com - Legal entity: THISUX PRIVATE LIMITED, Chennai, Tamil Nadu, India - Support: support@dunsocial.com - Open the app: https://app.dunsocial.com/login