API status codes
Every Log Lens JSON API response carries a standard HTTP status code. Success responses return the requested payload; errors return a JSON body of {"error": "..."} with the message describing what went wrong.
Reference
| Code | Meaning | When you see it |
|---|---|---|
200 | OK | The request succeeded. Default for reads and most writes (status changes, tag assignment, sync, reindex, deletion). |
201 | Created | A new resource was created - a manual issue, tag, module, or connector. |
400 | Bad Request | A runtime failure that is not a missing resource - for example an incoming import that is already running for the application, or an occurrence whose archived source file is unavailable. |
401 | Unauthorized | An API key is configured but the request presented none or the wrong one. |
403 | Forbidden | A state-changing request was blocked as cross-origin. |
404 | Not Found | Unknown api endpoint, or a resource whose lookup reports it is not found (for example an unknown issue id). |
405 | Method Not Allowed | The endpoint does not accept the HTTP method you used. |
422 | Unprocessable Entity | The request was understood but a parameter was invalid or missing. |
500 | Server Error | An unexpected failure. The full exception is written to the PHP error log. |
Notes
401 - authentication. Only enforced when an API key is set (auth.token). Present it as X-Log-Lens-Token or Authorization: Bearer <token>. With no key configured, the API is unauthenticated by default. See API key authentication.
403 - cross-origin. Applies to every method except GET, HEAD, and OPTIONS. A request whose Origin host differs from the Host is blocked. Non-browser clients (curl, cron, the AI skills) send no Origin and pass through. See Cross-origin (CSRF) protection.
405 - method. Each endpoint declares its allowed methods; the error message lists them, e.g. GET or POST required. Writing endpoints like reindex, bulk-issues, and delete-logs require POST.
422 vs 400 vs 404. A bad parameter (missing id, severities that is not an array) returns 422. A runtime failure returns 400, unless its message reports the resource was not found, which returns 404.