LINE Messaging API · error code

LINE error 400: The property, XXX, in the request body is invalid

Permanent - do not retryHTTP 400400 / 409 / 413: request body, tokens and payload

Last verified against LINE Developers - Messaging API reference (error responses)

What LINE returns
The property, XXX, in the request body is invalid (line: XXX, column: XXX) <detail varies>

What error 400 means

The reference documents this as: "An invalid property was specified in the request body. The specific property is displayed for 'XXX'." Unlike The request body has X error(s), which reports rule violations on values inside a structurally acceptable body, this message fires when the body contains a property LINE doesn't accept at that position at all - a misspelled key, a property from a different object type, or a field pasted at the wrong nesting level. The template even includes the line and column of your raw JSON, which makes it one of the few LINE errors you can trace to an exact byte offset in the payload you transmitted.

The line/column detail is a strong hint about how to debug it: don't inspect the object your code meant to send, inspect the serialized JSON that actually went over the wire. Serializers that include null fields, ORMs that leak internal attributes, and hand-merged dictionaries are the usual sources of stray properties. The error is deterministic - the same body fails identically on every retry - and nothing was sent or charged.

Because the Messaging API evolves, a property that is valid on one endpoint may be unknown on another (for example, options that exist for push but not for reply). Always check the specific endpoint's request-body table in the reference rather than assuming the property sets are identical.

What it looks like

{
  "message": "The property, messages[0].quickReplay, in the request body is invalid (line: 6, column: 8)"
}

Why it happens

  • A typo in a property name (e.g. mesages, replytoken) or wrong casing - property names are case-sensitive.
  • A property that belongs to a different message type, such as template fields inside a flex object.
  • A field placed at the wrong nesting level after hand-building JSON, e.g. quickReply inside contents instead of on the message object.
  • Your serializer emitted extra internal fields (nulls, private attributes, metadata) into the request body.
  • A property from a newer or different endpoint used where this endpoint doesn't support it.

How to fix LINE error 400

  1. 1Capture the exact serialized request body and go to the line and column numbers in the error - they index into that raw JSON.
  2. 2Compare the property name character-by-character against the endpoint's request body table in the Messaging API reference.
  3. 3Strip unknown and null properties before sending; configure your serializer to omit fields that aren't part of the documented schema.
  4. 4Rebuild the payload with an official LINE SDK type or a schema-validated builder and diff it against what your code produced.
  5. 5Re-run through the free validate endpoints for message objects to confirm the fix before sending real traffic.

How to stop it recurring

Never hand-assemble Messaging API JSON in production paths. Use the official SDK builders or a schema (OpenAPI/JSON Schema) checked in CI, and configure serialization to drop unknown and null fields. When adopting a new property from the docs, confirm it exists on the specific endpoint you call - the request-body tables differ between reply, push, multicast, narrowcast, and broadcast.

Official reference: LINE Developers - Messaging API reference (error responses). See all LINE error codes or the LINE limits and quotas.

Related codes

Error 400 - quick answers

What does LINE error 400 mean?

The reference documents this as: "An invalid property was specified in the request body.

How do I fix LINE error 400?

1. Capture the exact serialized request body and go to the line and column numbers in the error - they index into that raw JSON. 2. Compare the property name character-by-character against the endpoint's request body table in the Messaging API reference. 3. Strip unknown and null properties before sending; configure your serializer to omit fields that aren't part of the documented schema. 4. Rebuild the payload with an official LINE SDK type or a schema-validated builder…

Should I retry after error 400?

No. Retrying the same request produces the same error; the condition has to be fixed first. Treat it as a permanent failure for that message and surface it, rather than looping.

Stop debugging LINE by hand

Connect the channel through Conferbot: tokens, webhooks and retries are handled, failures show as readable status.