{"id":13542,"date":"2026-09-07T09:46:38","date_gmt":"2026-09-07T07:46:38","guid":{"rendered":"https:\/\/mybox.com\/help\/?post_type=manual_kb&#038;p=13542"},"modified":"2026-09-07T09:46:44","modified_gmt":"2026-09-07T07:46:44","slug":"http-422-unprocessable-content-explained-form-validation-api-payloads-and-fixes","status":"publish","type":"manual_kb","link":"https:\/\/mybox.com\/help\/en\/knowledgebase\/http-422-unprocessable-content-explained-form-validation-api-payloads-and-fixes\/","title":{"rendered":"HTTP 422 Unprocessable Content Explained: Form Validation, API Payloads, and Fixes"},"content":{"rendered":"\n<div class=\"translation-block translation-block-merged\">\n<p class=\"wp-block-paragraph\">HTTP 422 Unprocessable Content means that the server received a request it could read, but the submitted data could not be processed. The request format is valid at a basic level, yet one or more values fail validation or conflict with a rule required by the application.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This status often appears in forms, checkout flows, and APIs. The request reached the correct processing stage, so the next step is to inspect the payload and the rule that rejected it.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_86 ez-toc-wrap-left counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/mybox.com\/help\/en\/knowledgebase\/http-422-unprocessable-content-explained-form-validation-api-payloads-and-fixes\/#What_happens_when_a_server_returns_422\" >What happens when a server returns 422?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/mybox.com\/help\/en\/knowledgebase\/http-422-unprocessable-content-explained-form-validation-api-payloads-and-fixes\/#Which_failures_commonly_trigger_HTTP_422\" >Which failures commonly trigger HTTP 422?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/mybox.com\/help\/en\/knowledgebase\/http-422-unprocessable-content-explained-form-validation-api-payloads-and-fixes\/#How_422_differs_from_a_malformed_request\" >How 422 differs from a malformed request<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/mybox.com\/help\/en\/knowledgebase\/http-422-unprocessable-content-explained-form-validation-api-payloads-and-fixes\/#How_to_diagnose_a_422_response\" >How to diagnose a 422 response<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/mybox.com\/help\/en\/knowledgebase\/http-422-unprocessable-content-explained-form-validation-api-payloads-and-fixes\/#Forms_and_checkout_flows\" >Forms and checkout flows<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/mybox.com\/help\/en\/knowledgebase\/http-422-unprocessable-content-explained-form-validation-api-payloads-and-fixes\/#APIs_and_integrations\" >APIs and integrations<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/mybox.com\/help\/en\/knowledgebase\/http-422-unprocessable-content-explained-form-validation-api-payloads-and-fixes\/#How_to_prevent_repeated_422_errors\" >How to prevent repeated 422 errors<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"What_happens_when_a_server_returns_422\"><\/span>What happens when a server returns 422?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<\/div>\n\n<div id=\"mybox-1335144211\" class=\"mybox-content mybox-entity-placement\"><div class=\"early-access-banner-inpost\">\r\n  <div class=\"banner-left-inpost\">\r\n    <div class=\"icon-box-inpost\">\r\n      <img decoding=\"async\" src=\"https:\/\/mybox.com\/help\/wp-content\/uploads\/2026\/02\/square-info-icon.svg\" alt=\"Info\">\r\n    <\/div>\r\n    <div class=\"text-box-inpost\">\r\n      <span class=\"label-inpost\"><span class=\"translation-block translation-block-banner-text\">Early access<\/span><\/span>\r\n      <h4><span class=\"translation-block translation-block-banner-text\">Still need help?<\/span><\/h4>\r\n      <p><span class=\"translation-block translation-block-banner-text\">Contact our customer service team.<\/span><\/p>\r\n    <\/div>\r\n  <\/div>\r\n\r\n  <div class=\"banner-right-inpost\">\r\n    <a href=\"https:\/\/panel.mybox.com\/helpdesk2\/v\/list\/\" class=\"banner-button-inpost\"><span class=\"translation-block translation-block-banner-text\">Message us<\/span><\/a>\r\n  <\/div>\r\n<\/div><\/div>\n\n<div class=\"translation-block translation-block-merged\"><p class=\"wp-block-paragraph\">A request has several processing stages. The server first receives the request and reads its structure. It then checks the submitted values against validation rules and application rules. A 422 response belongs to the second stage: the request can be read, but its content is not acceptable for the requested operation.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example, a form can contain all expected fields and still return 422 because a required value is empty, a value has the wrong format, or two fields do not agree. An API can receive a correctly structured payload whose values cannot be used for the requested action.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Which_failures_commonly_trigger_HTTP_422\"><\/span>Which failures commonly trigger HTTP 422?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Required data is missing or empty.<\/strong> A form or API operation may require a value that the request does not provide.<\/li>\n\n\n\n<li><strong>A value has an invalid format.<\/strong> The field is present, but its content does not match the format expected by the application.<\/li>\n\n\n\n<li><strong>A value is outside an allowed range or set.<\/strong> The submitted option, amount, or other value is not accepted by the validation rule.<\/li>\n\n\n\n<li><strong>Related fields conflict.<\/strong> The individual fields may look valid, but their combination does not satisfy the form or process rules.<\/li>\n\n\n\n<li><strong>A business rule rejects the operation.<\/strong> The data may be structurally correct, but the requested action is not allowed under the rules of that application flow.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">The exact response depends on the application. A useful 422 response identifies the affected field or rule without exposing internal details.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"How_422_differs_from_a_malformed_request\"><\/span>How 422 differs from a malformed request<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">A malformed request fails while the server is trying to read or interpret the request itself. The server cannot use the request structure as submitted. A 422 response is later in the process: the server has read the request, but the values do not pass validation or a business rule.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This distinction changes the diagnostic path. For a 422 response, start with the submitted values and the validation rules. Do not begin by treating the request as unreadable unless the logs show a separate parsing or transport error.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Request size is a different boundary. HTTP 413 Content Too Large means that a server or another part of the request path refused a request because its size exceeded an allowed limit. The request may contain a file, form data, a theme, a plugin, a backup, or another large payload. See <a href=\"https:\/\/mybox.com\/help\/knowledgebase\/413-content-too-large-explained-upload-limits-request-sizes-and-safe-fixes\/\">HTTP 413 Content Too Large explained<\/a> for that case.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"How_to_diagnose_a_422_response\"><\/span>How to diagnose a 422 response<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Record the request that failed.<\/strong> Note the page or API endpoint, the action being performed, and the time of the error. For an integration, keep the response body and the request identifier if one is provided.<\/li>\n\n\n\n<li><strong>Inspect the payload.<\/strong> Check every field sent by the form or client. Confirm that required fields contain values, field names match the expected names, and values use the expected format.<\/li>\n\n\n\n<li><strong>Check related values together.<\/strong> Review fields that depend on each other, such as selections and their associated details. A 422 can result from a valid value being used with an incompatible value elsewhere in the same request.<\/li>\n\n\n\n<li><strong>Review the server logs.<\/strong> Find the entry for the same endpoint and time. Look for the rejected field, validation message, rule name, or business-rule result. The log should help connect the response to the server-side check that rejected the data.<\/li>\n\n\n\n<li><strong>Compare the client with the validation rules.<\/strong> The form or integration should send the same required fields and accepted values that the server expects. Update the client when its rules or field mapping do not match the server.<\/li>\n\n\n\n<li><strong>Test the corrected request.<\/strong> Submit the smallest valid set of data first. Then add optional fields or additional checkout data one part at a time. This helps identify which value or combination causes the rejection.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Forms_and_checkout_flows\"><\/span>Forms and checkout flows<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">For a website form, show the validation result next to the affected field when possible. Keep the submitted values available so the user does not need to complete the entire form again. The message should describe the correction in plain language, such as that a required value is missing or that a selected combination is not available.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Checkout flows need the same field-level handling. Validate required checkout data before sending it, then handle a server-side 422 when the final validation rejects the submitted values. Do not treat a rejected checkout request as a successful order. Show a clear correction message and allow the customer to submit the updated data.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"APIs_and_integrations\"><\/span>APIs and integrations<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">An API client should treat 422 as a data correction response. Log the endpoint, payload shape, response body, and validation details without recording sensitive values. The client can then correct the affected fields and send the request again.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">API responses should use a stable structure for validation errors. Include a clear general message and, where appropriate, a list of affected fields. Avoid returning stack traces, database details, credentials, or internal rule names that do not help the client correct the request.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"How_to_prevent_repeated_422_errors\"><\/span>How to prevent repeated 422 errors<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Keep client-side checks aligned with server-side validation.<\/li>\n\n\n\n<li>Mark required fields clearly and validate them before submission.<\/li>\n\n\n\n<li>Use the same field names and accepted value formats across forms, APIs, and integrations.<\/li>\n\n\n\n<li>Validate dependent fields as a group, not only one field at a time.<\/li>\n\n\n\n<li>Return specific, safe error messages that identify the correction without exposing internal details.<\/li>\n\n\n\n<li>Test valid, incomplete, incorrectly formatted, and conflicting payloads before releasing a form or integration.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">A 422 response is a signal that the request reached the application but its data did not meet the rules for processing. Reviewing the payload, server logs, and validation rules usually provides the clearest path to the correction.<\/p>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"template":"","format":"standard","manualknowledgebasecat":[43],"manual_kb_tag":[],"class_list":["post-13542","manual_kb","type-manual_kb","status-publish","format-standard","hentry","manualknowledgebasecat-website-errors"],"_links":{"self":[{"href":"https:\/\/mybox.com\/help\/en\/wp-json\/wp\/v2\/manual_kb\/13542","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mybox.com\/help\/en\/wp-json\/wp\/v2\/manual_kb"}],"about":[{"href":"https:\/\/mybox.com\/help\/en\/wp-json\/wp\/v2\/types\/manual_kb"}],"author":[{"embeddable":true,"href":"https:\/\/mybox.com\/help\/en\/wp-json\/wp\/v2\/users\/1"}],"version-history":[{"count":1,"href":"https:\/\/mybox.com\/help\/en\/wp-json\/wp\/v2\/manual_kb\/13542\/revisions"}],"predecessor-version":[{"id":13543,"href":"https:\/\/mybox.com\/help\/en\/wp-json\/wp\/v2\/manual_kb\/13542\/revisions\/13543"}],"wp:attachment":[{"href":"https:\/\/mybox.com\/help\/en\/wp-json\/wp\/v2\/media?parent=13542"}],"wp:term":[{"taxonomy":"manualknowledgebasecat","embeddable":true,"href":"https:\/\/mybox.com\/help\/en\/wp-json\/wp\/v2\/manualknowledgebasecat?post=13542"},{"taxonomy":"manual_kb_tag","embeddable":true,"href":"https:\/\/mybox.com\/help\/en\/wp-json\/wp\/v2\/manual_kb_tag?post=13542"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}