validation
HTTP status: 400 Bad Request · Charged: no
What it means
Section titled “What it means”The body of the request could not be used. Either it is not valid JSON, or a field is missing, has the wrong type, or is not allowed. The details array lists every field that failed, with its path, a code and a message. When the body is not JSON at all, details holds a single entry with code invalid_json.
What to do
Section titled “What to do”- Send
Content-Type: application/jsonand a well-formed JSON object. - Read
details: each entry names the field (path) and why it failed (message). - Check the expected body for the endpoint. The four Markdown operations take
{ "markdown": "<string>" }; Mermaid takes exactly one of{ "diagram": "..." }or{ "markdown": "..." }. The full contract is the OpenAPI document.
Example response
Section titled “Example response”Captured from the production API on 2026-10-13, calling POST /v1/md/lint with { "text": "# Hi" } instead of markdown.
{ "error": "validation", "hint": "The request body did not match the expected shape. See `details` for each field that failed. The endpoint expects `{ \"markdown\": \"<string>\" }`.", "details": [ { "path": ["markdown"], "code": "invalid_type", "message": "Invalid input: expected string, received undefined" } ], "docs_url": "https://docs.markdownscribe.com/errors/validation", "request_id": "01M4TRDFQJR0KEGWCTQ7EAEB4P"}Related
Section titled “Related”- invalid_request: the same kind of problem on URL to Markdown.
- payload_too_large: the body is valid but too big.