Send Email
curl --request POST \
--url https://api.launchmystore.io/api/v1/emails/send.json \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"to": "<string>",
"subject": "<string>",
"htmlBody": "<string>",
"replyTo": "<string>"
}
'import requests
url = "https://api.launchmystore.io/api/v1/emails/send.json"
payload = {
"to": "<string>",
"subject": "<string>",
"htmlBody": "<string>",
"replyTo": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({to: '<string>', subject: '<string>', htmlBody: '<string>', replyTo: '<string>'})
};
fetch('https://api.launchmystore.io/api/v1/emails/send.json', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.launchmystore.io/api/v1/emails/send.json",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'to' => '<string>',
'subject' => '<string>',
'htmlBody' => '<string>',
'replyTo' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.launchmystore.io/api/v1/emails/send.json"
payload := strings.NewReader("{\n \"to\": \"<string>\",\n \"subject\": \"<string>\",\n \"htmlBody\": \"<string>\",\n \"replyTo\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.launchmystore.io/api/v1/emails/send.json")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"to\": \"<string>\",\n \"subject\": \"<string>\",\n \"htmlBody\": \"<string>\",\n \"replyTo\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.launchmystore.io/api/v1/emails/send.json")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"to\": \"<string>\",\n \"subject\": \"<string>\",\n \"htmlBody\": \"<string>\",\n \"replyTo\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyEmail Templates
Send Email
Send a transactional email to a shopper as the merchant
POST
/
api
/
v1
/
emails
/
send.json
Send Email
curl --request POST \
--url https://api.launchmystore.io/api/v1/emails/send.json \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"to": "<string>",
"subject": "<string>",
"htmlBody": "<string>",
"replyTo": "<string>"
}
'import requests
url = "https://api.launchmystore.io/api/v1/emails/send.json"
payload = {
"to": "<string>",
"subject": "<string>",
"htmlBody": "<string>",
"replyTo": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({to: '<string>', subject: '<string>', htmlBody: '<string>', replyTo: '<string>'})
};
fetch('https://api.launchmystore.io/api/v1/emails/send.json', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.launchmystore.io/api/v1/emails/send.json",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'to' => '<string>',
'subject' => '<string>',
'htmlBody' => '<string>',
'replyTo' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.launchmystore.io/api/v1/emails/send.json"
payload := strings.NewReader("{\n \"to\": \"<string>\",\n \"subject\": \"<string>\",\n \"htmlBody\": \"<string>\",\n \"replyTo\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.launchmystore.io/api/v1/emails/send.json")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"to\": \"<string>\",\n \"subject\": \"<string>\",\n \"htmlBody\": \"<string>\",\n \"replyTo\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.launchmystore.io/api/v1/emails/send.json")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"to\": \"<string>\",\n \"subject\": \"<string>\",\n \"htmlBody\": \"<string>\",\n \"replyTo\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodySend Email
Sends one transactional email on the merchant’s behalf. The platform picks the transport: the merchant’s own SMTP when they have configured one, otherwise the platform sender. Your app never sees the merchant’s mail credentials. Requires thesend_emails scope. Use it for the emails your app owns —
ready-for-pickup, return approved, shipment delivered — not for marketing.
Request
curl -X POST "https://api.launchmystore.io/api/v1/emails/send.json" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"to": "shopper@example.com",
"subject": "Your order #1001 has shipped",
"htmlBody": "<p>Good news — your parcel is on its way.</p>",
"replyTo": "support@acme-store.com"
}'
await fetch('https://api.launchmystore.io/api/v1/emails/send.json', {
method: 'POST',
headers: { Authorization: 'Bearer YOUR_ACCESS_TOKEN', 'Content-Type': 'application/json' },
body: JSON.stringify({ to: 'shopper@example.com', subject: 'Your order #1001 has shipped', htmlBody: '<p>Good news — your parcel is on its way.</p>' }),
});
Body
string
required
One recipient address. Send one request per recipient — never a shared
To.string
required
Subject line.
string
required
The HTML body. Inline your styles; there is no template wrapper applied.
string
Reply-To address (for example the merchant’s support inbox). Defaults to
the store’s business email, so shopper replies reach the merchant. An
invalid address is rejected with
400.Response
{
"status": 200,
"message": "success",
"data": {
"sent": true,
"transport": "merchant_smtp"
}
}
transport is merchant_smtp when the merchant’s own SMTP was used and
platform otherwise; suggest merchants configure their own sender for best
deliverability.
Errors
| HTTP Status | Description |
|---|---|
400 | to, subject or htmlBody missing, or to is not an email address |
401 | Invalid or missing access token |
403 | App doesn’t have send_emails scope |
404 | Store not found |
500 | The mail transport rejected the message (the merchant’s SMTP is down or misconfigured) — surface it to the merchant rather than retrying blindly |