# Send Email - Bulk

Send marketing emails and newsletters through the bulk stream optimized for high-volume sending.

{% hint style="info" %}
Learn more about [Bulk Stream](https://docs.mailtrap.io/email-api-smtp/setup/bulk-stream) and when to use it.
{% endhint %}

## Send bulk email

> Send marketing emails and newsletters through the bulk stream optimized for high-volume sending.\
> \
> \*\*Use cases:\*\*\
> \- Marketing campaigns\
> \- Newsletters\
> \- Announcements\
> \- Promotional emails<br>

```json
{"openapi":"3.1.0","info":{"title":"Send Email - Bulk","version":"2.0.0"},"tags":[{"name":"send-email","description":"Send marketing emails and newsletters through the bulk stream optimized for high-volume sending.\n\n{% hint style=\"info\" %}\nLearn more about [Bulk Stream](https://docs.mailtrap.io/email-api-smtp/setup/bulk-stream) and when to use it.\n{% endhint %}\n"}],"servers":[{"description":"Bulk Stream","url":"https://bulk.api.mailtrap.io"}],"security":[{"HeaderAuth":[]},{"BearerAuth":[]}],"components":{"securitySchemes":{"HeaderAuth":{"type":"apiKey","description":"API token in Api-Token header","in":"header","name":"Api-Token"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer token authentication"}},"schemas":{"EmailWithText":{"title":"Text Only","description":"Send email with plain text content only","allOf":[{"$ref":"#/components/schemas/EmailSender"},{"$ref":"#/components/schemas/EmailRecipients"},{"$ref":"#/components/schemas/EmailReplyTo"},{"$ref":"#/components/schemas/EmailSubject"},{"$ref":"#/components/schemas/EmailText"},{"$ref":"#/components/schemas/EmailAttachments"},{"$ref":"#/components/schemas/EmailSendingHeaders"},{"$ref":"#/components/schemas/EmailCustomVariables"},{"$ref":"#/components/schemas/EmailCategory"}],"required":["from","subject","text"]},"EmailSender":{"type":"object","required":["from"],"properties":{"from":{"$ref":"#/components/schemas/Address"}}},"Address":{"type":"object","properties":{"email":{"type":"string","format":"email"},"name":{"type":"string"}}},"EmailRecipients":{"type":"object","properties":{"to":{"type":"array","maxItems":1000,"items":{"$ref":"#/components/schemas/Address"}},"cc":{"type":"array","maxItems":1000,"items":{"$ref":"#/components/schemas/Address"}},"bcc":{"type":"array","maxItems":1000,"items":{"$ref":"#/components/schemas/Address"}}}},"EmailReplyTo":{"type":"object","properties":{"reply_to":{"$ref":"#/components/schemas/Address"}}},"EmailSubject":{"type":"object","required":["subject"],"properties":{"subject":{"type":"string","minLength":1}}},"EmailText":{"type":"object","properties":{"text":{"type":"string","minLength":1}}},"EmailAttachments":{"type":"object","properties":{"attachments":{"type":"array","items":{"type":"object","required":["content","filename"],"properties":{"content":{"type":"string","description":"Base64 encoded content"},"filename":{"type":"string"},"type":{"type":"string","description":"MIME type"},"disposition":{"type":"string","enum":["attachment","inline"],"default":"attachment"},"content_id":{"type":"string","description":"For inline attachments"}}}}}},"EmailSendingHeaders":{"type":"object","properties":{"headers":{"type":"object","additionalProperties":{"type":"string"}}}},"EmailCustomVariables":{"type":"object","properties":{"custom_variables":{"type":"object","additionalProperties":{"type":"string"}}}},"EmailCategory":{"type":"object","properties":{"category":{"type":"string","maxLength":255}}},"EmailWithHtml":{"title":"HTML Only","description":"Send email with HTML content only","allOf":[{"$ref":"#/components/schemas/EmailSender"},{"$ref":"#/components/schemas/EmailRecipients"},{"$ref":"#/components/schemas/EmailReplyTo"},{"$ref":"#/components/schemas/EmailSubject"},{"$ref":"#/components/schemas/EmailHtml"},{"$ref":"#/components/schemas/EmailAttachments"},{"$ref":"#/components/schemas/EmailSendingHeaders"},{"$ref":"#/components/schemas/EmailCustomVariables"},{"$ref":"#/components/schemas/EmailCategory"}],"required":["from","subject","html"]},"EmailHtml":{"type":"object","properties":{"html":{"type":"string","minLength":1}}},"EmailWithTextAndHtml":{"title":"Text and HTML","description":"Send email with both plain text and HTML content","allOf":[{"$ref":"#/components/schemas/EmailSender"},{"$ref":"#/components/schemas/EmailRecipients"},{"$ref":"#/components/schemas/EmailReplyTo"},{"$ref":"#/components/schemas/EmailSubject"},{"$ref":"#/components/schemas/EmailText"},{"$ref":"#/components/schemas/EmailHtml"},{"$ref":"#/components/schemas/EmailAttachments"},{"$ref":"#/components/schemas/EmailSendingHeaders"},{"$ref":"#/components/schemas/EmailCustomVariables"},{"$ref":"#/components/schemas/EmailCategory"}],"required":["from","subject","text","html"]},"EmailFromTemplate":{"title":"From Template","description":"Send email using a pre-defined template with variables","allOf":[{"$ref":"#/components/schemas/EmailSender"},{"$ref":"#/components/schemas/EmailRecipients"},{"$ref":"#/components/schemas/EmailReplyTo"},{"$ref":"#/components/schemas/TemplateUuid"},{"$ref":"#/components/schemas/TemplateVariables"},{"$ref":"#/components/schemas/EmailAttachments"},{"$ref":"#/components/schemas/EmailSendingHeaders"},{"$ref":"#/components/schemas/EmailCustomVariables"}],"required":["from","template_uuid"]},"TemplateUuid":{"type":"object","properties":{"template_uuid":{"type":"string","format":"uuid","description":"Email template UUID"}}},"TemplateVariables":{"type":"object","properties":{"template_variables":{"type":"object","description":"Template variable values"}}},"SentResponse":{"type":"object","properties":{"success":{"type":"boolean"},"message_ids":{"type":"array","description":"Message IDs (one per recipient)","items":{"type":"string"}}}},"SendEmailErrorResponse":{"type":"object","properties":{"success":{"type":"boolean"},"errors":{"type":"array","items":{"type":"string"}}}}},"responses":{"BadRequest":{"description":"Bad request. Fix errors listed in response before retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendEmailErrorResponse"}}}},"Unauthorized":{"description":"Unauthorized. Check your API credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendEmailErrorResponse"}}}},"Forbidden":{"description":"Forbidden. Verify domain or check permissions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendEmailErrorResponse"}}}},"InternalError":{"description":"Internal server error. Retry later or contact support.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendEmailErrorResponse"}}}}}},"paths":{"/api/send":{"post":{"summary":"Send bulk email","description":"Send marketing emails and newsletters through the bulk stream optimized for high-volume sending.\n\n**Use cases:**\n- Marketing campaigns\n- Newsletters\n- Announcements\n- Promotional emails\n","operationId":"sendBulkEmail","tags":["send-email"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/EmailWithText"},{"$ref":"#/components/schemas/EmailWithHtml"},{"$ref":"#/components/schemas/EmailWithTextAndHtml"},{"$ref":"#/components/schemas/EmailFromTemplate"}]}}}},"responses":{"200":{"description":"Bulk email successfully sent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SentResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"500":{"$ref":"#/components/responses/InternalError"}}}}}}
```
