Skip to content

Validation failed ​

400 · VALIDATION_FAILED

A field is missing, malformed, or out of range. Nothing was created.

json
{
  "type": "about:blank",
  "title": "Validation failed",
  "status": 400,
  "code": "VALIDATION_FAILED",
  "detail": "One or more fields are invalid.",
  "errors": [
    { "path": "links.0.metadata.author_email", "message": "author_email is not a valid email address" }
  ]
}

errors[] names the offending field. path is dotted and indexed, so links.3.expires_at is the fourth entry of the batch.

Common causes ​

pathUsually means
linksEmpty array, or not an array. Send at least one entry.
links.N.expires_atNot RFC 3339, in the past, under 60 seconds out, or over two years out.
links.N.metadata.author_emailNot a valid address.
links.N.referenceLonger than 128 characters.
links.N.metadata.segmentsMore than 50 entries, or one longer than 100 characters.
cursorMalformed pagination cursor — pass back next_cursor verbatim, do not construct one.
rowsEmpty array, or not an array. Send at least one row.

For conversation metadata, problems with a single row (a missing conversation_id, a value of the wrong type, an unknown field outside attributes) don't fail the request. They come back per row in a 207. Unknown fields inside attributes aren't errors at all: they're dropped and listed in dropped_fields.

What to do ​

Fix the request. Retrying an unchanged body returns the same 400.

In a batch, a single bad entry does not have to cost you the rest — the default is best-effort, and only "on_error": "abort" turns one invalid entry into a whole-request 400. See Creating links in bulk.

Zefi API v1