Skip to content

invalid_request

HTTP 400. Something about the request is wrong in a way that has nothing to do with your template’s schema. This is the shape of the call, not the contents of data.

400 Bad Request
{
"error": {
"type": "invalid_request",
"message": "`template` is required.",
"docs_url": "https://galleyrender.com/docs/errors/invalid_request",
"errors": [
{
"path": "template",
"message": "template is required",
"expected": "string — a template name, optionally with a version: `invoice` or `invoice@3`",
"received": "missing",
"example": "invoice@3"
}
]
}
}
Raised whenEndpoint
The body is not parseable JSONevery POST
template is missing or not a stringPOST /v1/render
The reference is malformed, e.g. invoice@0 or invoice@threeanything taking a :ref
format is not pdf, png, jpg or jpegPOST /v1/render
renders is missing, empty or not an arrayPOST /v1/render/batch
The batch holds more than 50 itemsPOST /v1/render/batch
webhook_url is not an absolute URL, or is not https in productionPOST /v1/render
name is missing or breaks ^[a-z0-9][a-z0-9._-]{0,62}$POST /v1/templates
source is missing, empty, or is not valid Liquidtemplate create and version publish
engine is not chromium or satoritemplate create and version publish
schema is not an object, or will not compile as JSON Schematemplate create and version publish

Asking for webp gets a details.note explaining that it is not in v1.

Read errors[]. Each entry gives the path at fault, what was expected, what was received and usually an example value. Change exactly that and resend. For a bad template reference, list what exists with GET /v1/templates.

No. The same request will fail identically. Fix it first.