# Send an email message via Send API v3

Send a message via Send API v3. Send API v3 is built mainly for speed, allowing you to send up to 100 messages in a single API call, as opposed to v3.1, where the limit is 50 messages per call. However, it lacks some of the more complex functionalities of Send API v3.1 like detailed feedback information in case of sending errors.

Endpoint: POST /v3/send
Version: 1.0.0
Security: basicAuth

## Request fields (application/json):

  - `FromEmail` (string)
    Specifies the sender email address:

1. When Sender is not specified, the email address will be used to send the message. In such cases, it must be a valid, activated sender for this account. See the /sender and /metasender resources for more info.

2. When Sender is specified as True, your default sender email address will be used to send the message instead, while the FromEmail will be displayed in the recipient's inbox. In such cases, it is not necessary for the FromEmail to be validated. When the default sender and FromEmail domains differ, the information will be displayed in the inbox as From {FromEmail} via / sent on behalf of {default_sender_domain}.

> Note: If the FromEmail domain has a DMARC policy in effect (e.g. Yahoo, AOL), the message will not be delivered. Instead, it will either bounce or be considered as Spam.

  - `FromName` (string)
    Sender name that will be displayed in the recipient's mailbox.

  - `Sender` (boolean)
    When true, default sender email address will be used to send the message, while the FromEmail will be displayed in the recipient's inbox. In such cases, it is not necessary for the FromEmail to be verified. However, the information will be displayed in the inbox as From {from_email} via / sent on behalf of {sender_domain}.

Default value: false

> Note: This option is disabled by default and is no longer available for new setups. Existing Default Sender configurations continue to work, but Mailjet no longer enables this functionality on new requests.

  - `Recipients` (array)
    A JSON array containing the list of recipients. Must include at least an Email property in each element. Required, unless To is specified. Cannot be used together with Cc and Bcc.

  - `Recipients.Email` (string, required)
    The email address of the recipient.

  - `Recipients.Name` (string)
    The name of the recipient. Will be displayed next to the email in the recipient's mailbox.

  - `Recipients.Vars` (string)
    Variables used in the message content for this recipient. Specified as a JSON array of var_name:var_value. Inserted in the text and/or HTML part of the message as [[var: var_value]].

  - `To` (string)
    The email address (and name, optionally) of the recipients. Interchangeable with Recipients. Acceptable formats are  john@example.com or ` or "John Doe" . Can include multiple contacts, which should  be separated by commas. Can be used together with Cc and Bcc`.

  - `Cc` (string)
    The email address (and name, optionally) of a recipient who is supposed to receive a carbon copy (cc) of this message. Used together with To and Bcc (optional). Acceptable formats are  john@example.com or ` or "John Doe" `. Can include multiple contacts, which should  be separated by commas.

  - `Bcc` (string)
    The email address (and name, optionally) of a recipient who is supposed to receive a blind carbon copy (bcc) of this message. Use this when you do not want your other recipients to see that you are sending a copy of the message to this email address. Used together with To and Cc (optional). Acceptable formats are  john@example.com or ` or "John Doe" `. Can include multiple contacts, which should  be separated by commas.

  - `Subject` (string)
    The email subject line.

  - `Text-part` (string)
    Provides the Text part of the message. Mandatory, if the Html-part parameter is not specified.

  - `Html-part` (string)
    Provides the HTML part of the message. Mandatory, if the Text-part parameter is not specified.

  - `Mj-TemplateID` (integer)
    The Template ID or Name to use as this email content. If the HTML/Text parts are specified, Mj-TemplateID will overwrite them. Equivalent to using the X-MJ-TemplateID header through SMTP.

  - `Mj-TemplateLanguage` (boolean)
    When true, activates the template language processing. Equivalent to using the X-MJ-TemplateLanguage header through SMTP.

Default value: false

  - `Mj-TemplateErrorReporting` (string)
    An email address, where a carbon copy with the error message is sent to in case of sending issues. Can only be used when Mj-TemplateLanguage=true. Equivalent to using the X-MJ-TemplateErrorReporting header through SMTP.

  - `Mj-TemplateErrorDeliver` (string)
    Defines if the message will be delivered if an error is discovered in the templating language. Can only be used when Mj-TemplateLanguage=true. Equivalent to using the X-MJ-TemplateErrorDeliver header through SMTP.

Possible values:

- deliver
- 0

