Mailcompose API
  1. APIs
Mailcompose API
  • 🚶🏼‍♂️ Walk through Mailcompose
  • Receive Email Webhook
  • APIs
    • Send Email
      POST
    • Reply
      POST
    • Reply All
      POST
  1. APIs

Send Email

POST
https://apis.mailcompose.com/apis/v1/send
This API will send a new fresh email.
Make sure that the email that you pass in from field is a registered email in the Mailcompose Dashboard.
To add a new sender
1.
Login into the Mailcompose Dashbord
2.
Click on Send Now
3.
Click on Add a new Sender

Request

Header Params
Api-Key
string 
required
Example:
xyz-xyz-xyz-xyz-xyz
Api-Secret
string 
required
Example:
xyz-xyz-xyz-xyz-xyz
User-Agent
string 
optional
Example:
YourCompanyName
Content-Type
string 
required
Example:
application/json
Body Params application/json
from
string <email>
required
Example:
invoices@yourcompany.com
to
array[string <email>]
to
required
>= 1 items
cc
array[string <email>]
optional
bcc
array[string <email>]
optional
subject
string 
required
text
string 
required
html
string 
optional
attachments
array [object {3}] 
optional
filename
string 
required
Example:
att1.jpg
contentType
string 
required
Example:
image/jpeg
base64
string 
required
Example:
iYQ...
Example
{
    "from": "invoices@yourcompany.com",
    "to": [
        "user@example.com"
    ],
    "cc": [
        "user@example.com"
    ],
    "bcc": [
        "user@example.com"
    ],
    "subject": "string",
    "text": "string",
    "html": "string",
    "attachments": [
        {
            "filename": "att1.jpg",
            "contentType": "image/jpeg",
            "base64": "iYQ..."
        }
    ]
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://apis.mailcompose.com/apis/v1/send' \
--header 'Api-Key: xyz-xyz-xyz-xyz-xyz' \
--header 'Api-Secret: xyz-xyz-xyz-xyz-xyz' \
--header 'User-Agent: YourCompanyName' \
--header 'Content-Type: application/json' \
--data-raw '{
    "from": "invoices@yourcompany.com",
    "to": [
        "user@example.com"
    ],
    "cc": [
        "user@example.com"
    ],
    "bcc": [
        "user@example.com"
    ],
    "subject": "string",
    "text": "string",
    "html": "string",
    "attachments": [
        {
            "filename": "att1.jpg",
            "contentType": "image/jpeg",
            "base64": "iYQ..."
        }
    ]
}'

Responses

🟢200Success
application/json
Body
success
boolean 
required
payload
object 
required
messageId
string 
required
Example:
snmdkm2k3em2@sub.domain.com
mailcomposeEmailId
string 
required
Example:
makcwi2d2w1212e
threadId
string 
required
Example:
tsdvjne12e12pkm1pk
Example
{
    "success": true,
    "payload": {
        "messageId": "snmdkm2k3em2@sub.domain.com",
        "mailcomposeEmailId": "makcwi2d2w1212e",
        "threadId": "tsdvjne12e12pkm1pk"
    }
}
🟠402Free Plan Limit Exceeded
Previous
Receive Email Webhook
Next
Reply
Built with