{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-docs/email-api/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Send API v3.1 Errors","siteUrl":"https://dev.mailjet.com/","projectTitle":"Mailjet Developer Documentation","description":"Understand Mailjet Send API v3.1 error responses: the Errors array structure, ErrorCode categories, and ErrorIdentifier values for failed message validation.","image":"https://dev.mailjet.com/og-image.png","lang":"en-US","keywords":["Mailjet API","Email API","Content API","SMTP Relay","transactional email","email delivery","Send API","email templates","developer documentation"],"meta":[{"name":"og:type","content":"website"},{"name":"og:site_name","content":"Mailjet Developer Documentation"},{"name":"twitter:card","content":"summary_large_image"},{"name":"robots","content":"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1"},{"name":"googlebot","content":"index, follow, max-snippet:-1, max-image-preview:large"}],"jsonLd":{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://dev.mailjet.com/#organization","name":"Mailjet","alternateName":"Sinch Mailjet","url":"https://www.mailjet.com","logo":"https://assets.mailjet.com/lib/images/mailjetLogo/mj_logo_with_text_color.png","parentOrganization":{"@type":"Organization","name":"Sinch","url":"https://www.sinch.com"}},{"@type":"WebSite","@id":"https://dev.mailjet.com/#website","name":"Mailjet Developer Documentation","description":"Official developer documentation for the Mailjet Email API, Content API and SMTP Relay.","url":"https://dev.mailjet.com/","inLanguage":"en-US","publisher":{"@id":"https://dev.mailjet.com/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://dev.mailjet.com/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]},"llmstxt":{"hide":false,"title":"Mailjet Developer Documentation","description":"Developer documentation for the Mailjet Email API, Content API and SMTP Relay - guides, API references and code samples for sending, templating and tracking email at scale.","details":{"content":"Mailjet (part of Sinch) provides APIs for sending and managing email.\n\nThis documentation covers four main areas:\n\n- **Email API** - the Send API (v3 and v3.1) for transactional and marketing email,\n  plus contact management, segmentation, campaigns, statistics, webhooks, the Parse API\n  and the Mailjet Templating Language.\n- **Content API** - programmatic management of email templates, template contents,\n  images, labels and authentication tokens (v1).\n- **SMTP Relay** - sending through Mailjet's SMTP servers, including custom headers.\n- **API Reference** - the complete, generated reference for every endpoint, built directly\n  from the OpenAPI specifications.\n\nBase URL for all REST APIs: `https://api.mailjet.com`.\nAuthentication uses HTTP Basic auth with an API key and secret key.\n\n## Machine-readable entry points\n\nPrefer these when you need the API surface in as few requests as possible:\n\n- `/openapi/openapi-mailjet.md` - the **complete** Email API reference (every endpoint,\n  grouped by resource) as a single Markdown document.\n- `/openapi/openapi-passport.md` - the **complete** Content API reference as a single\n  Markdown document.\n- `/_bundle/openapi/openapi-mailjet.yaml` - the raw, fully bundled OpenAPI 3 description\n  of the Email API.\n- `/_bundle/openapi/openapi-passport.yaml` - the raw, fully bundled OpenAPI 3 description\n  of the Content API.\n- `/sitemap.xml` - every indexable URL on this site.\n\nEvery page on this site is also available as clean Markdown by appending `.md` to its URL."},"sections":[{"title":"Email API","description":"Sending, contacts, campaigns, statistics, webhooks and templating.","includeFiles":["docs/email-api/**/*.md"],"excludeFiles":[]},{"title":"Content API","description":"Manage templates, template contents, images, labels and tokens.","includeFiles":["docs/content-api/**/*.md","docs/content-api.md"],"excludeFiles":[]},{"title":"SMTP Relay","description":"Send email through Mailjet's SMTP servers.","includeFiles":["docs/smtp-relay/**/*.md"],"excludeFiles":[]},{"title":"API Reference","description":"Complete generated reference for every Mailjet API endpoint.","includeFiles":["openapi/openapi-mailjet.yaml","openapi/openapi-passport.yaml","docs/api-reference/**/*.md"],"excludeFiles":[]},{"title":"Migrating from Mandrill","description":"Guides for switching from Mandrill to Mailjet.","includeFiles":["docs/mandrill/**/*.md"],"excludeFiles":[]}],"excludeFiles":[]},"priority":0.8},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"send-api-errors","__idx":0},"children":["Send API errors"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["When an error occurs on a message validation, a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["error"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Status"]}," will be returned in the response. The description of the error(s) will be contain in the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Errors"]}," property."," ","Each error will contain the following properties:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ErrorIdentifier"]},": internal Mailjet Error identifier"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ErrorCode"]},": standardized classification of the error (see table bellow)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["StatusCode"]},": Status code of the error , follow the http status code"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ErrorMessage"]},": description of the error"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ErrorRelatedTo"]},": list of message properties related to this error"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Global Error (example: broken JSON format)"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"ErrorIdentifier\": \"06df1144-c6f3-4ca7-8885-7ec5d4344113\",\n  \"ErrorCode\": \"mj-0002\",\n  \"ErrorMessage\": \"Malformed JSON, please review the syntax and properties types.\",\n  \"StatusCode\": 400\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"error-in-validation-of-the-json-payload","__idx":1},"children":["Error in validation of the JSON Payload"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"{\n  \"Messages\": [\n    {\n      \"Status\": \"error\",\n      \"Errors\": [\n        {\n          \"ErrorIdentifier\": \"f987008f-251a-4dff-8ffc-40f1583ad7bc\",\n          \"ErrorCode\": \"mj-0004\",\n          \"StatusCode\": 400,\n          \"ErrorMessage\": \"Type mismatch. Expected type \\\"array of emails\\\".\",\n          \"ErrorRelatedTo\": [\"HTMLPart\", \"TemplateID\"]\n        },\n        {\n          \"ErrorIdentifier\": \"8e28ac9c-1fd7-41ad-825f-1d60bc459189\",\n          \"ErrorCode\": \"mj-0005\",\n          \"StatusCode\": 400,\n          \"ErrorMessage\": \"The To is mandatory but missing from the input\",\n          \"ErrorRelatedTo\": [\"To\"]\n        }\n      ]\n    }\n  ]\n}\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In bulk sending (multiple instances of messages in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Messages"]},"), we will process each message separately. As a result, the response can contain both success and error notifications. For a single message, Send API can return multiple errors, each related to different properties of the payload."]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Status Code"},"children":["Status Code"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Error Code"},"children":["Error Code"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Related To"},"children":["Related To"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["400"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["send-0003"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["when none of the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["HTML"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Text"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TemplateID"]}," properties are provided."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["HTMLPart, TextPart, TemplateID"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["400"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["send-0004"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["when providing ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["HTML"]}," property, as well as a template also containing an HTML part - i.e. Duplicated content"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["HTMLPart, TemplateID"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["403"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["send-0006"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["when the API key doesn’t have permission to use a Sender header. Please contact our support team to be granted permission."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["SenderID"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["403"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["send-0007"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["when ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SenderID"]}," is provided but not validated."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["SenderID"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["403"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["send-0008"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["when the sender email address provided in the From property is not authorized. The validation can be done on the Sender domains & addresses page or through the API."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["From"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["400"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["send-0010"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["when the API key can’t send the provided template. Please verify the owner of the template."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["TemplateID"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["400"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["send-0011"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["when one of the forbidden headers (headers that have a property alternative) is set in the Headers collection. Please use the dedicated message property to set this header."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Headers[\"headerName\"]"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["400"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["send-0012"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["when ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["DeduplicateCampaign"]}," is set to true while no ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CustomCampaign"]}," is defined."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["CustomCampaign, DeduplicateCampaign"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["400"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["send-0015"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["when the total number of recipients is over the limit."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["To,CC,Bcc"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["400"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["send-0016"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["when ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TemplateLanguage"]}," value is missing but ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TemplateErrorReporting"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TemplateErrorDeliver"]}," are present."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["TemplateLanguage"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["401"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["mj-0001"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["when API key is suspended."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["400"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["mj-0002"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["when the API call contains payload with an invalid JSON syntax."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["400"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["mj-0003"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["when a mandatory property is missing or with null value. See ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ErrorRelatedTo"]}," for a list"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["400"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["mj-0004"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["when there is a type mismatch in the value of a property"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["400"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["mj-0005"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["when a property value is not an allowed values."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Priority,TrackClicks,TrackOpens"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["400"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["mj-0006"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["when a property contains more than the maximum allowed number of characters."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Subject, URLTags"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["400"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["mj-0007"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["when an empty array is provided that cannot be empty."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Messages,To"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["400"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["mj-0008"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["when an array property contains more than the maximum allowed number of elements. Max Allowed item limit is 50."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Messages,Attachments,InlineAttachments,Headers,Variables"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["400"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["mj-0011"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["when the payload size is over the limit."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["400"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["mj-0012"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["when an empty string value is provided."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Email,FileName,Base64Content,ContentType"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["400"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["mj-0013"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["when the email address format is invalid."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Email"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["401"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["mj-0015"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["when the user did not provide valid authorization credentials."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["When the HTTP status for the API call is 500, you will see ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ErrorIdentifier"]}," field. It will contain a reference to the error in our internal log and it is crucial for us to determine the root cause of the failure. Should you encounter such errors, please contact our support for additional investigation, providing this error identifier."]}]},"headings":[{"value":"Send API errors","id":"send-api-errors","depth":2},{"value":"Error in validation of the JSON Payload","id":"error-in-validation-of-the-json-payload","depth":4}],"frontmatter":{"title":"Mailjet Send API v3.1","seo":{"title":"Send API v3.1 Errors","description":"Understand Mailjet Send API v3.1 error responses: the Errors array structure, ErrorCode categories, and ErrorIdentifier values for failed message validation.","priority":0.8}},"lastModified":"2026-08-26T10:53:57.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/docs/email-api/send-api-v31/send-api-errors","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}