Skip to main content
The request body, headers, or query parameters didn’t match the documented schema, or the request violated a batch-level rule (target count, mode conflict, account resolution). This is rejection at the route boundary — platform-specific preflight (which checks platform constraints) only runs after validation passes.

What triggers it

  • Required field missing (e.g. no targets[], no text).
  • Type mismatch (e.g. text: 42 instead of a string).
  • Out-of-range value (e.g. limit: -1 on a list endpoint).
  • Bad pattern match (e.g. mediaId: "foo" — must match ^med_[0-9A-Za-z]{22}$).
  • Constraint violation (e.g. scheduledAt parses but is in the past).
  • Batch-level rules listed below.

Batch and target rules

These rules fire on POST /v1/posts after schema parsing but before preflight. They map directly to the validation layer in apps/api/src/routes/posts.ts.

Response shape

validation_failed.json
For pure schema failures the rule is the dot-joined Zod path and platformResponse carries the full Zod issues array — every issue, not just the first — so a UI can render them inline next to the right field:
zod-issues.json

Reproducing it

reproduce.sh

Remediation

Read the rule field and either fix the field at that path, or follow the batch-rule table above. For pure Zod failures, rule is the path of the first issue; check platformResponse for the full list when you’re rendering form errors to a user.