Platform API error
invalid_data
invalid_data is the OneLifeVibe Platform API HTTP 400 error for an ingest call whose data field is missing, an array, or not a JSON object.
Updated November 6, 2026
- HTTP status
- 400
- Code
invalid_data
Returned when
- A world calls POST /api/platform/v1/ingest and data is missing, an array or not an object.
What to do
- Send data as a JSON object, for example {"topic":"order.placed","data":{"order":"SC-1042"}}.
Example answer
HTTP/1.1 400
content-type: application/json
{
"error": {
"code": "invalid_data",
"message": "data must be a JSON object."
}
}
Related errors
- invalid_topic A subscription topic or an ingest topic is not valid.
- invalid_world_key An ingest call did not carry a valid world ingest key.
What it means
invalid_data is a client error code on the OneLifeVibe Platform API. It comes with HTTP status 400, which means the server received the request but rejected it because of the request content. For this code, the problem is the ingest event's data field: the event has no data object.
The response body uses the Platform API error shape: {"error":{"code":"…","message":"…","hint":"…"}}. The code is invalid_data, the message describes the failure, and the hint may add context. A typical message is "data must be a JSON object." Codes are stable, so match on the code rather than the message.
Why you are seeing it
You will see this on a call to POST /api/platform/v1/ingest made by a world. The request reaches the endpoint, but the data field fails validation in one of three ways: it is absent, it is an array, or it is a value that is not a JSON object.
An empty array is still an array. A quoted string, a number, a boolean, or null is not an object. A JSON string that contains object-like text is still a string, so double serialization produces this error even when the text looks correct. The rest of the event may look fine; this check is about the presence and type of data.
How to fix it
Send data as a JSON object. A valid example is {"topic":"order.placed","data":{"order":"SC-1042"}}. Here data is present and its value is an object with a named key. If your event already has data, confirm the value is an object and not an array.
If you build the body with a serializer, pass an object or map for data, not a pre-serialized string. If you send an array, convert it to an object with keys that describe each value. If data is missing, add it before the call.
Read the message and hint in the error response for the specific validation detail. Then correct the payload and send the request again. Correct the body before retrying.
Handling it in code
In client code, branch on the error code. Compare error.code to invalid_data and treat it as a payload validation failure. Do not compare the message text, because the code is the stable contract.
Log the HTTP status, code, message, hint, and the JSON type of data from the request you sent. That record tells you whether data was omitted, sent as an array, or sent as another type. Avoid logging full payloads if they contain sensitive values; log the shape and type instead.
If the code is invalid_data, fix the data field before any retry. Related codes for ingest calls are invalid_topic and invalid_world_key, so check the code value rather than assuming every 400 is the same problem.
Questions
What triggers invalid_data on POST /api/platform/v1/ingest?
It is returned when an ingest event has no data object. That includes data being missing, an array, or not an object.
How do I fix a 400 invalid_data error?
Send data as a JSON object, for example {"topic":"order.placed","data":{"order":"SC-1042"}}. If data is missing, add it; if it is an array or another type, replace it with an object.
Should I match the error message or the error code?
Match the code. The response includes error.code, error.message, and error.hint, and codes are stable. Use invalid_data to identify this failure, not the message text.
Keys, plans and usage live in the console: rotate keys, add webhook endpoints, see the last 30 days.
Written from the OneLifeVibe tool registry and platform configuration, and checked automatically before publishing. Something wrong? Tell us.