invalid_frontmatter
HTTP status: 422 Unprocessable Content · Charged: no
What it means
Section titled “What it means”The block between the two --- lines at the top of the document could not be turned into fields. kind says why, and line and column count from the first line of the document (the opening --- is line 1):
kind |
What happened | What to do |
|---|---|---|
invalid_yaml |
The block does not parse as YAML: bad indentation, a tab used for indentation, a colon inside an unquoted value, a missing colon after a key, a duplicated key. message is the parser’s own description. |
Go to the line and column and fix the YAML. |
not_an_object |
The block parses, but it is a list, a plain text or a single value instead of key: value pairs, so there are no field names to return. |
Put the values under keys, for example tags: [a, b]. |
unsupported_language |
The block is not YAML: it starts with ---toml, ---json or another language name, or uses +++ delimiters (TOML). |
Write the frontmatter as YAML between two plain --- lines. |
too_complex |
YAML anchors and aliases (&name, *name) expand to too many values. |
Write the values out, or keep anchors to a single level. |
Values come back as you wrote them: a date such as 2026-10-13 stays the text 2026-10-13, and a time such as 12:30 stays 12:30. Numbers and booleans follow the YAML 1.2 rules.
What to do
Section titled “What to do”- Read
kindand follow the table above. - For
invalid_yaml, go to the line and column in the response and check the usual causes: use spaces, never tabs; quote values that contain a colon, such astitle: "Release: October"; put a colon after every key. - Fix the document and call again.
Example response
Section titled “Example response”Captured from the production API on 2026-10-23. The document had date: 2026-10-13 indented under title: Release, which YAML reads as a mapping nested inside a value.
{ "error": "invalid_frontmatter", "hint": "The frontmatter block between `---` delimiters is not valid YAML. Check indentation (2 spaces, no tabs), quoting on values with special characters, and colons after every key. The `line` and `column` fields point to the first parser failure.", "kind": "invalid_yaml", "message": "Nested mappings are not allowed in compact mappings", "line": 2, "column": 8, "docs_url": "https://docs.markdownscribe.com/errors/invalid_frontmatter", "request_id": "01M5MV29NX0BRCW6BVYJG6NNEQ"}A frontmatter that is a list (- a and - b between the delimiters), captured the same day:
{ "error": "invalid_frontmatter", "hint": "The frontmatter must be a set of `key: value` pairs between the `---` delimiters. This one is a list, a plain text or a single value, which has no field names to return. Put the values under keys, for example `tags: [a, b]`.", "kind": "not_an_object", "message": "The frontmatter must be a set of key: value pairs; this one is a list.", "line": 2, "column": 1, "docs_url": "https://docs.markdownscribe.com/errors/invalid_frontmatter", "request_id": "01M5MV29CKA271GCRCTHJW317S"}Related
Section titled “Related”- validation: the request body itself is the wrong shape.