Error reference
invalid_json
The request body is not valid JSON (the message says where parsing stopped, e.g. an unquoted key or a trailing comma).
HTTP 400invalid_requestNot retryable0 credits
HTTP 400
error.type = invalid_requestHow to fix it
Send a valid JSON object with Content-Type: application/json. The call is free.
Example response
400 invalid_request
// HTTP 400
{
"error": {
"type": "invalid_request",
"code": "invalid_json",
"message": "The request body is not valid JSON (the message says where parsing stopped, e.g. an unquoted key or a trailing comma).",
"param": null,
"requestId": "req_…",
"creditsCharged": 0,
"retryable": false,
"docUrl": "https://stayingapi.com/docs/errors/invalid_json"
}
}This error is free
Like every StayingAPI error,
invalid_json returns creditsCharged: 0. You are never billed for a failed, empty, blocked or not-found call.See the full error catalog or the response envelope. The canonical URL for this page is https://stayingapi.com/docs/errors/invalid_json.