Skip to main content
When something goes wrong, the API returns a non-2xx status and a consistent JSON envelope with a machine-readable code you can branch on:
message is human-readable and may change; code is stable — switch on it, not on the message text. details is optional and only present when it helps (for example, marketplaceUrl on a paid-script 402).

Status codes

Validation errors

Unknown query parameters are ignored (so we can add new ones without breaking you), but malformed known parameters return 400 with a clear message:

Raw-source gating

The /raw endpoint only serves source for free, keyless scripts. Otherwise:
You can avoid these entirely: a script object only includes a rawUrl when its source is actually servable. Check rawUrl != null (or scriptType === "free" && key === false) before fetching raw.