What triggers it
- Required field missing (e.g. no
targets[], notext). - Type mismatch (e.g.
text: 42instead of a string). - Out-of-range value (e.g.
limit: -1on a list endpoint). - Bad pattern match (e.g.
mediaId: "foo"— must match^med_[0-9A-Za-z]{22}$). - Constraint violation (e.g.
scheduledAtparses but is in the past). - Batch-level rules listed below.
Batch and target rules
These rules fire onPOST /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
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 therule 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.
Related
preflight_failed— passes schema, fails platform constraints.idempotency_conflict— same key, different body.- API reference — every endpoint’s request schema.

