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.
{ "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" } ] }}Why this happens
Section titled “Why this happens”| Raised when | Endpoint |
|---|---|
| The body is not parseable JSON | every POST |
template is missing or not a string | POST /v1/render |
The reference is malformed, e.g. invoice@0 or invoice@three | anything taking a :ref |
format is not pdf, png, jpg or jpeg | POST /v1/render |
renders is missing, empty or not an array | POST /v1/render/batch |
| The batch holds more than 50 items | POST /v1/render/batch |
webhook_url is not an absolute URL, or is not https in production | POST /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 Liquid | template create and version publish |
engine is not chromium or satori | template create and version publish |
schema is not an object, or will not compile as JSON Schema | template create and version publish |
Asking for webp gets a details.note explaining that it is not in v1.
How to fix it
Section titled “How to fix it”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.
Does retrying help?
Section titled “Does retrying help?”No. The same request will fail identically. Fix it first.