cURL
curl -X POST 'https://api.nuntly.com/emails/bulk' \
-H 'Authorization: Bearer apk_xxx' \
-H 'Content-Type: application/json' \
-d '{"emails":[{"from":"Tomlinson AI <ray@info.tomlinson.ai>","to":"brian67@gmail.com","subject":"Verify your email address","text":"Thank you for signing up! Please verify your email address."}]}'import { Nuntly } from '@nuntly/sdk';
const client = new Nuntly({
apiKey: process.env['NUNTLY_API_KEY'],
});
const response = await client.emails.bulk.send({
emails: [{ from: 'Tomlinson AI <ray@info.tomlinson.ai>', to: 'brian67@gmail.com', subject: 'Verify your email address', text: 'Thank you for signing up! Please verify your email address.' }],
});import com.nuntly.sdk.Nuntly;
import com.nuntly.sdk.ClientOptions;
import com.nuntly.sdk.models.*;
var nuntly = Nuntly.create(ClientOptions.builder()
.apiKey(System.getenv("NUNTLY_API_KEY"))
.build());
var response = nuntly.emails().bulk().send(CreateBulkEmailsRequest.builder()
.emails(List.of(CreateBulkEmail.builder().from("Tomlinson AI <ray@info.tomlinson.ai>").to("brian67@gmail.com").subject("Verify your email address").text("Thank you for signing up! Please verify your email address.").build()))
.build());import requests
url = "https://api.nuntly.com/emails/bulk"
payload = {
"emails": [
{
"from": "<string>",
"to": "brian67@gmail.com",
"cc": "carlo43@gmail.com",
"bcc": "archive@company.com",
"replyTo": "support@company.com",
"subject": "<string>",
"text": "<string>",
"html": "<string>",
"headers": {},
"tags": [
{
"name": "<string>",
"value": "<string>"
}
],
"variables": {}
}
],
"fallback": {
"from": "<string>",
"to": "brian67@gmail.com",
"cc": "carlo43@gmail.com",
"bcc": "archive@company.com",
"replyTo": "support@company.com",
"subject": "<string>",
"text": "<string>",
"html": "<string>",
"headers": {},
"tags": [
{
"name": "<string>",
"value": "<string>"
}
],
"variables": {}
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.nuntly.com/emails/bulk",
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([
'emails' => [
[
'from' => '<string>',
'to' => 'brian67@gmail.com',
'cc' => 'carlo43@gmail.com',
'bcc' => 'archive@company.com',
'replyTo' => 'support@company.com',
'subject' => '<string>',
'text' => '<string>',
'html' => '<string>',
'headers' => [
],
'tags' => [
[
'name' => '<string>',
'value' => '<string>'
]
],
'variables' => [
]
]
],
'fallback' => [
'from' => '<string>',
'to' => 'brian67@gmail.com',
'cc' => 'carlo43@gmail.com',
'bcc' => 'archive@company.com',
'replyTo' => 'support@company.com',
'subject' => '<string>',
'text' => '<string>',
'html' => '<string>',
'headers' => [
],
'tags' => [
[
'name' => '<string>',
'value' => '<string>'
]
],
'variables' => [
]
]
]),
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.nuntly.com/emails/bulk"
payload := strings.NewReader("{\n \"emails\": [\n {\n \"from\": \"<string>\",\n \"to\": \"brian67@gmail.com\",\n \"cc\": \"carlo43@gmail.com\",\n \"bcc\": \"archive@company.com\",\n \"replyTo\": \"support@company.com\",\n \"subject\": \"<string>\",\n \"text\": \"<string>\",\n \"html\": \"<string>\",\n \"headers\": {},\n \"tags\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"variables\": {}\n }\n ],\n \"fallback\": {\n \"from\": \"<string>\",\n \"to\": \"brian67@gmail.com\",\n \"cc\": \"carlo43@gmail.com\",\n \"bcc\": \"archive@company.com\",\n \"replyTo\": \"support@company.com\",\n \"subject\": \"<string>\",\n \"text\": \"<string>\",\n \"html\": \"<string>\",\n \"headers\": {},\n \"tags\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"variables\": {}\n }\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))
}require 'uri'
require 'net/http'
url = URI("https://api.nuntly.com/emails/bulk")
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 \"emails\": [\n {\n \"from\": \"<string>\",\n \"to\": \"brian67@gmail.com\",\n \"cc\": \"carlo43@gmail.com\",\n \"bcc\": \"archive@company.com\",\n \"replyTo\": \"support@company.com\",\n \"subject\": \"<string>\",\n \"text\": \"<string>\",\n \"html\": \"<string>\",\n \"headers\": {},\n \"tags\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"variables\": {}\n }\n ],\n \"fallback\": {\n \"from\": \"<string>\",\n \"to\": \"brian67@gmail.com\",\n \"cc\": \"carlo43@gmail.com\",\n \"bcc\": \"archive@company.com\",\n \"replyTo\": \"support@company.com\",\n \"subject\": \"<string>\",\n \"text\": \"<string>\",\n \"html\": \"<string>\",\n \"headers\": {},\n \"tags\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"variables\": {}\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"emails": [
{
"id": "<string>"
}
],
"id": "<string>"
}
}{
"error": {
"status": 123,
"code": "<string>",
"title": "<string>",
"details": {}
}
}Emails
Send Bulk Emails
Send up to 20 emails in a single request. Use fallback to set default values shared across all messages.
POST
/
emails
/
bulk
cURL
curl -X POST 'https://api.nuntly.com/emails/bulk' \
-H 'Authorization: Bearer apk_xxx' \
-H 'Content-Type: application/json' \
-d '{"emails":[{"from":"Tomlinson AI <ray@info.tomlinson.ai>","to":"brian67@gmail.com","subject":"Verify your email address","text":"Thank you for signing up! Please verify your email address."}]}'import { Nuntly } from '@nuntly/sdk';
const client = new Nuntly({
apiKey: process.env['NUNTLY_API_KEY'],
});
const response = await client.emails.bulk.send({
emails: [{ from: 'Tomlinson AI <ray@info.tomlinson.ai>', to: 'brian67@gmail.com', subject: 'Verify your email address', text: 'Thank you for signing up! Please verify your email address.' }],
});import com.nuntly.sdk.Nuntly;
import com.nuntly.sdk.ClientOptions;
import com.nuntly.sdk.models.*;
var nuntly = Nuntly.create(ClientOptions.builder()
.apiKey(System.getenv("NUNTLY_API_KEY"))
.build());
var response = nuntly.emails().bulk().send(CreateBulkEmailsRequest.builder()
.emails(List.of(CreateBulkEmail.builder().from("Tomlinson AI <ray@info.tomlinson.ai>").to("brian67@gmail.com").subject("Verify your email address").text("Thank you for signing up! Please verify your email address.").build()))
.build());import requests
url = "https://api.nuntly.com/emails/bulk"
payload = {
"emails": [
{
"from": "<string>",
"to": "brian67@gmail.com",
"cc": "carlo43@gmail.com",
"bcc": "archive@company.com",
"replyTo": "support@company.com",
"subject": "<string>",
"text": "<string>",
"html": "<string>",
"headers": {},
"tags": [
{
"name": "<string>",
"value": "<string>"
}
],
"variables": {}
}
],
"fallback": {
"from": "<string>",
"to": "brian67@gmail.com",
"cc": "carlo43@gmail.com",
"bcc": "archive@company.com",
"replyTo": "support@company.com",
"subject": "<string>",
"text": "<string>",
"html": "<string>",
"headers": {},
"tags": [
{
"name": "<string>",
"value": "<string>"
}
],
"variables": {}
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.nuntly.com/emails/bulk",
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([
'emails' => [
[
'from' => '<string>',
'to' => 'brian67@gmail.com',
'cc' => 'carlo43@gmail.com',
'bcc' => 'archive@company.com',
'replyTo' => 'support@company.com',
'subject' => '<string>',
'text' => '<string>',
'html' => '<string>',
'headers' => [
],
'tags' => [
[
'name' => '<string>',
'value' => '<string>'
]
],
'variables' => [
]
]
],
'fallback' => [
'from' => '<string>',
'to' => 'brian67@gmail.com',
'cc' => 'carlo43@gmail.com',
'bcc' => 'archive@company.com',
'replyTo' => 'support@company.com',
'subject' => '<string>',
'text' => '<string>',
'html' => '<string>',
'headers' => [
],
'tags' => [
[
'name' => '<string>',
'value' => '<string>'
]
],
'variables' => [
]
]
]),
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.nuntly.com/emails/bulk"
payload := strings.NewReader("{\n \"emails\": [\n {\n \"from\": \"<string>\",\n \"to\": \"brian67@gmail.com\",\n \"cc\": \"carlo43@gmail.com\",\n \"bcc\": \"archive@company.com\",\n \"replyTo\": \"support@company.com\",\n \"subject\": \"<string>\",\n \"text\": \"<string>\",\n \"html\": \"<string>\",\n \"headers\": {},\n \"tags\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"variables\": {}\n }\n ],\n \"fallback\": {\n \"from\": \"<string>\",\n \"to\": \"brian67@gmail.com\",\n \"cc\": \"carlo43@gmail.com\",\n \"bcc\": \"archive@company.com\",\n \"replyTo\": \"support@company.com\",\n \"subject\": \"<string>\",\n \"text\": \"<string>\",\n \"html\": \"<string>\",\n \"headers\": {},\n \"tags\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"variables\": {}\n }\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))
}require 'uri'
require 'net/http'
url = URI("https://api.nuntly.com/emails/bulk")
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 \"emails\": [\n {\n \"from\": \"<string>\",\n \"to\": \"brian67@gmail.com\",\n \"cc\": \"carlo43@gmail.com\",\n \"bcc\": \"archive@company.com\",\n \"replyTo\": \"support@company.com\",\n \"subject\": \"<string>\",\n \"text\": \"<string>\",\n \"html\": \"<string>\",\n \"headers\": {},\n \"tags\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"variables\": {}\n }\n ],\n \"fallback\": {\n \"from\": \"<string>\",\n \"to\": \"brian67@gmail.com\",\n \"cc\": \"carlo43@gmail.com\",\n \"bcc\": \"archive@company.com\",\n \"replyTo\": \"support@company.com\",\n \"subject\": \"<string>\",\n \"text\": \"<string>\",\n \"html\": \"<string>\",\n \"headers\": {},\n \"tags\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"variables\": {}\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"emails": [
{
"id": "<string>"
}
],
"id": "<string>"
}
}{
"error": {
"status": 123,
"code": "<string>",
"title": "<string>",
"details": {}
}
}Authorizations
Use an API key from https://nuntly.com/api-keys. Required on every endpoint.
Headers
Unique key to ensure the request is processed at most once. UUIDv4 recommended.
Required string length:
1 - 255Body
application/json
Response
Request accepted.
Show child attributes
Show child attributes
⌘I