Default value: 0

  - `Attachments` (array)
    A JSON object containing descriptions of the files attached to this message. Contains the Filename, Content type and Base64 encoded content of the file. The total size of the API call payload - including all attachments, inline attachments and message content - should not exceed 15 MB.

  - `Attachments.Filename` (string, required)
    The full name of the file (including the file extension).

  - `Attachments.Content-type` (string, required)
    Defines the type of content being sent out using a MIME type. See the [official MIME type](https://www.iana.org/assignments/media-types/media-types.xhtml) list for additional information.

  - `Attachments.Content` (string, required)
    Base64 encoded content of the attached file.

  - `Inline_attachments` (array)
    A JSON object containing descriptions of the files attached to this message, that are available for inline use. Inline attachments can be visible directly in the body of the message, depending on the email client support. Insert the file into the HTML code of the email by using cid:Filename. The total size of the API call payload - including all attachments, inline attachments and message content - should not exceed 15 MB.

  - `Inline_attachments.Filename` (string, required)
    The full name of the file (including the file extension).

  - `Inline_attachments.Content-type` (string, required)
    Defines the type of content being sent out using a MIME type. See the [official MIME type](https://www.iana.org/assignments/media-types/media-types.xhtml) list for additional information.

  - `Inline_attachments.Content` (string, required)
    Base64 encoded content of the attached file.

  - `Mj-prio` (integer)
    Indicates the processing priority inside your account (API Key) scheduling queue. Equivalent of using the X-Mailjet-Prio header through SMTP.

There are two queues - low priority (0, 1) and high priority (2, 3):

- 0 - low priority queue, processed first in, first out
- 1 - goes before the low priority queue, processed last in, first out
- 2 - high priority queue, processed first in, first out
- 3 - goes before the high priority queue, processed last in, first out

Send transactional messages with 2 and marketing messages with 0. Codes 1 and 3 are intended for narrow cases where tight control of the email flow is necessary - 3 can block messages sent with 2, so it is not advised for large volumes. Whether high or low priority, the processing speed is the same - only the order changes.

[More information](https://documentation.mailjet.com/hc/en-us/articles/360043571894-Email-Priority-Management).

Default value: 2

  - `Mj-campaign` (string)
    Specifies a custom campaign name, to  which all messages with this property value will be assigned. If the campaign doesn't already exist it will be automatically created in the Mailjet system. API users are allowed to send multiple emails from the same campaign name to the same contacts. To block this feature, use the Mj-deduplicatecampaign property. Equivalent of using X-Mailjet-Campaign header through SMTP.

  - `Mj-deduplicatecampaign` (integer)
    Enables or disables the option to send messages from the same campaign to the same contact multiple times. Equivalent of using X-Mailjet-DeduplicateCampaign header through SMTP.

When set to 1, a contact that has already received a message carrying a particular Mj-campaign value will not receive another message from that same campaign. When 0, the same contact can receive multiple messages from the same grouped campaign.

Possible values:

- 0
- 1

Default value: 0

  - `Mj-trackopen` (integer)
    Enable or disable open tracking on this message. This property will overwrite the preferences selected in the [Mailjet account](https://app.mailjet.com/account/settings). Equivalent of using X-Mailjet-TrackOpen header through SMTP.

Allowed Values:

- 0 = use the values specified in the [Mailjet account](https://app.mailjet.com/account/settings)
- 1 = disable tracking for this message
- 2 = enable tracking for this message
- 3 = anonymous tracking - opens are recorded without linking them to the individual recipient

This property is set per message object, so a single request can carry different values for different recipients. Use Mj-campaign to keep those messages grouped under one campaign for reporting.

Default value: 0

  - `Mj-trackclick` (integer)
    Enable or disable click tracking on this message. This property will overwrite the preferences selected in the [Mailjet account](https://app.mailjet.com/account/settings). Equivalent of using X-Mailjet-TrackClick header through SMTP.

Allowed Values:

- 0 = use the values specified in the [Mailjet account](https://app.mailjet.com/account/settings)
- 1 = disable tracking for this message
- 2 = enable tracking for this message
- 3 = anonymous tracking - clicks are recorded without linking them to the individual recipient

This property is set per message object, so a single request can carry different values for different recipients. Use Mj-campaign to keep those messages grouped under one campaign for reporting.

Default value: 0

  - `Mj-CustomID` (string)
    Select a user-defined custom ID.

  - `Mj-EventPayload` (string)
    Defines a payload attached to the message. The Parse API will return the values in the payload. Any standard format can be used - XML, JSON, CSV etc. Equivalent of using X-MJ-EventPayload header through SMTP.

  - `Headers` (object)
    A JSON object containing additional email headers. Specified as {header_name}:{header_value} pairs.

  - `Vars` (object)
    A JSON object containing variables used to modify the content of your email. Specified as {var_name}:{var_value} pairs. Enter the information in the template text / HTML part by using the [[var:{var_name}]] format. Equivalent of using X-MJ-Vars header through SMTP.

## Response 201 fields (application/json):

  - `Sent` (array)

  - `Sent.Email` (string)
    The email address for the recipient of this message.

  - `Sent.MessageID` (integer)
    Unique numeric ID of this message.

  - `Sent.MessageUUID` (string)
    A 128-bit universally unique identifier (UUID) for this message.


## Response 400 fields

## Response 401 fields

## Response 403 fields

## Response 404 fields

## Response 429 fields

## Response 500 fields
