Skip to main content


The Send Endpoint

The /send endpoint is the main API endpoint for sending messages through OhMySMTP

Send an email

Endpoint address

Only HTTPS is supported


  • You can send to up 50 email addresses in one go in the To address fields
  • The endpoint supports a total email size of 50 MB
  • Rate limits exist for high send volumes over short periods of time. If you are experiencing this or believe you will, contact our Support team to discuss


Header NameContents
OhMySMTP-Server-TokenSee authentication for detailsRequired

Body Parameters


Full Name <>
Must be an email address or name & addr-spec as specified in Domain must be the domain associated with this API token.Required

Full Name <>,, Full Name <>
Must be an email address, name & addr-spec as specified in or a comma separated list of email addressesRequired
htmlbodystring<html><body><p>Content</p></body></html>Enclosing html tags are optionalRequired if textbody not supplied
textbodystringContentRequired if htmlbody not supplied
ccstringexample@domain.comMust be an email addressOptional
bccstringexample@domain.comMust be an email addressOptional
subjectstringEmail SubjectOptional

<>, <>
attachmentsarray of attachment objects (see below)[ name: "attachment.jpg", "cid": "cid:attachment.jpg", "content": "abcdefghijek", content_type": "image/jpeg" ]Optional File types are allow-listed (see below)
tagsarray of tags or a single tag as a string[ "password reset", "welcome" ] or "welcome"Optional


To send attachments over the API use the following format of an array of objects as the attachments property:

name: "This is what will be displayed to the end user. Example: myimage.jpg",
content: "The attachment, encoded as a base64 encoded string",
content_type: "MIME type. Example: image/jpeg"
cid: "Optional, used for embedding inline images. Example: myimage",
{ ... }

That the content field (the attachment itself) should be a base64 encoded string. You can easily convert files to base64 strings in most programming languages.

Only the following attachment extensions are supported, see here for their corresponding ContentTypes:

jpeg, jpg, png, gif, txt, pdf, docx, xlsx, pptx, csv, att

Including files with an extension other than the above will return an error. If you need to send an attachment type that is not specified in the list above, contact our Support team.

For unusual file types or large attachments we strongly recommend using an external service to host files and send a link to those files in the email. This will be much faster, and tends to be a far more scalable approach.