Validation errors (422)
When request fields fail validation, Laravel’s standard validation-exception response is returned — amessage summary plus a errors object keyed by field, each holding an array of failure messages. This does not use the {"ok": ..., "error": ...} envelope used elsewhere in this API:
Authentication errors (401)
A missing, revoked, or expired token fails Sanctum authentication before any controller runs, so it renders with Laravel’s default unauthenticated response — not the{"ok": ..., "error": ...} envelope used elsewhere:
- Token missing from
Authorizationheader - Token revoked or expired
A request from an IP outside the token’s allowlist is not a 401 — it returns 403 with a different shape. See below.
IP allowlist errors (403)
message, not error, unlike other error responses in this API.
Scope / permission errors (403)
zones:read, zones:write, records:read, records:write, sub_clients:read, sub_clients:write. Token scopes are set at creation time and cannot be changed — create a new token with the required scope.
Not found errors (404)
"Sub-client not found." message (still 404) when the sub_client_id in the request body doesn’t belong to your org.
Rate limiting (429)
Retry after the
Retry-After response header value (seconds).
Provider errors (502)
error string contains the provider’s message. Check:
- The record content is valid for the type
- The zone exists on the provider (may need re-syncing)
- The provider’s API is reachable from your PanelDNS server