curl --request POST \
--url https://api.indiepitcher.com/v1/email/transactional \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"subject": "You've been invited to IndiePitcher",
"body": "You can use **markdown** to generate the email. Plain HTML is also supported.",
"to": "john@acme.com",
"trackEmailOpens": null,
"trackEmailLinkClicks": null
}
EOFimport requests
url = "https://api.indiepitcher.com/v1/email/transactional"
payload = {
"subject": "You've been invited to IndiePitcher",
"body": "You can use **markdown** to generate the email. Plain HTML is also supported.",
"to": "john@acme.com",
"trackEmailOpens": None,
"trackEmailLinkClicks": None
}
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({
subject: 'You\'ve been invited to IndiePitcher',
body: JSON.stringify('You can use **markdown** to generate the email. Plain HTML is also supported.'),
to: 'john@acme.com',
trackEmailOpens: null,
trackEmailLinkClicks: null
})
};
fetch('https://api.indiepitcher.com/v1/email/transactional', 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.indiepitcher.com/v1/email/transactional",
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([
'subject' => 'You\'ve been invited to IndiePitcher',
'body' => 'You can use **markdown** to generate the email. Plain HTML is also supported.',
'to' => 'john@acme.com',
'trackEmailOpens' => null,
'trackEmailLinkClicks' => null
]),
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.indiepitcher.com/v1/email/transactional"
payload := strings.NewReader("{\n \"subject\": \"You've been invited to IndiePitcher\",\n \"body\": \"You can use **markdown** to generate the email. Plain HTML is also supported.\",\n \"to\": \"john@acme.com\",\n \"trackEmailOpens\": null,\n \"trackEmailLinkClicks\": null\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.indiepitcher.com/v1/email/transactional")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"subject\": \"You've been invited to IndiePitcher\",\n \"body\": \"You can use **markdown** to generate the email. Plain HTML is also supported.\",\n \"to\": \"john@acme.com\",\n \"trackEmailOpens\": null,\n \"trackEmailLinkClicks\": null\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.indiepitcher.com/v1/email/transactional")
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 \"subject\": \"You've been invited to IndiePitcher\",\n \"body\": \"You can use **markdown** to generate the email. Plain HTML is also supported.\",\n \"to\": \"john@acme.com\",\n \"trackEmailOpens\": null,\n \"trackEmailLinkClicks\": null\n}"
response = http.request(request)
puts response.read_body{
"success": true
}Sends an email to specified email address.
The email is not required to belong to a contact in your contact list. Use this API to send emails such as that a user who is not signed up for your product was invited to a team.
curl --request POST \
--url https://api.indiepitcher.com/v1/email/transactional \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"subject": "You've been invited to IndiePitcher",
"body": "You can use **markdown** to generate the email. Plain HTML is also supported.",
"to": "john@acme.com",
"trackEmailOpens": null,
"trackEmailLinkClicks": null
}
EOFimport requests
url = "https://api.indiepitcher.com/v1/email/transactional"
payload = {
"subject": "You've been invited to IndiePitcher",
"body": "You can use **markdown** to generate the email. Plain HTML is also supported.",
"to": "john@acme.com",
"trackEmailOpens": None,
"trackEmailLinkClicks": None
}
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({
subject: 'You\'ve been invited to IndiePitcher',
body: JSON.stringify('You can use **markdown** to generate the email. Plain HTML is also supported.'),
to: 'john@acme.com',
trackEmailOpens: null,
trackEmailLinkClicks: null
})
};
fetch('https://api.indiepitcher.com/v1/email/transactional', 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.indiepitcher.com/v1/email/transactional",
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([
'subject' => 'You\'ve been invited to IndiePitcher',
'body' => 'You can use **markdown** to generate the email. Plain HTML is also supported.',
'to' => 'john@acme.com',
'trackEmailOpens' => null,
'trackEmailLinkClicks' => null
]),
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.indiepitcher.com/v1/email/transactional"
payload := strings.NewReader("{\n \"subject\": \"You've been invited to IndiePitcher\",\n \"body\": \"You can use **markdown** to generate the email. Plain HTML is also supported.\",\n \"to\": \"john@acme.com\",\n \"trackEmailOpens\": null,\n \"trackEmailLinkClicks\": null\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.indiepitcher.com/v1/email/transactional")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"subject\": \"You've been invited to IndiePitcher\",\n \"body\": \"You can use **markdown** to generate the email. Plain HTML is also supported.\",\n \"to\": \"john@acme.com\",\n \"trackEmailOpens\": null,\n \"trackEmailLinkClicks\": null\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.indiepitcher.com/v1/email/transactional")
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 \"subject\": \"You've been invited to IndiePitcher\",\n \"body\": \"You can use **markdown** to generate the email. Plain HTML is also supported.\",\n \"to\": \"john@acme.com\",\n \"trackEmailOpens\": null,\n \"trackEmailLinkClicks\": null\n}"
response = http.request(request)
puts response.read_body{
"success": true
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
The subject of the email.
"You've been invited to IndiePitcher"
The body of the email. Supports markdown and HTML
"You can use **markdown** to generate the email. Plain HTML is also supported."
The format of the email body. It can be either 'markdown' or 'html'.
markdown, html Can be just an email "john@example.com", or an email with a neme "John Doe john@example.com"
"john@acme.com"
Whether to track email opens. Allow you to overwrite the project's global setting. Default: nil - Uses the project's global setting.
null
Whether to track when a users taps on a link in the email. Allow you to overwrite the project's global setting. Default: nil - Uses the project's global setting.
null
Response
An empty response
Always true
