Create an email draft
Creates a draft email for a contact. The sender (from) is resolved to a connected email account. Optionally schedules the draft for later sending.
curl --request POST \
--url https://api.seamless.ai/api/client/v2/emails \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"contactId": 12345,
"from": "rep@acme.com",
"to": "prospect@example.com",
"subject": "Quick question about your team",
"body": "Hi there, I wanted to reach out...",
"cc": "manager@example.com",
"bcc": "archive@acme.com",
"templateId": 678,
"scheduleAt": "2026-07-01T15:00:00.000Z"
}
'import requests
url = "https://api.seamless.ai/api/client/v2/emails"
payload = {
"contactId": 12345,
"from": "rep@acme.com",
"to": "prospect@example.com",
"subject": "Quick question about your team",
"body": "Hi there, I wanted to reach out...",
"cc": "manager@example.com",
"bcc": "archive@acme.com",
"templateId": 678,
"scheduleAt": "2026-07-01T15:00:00.000Z"
}
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({
contactId: 12345,
from: 'rep@acme.com',
to: 'prospect@example.com',
subject: 'Quick question about your team',
body: JSON.stringify('Hi there, I wanted to reach out...'),
cc: 'manager@example.com',
bcc: 'archive@acme.com',
templateId: 678,
scheduleAt: '2026-07-01T15:00:00.000Z'
})
};
fetch('https://api.seamless.ai/api/client/v2/emails', 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.seamless.ai/api/client/v2/emails",
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([
'contactId' => 12345,
'from' => 'rep@acme.com',
'to' => 'prospect@example.com',
'subject' => 'Quick question about your team',
'body' => 'Hi there, I wanted to reach out...',
'cc' => 'manager@example.com',
'bcc' => 'archive@acme.com',
'templateId' => 678,
'scheduleAt' => '2026-07-01T15:00:00.000Z'
]),
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.seamless.ai/api/client/v2/emails"
payload := strings.NewReader("{\n \"contactId\": 12345,\n \"from\": \"rep@acme.com\",\n \"to\": \"prospect@example.com\",\n \"subject\": \"Quick question about your team\",\n \"body\": \"Hi there, I wanted to reach out...\",\n \"cc\": \"manager@example.com\",\n \"bcc\": \"archive@acme.com\",\n \"templateId\": 678,\n \"scheduleAt\": \"2026-07-01T15:00:00.000Z\"\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.seamless.ai/api/client/v2/emails")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"contactId\": 12345,\n \"from\": \"rep@acme.com\",\n \"to\": \"prospect@example.com\",\n \"subject\": \"Quick question about your team\",\n \"body\": \"Hi there, I wanted to reach out...\",\n \"cc\": \"manager@example.com\",\n \"bcc\": \"archive@acme.com\",\n \"templateId\": 678,\n \"scheduleAt\": \"2026-07-01T15:00:00.000Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.seamless.ai/api/client/v2/emails")
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 \"contactId\": 12345,\n \"from\": \"rep@acme.com\",\n \"to\": \"prospect@example.com\",\n \"subject\": \"Quick question about your team\",\n \"body\": \"Hi there, I wanted to reach out...\",\n \"cc\": \"manager@example.com\",\n \"bcc\": \"archive@acme.com\",\n \"templateId\": 678,\n \"scheduleAt\": \"2026-07-01T15:00:00.000Z\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"emailId": "90001",
"contactId": "12345",
"from": "rep@acme.com",
"to": "prospect@example.com",
"cc": "manager@example.com",
"bcc": "archive@acme.com",
"subject": "Quick question about your team",
"body": "<string>",
"status": "TODO",
"scheduledAt": "2023-11-07T05:31:56Z",
"sentAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z"
}
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Body
ID of the contact this email draft is associated with.
12345
Sender email address. Must match a connected email account on the user.
"rep@acme.com"
Recipient email address.
"prospect@example.com"
Email subject line.
"Quick question about your team"
Email body content (HTML or plain text).
"Hi there, I wanted to reach out..."
CC recipient email address(es).
"manager@example.com"
BCC recipient email address(es).
"archive@acme.com"
ID of an email template to apply to the draft.
678
ISO-8601 timestamp at which to schedule the draft for sending.
"2026-07-01T15:00:00.000Z"
Was this page helpful?
curl --request POST \
--url https://api.seamless.ai/api/client/v2/emails \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"contactId": 12345,
"from": "rep@acme.com",
"to": "prospect@example.com",
"subject": "Quick question about your team",
"body": "Hi there, I wanted to reach out...",
"cc": "manager@example.com",
"bcc": "archive@acme.com",
"templateId": 678,
"scheduleAt": "2026-07-01T15:00:00.000Z"
}
'import requests
url = "https://api.seamless.ai/api/client/v2/emails"
payload = {
"contactId": 12345,
"from": "rep@acme.com",
"to": "prospect@example.com",
"subject": "Quick question about your team",
"body": "Hi there, I wanted to reach out...",
"cc": "manager@example.com",
"bcc": "archive@acme.com",
"templateId": 678,
"scheduleAt": "2026-07-01T15:00:00.000Z"
}
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({
contactId: 12345,
from: 'rep@acme.com',
to: 'prospect@example.com',
subject: 'Quick question about your team',
body: JSON.stringify('Hi there, I wanted to reach out...'),
cc: 'manager@example.com',
bcc: 'archive@acme.com',
templateId: 678,
scheduleAt: '2026-07-01T15:00:00.000Z'
})
};
fetch('https://api.seamless.ai/api/client/v2/emails', 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.seamless.ai/api/client/v2/emails",
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([
'contactId' => 12345,
'from' => 'rep@acme.com',
'to' => 'prospect@example.com',
'subject' => 'Quick question about your team',
'body' => 'Hi there, I wanted to reach out...',
'cc' => 'manager@example.com',
'bcc' => 'archive@acme.com',
'templateId' => 678,
'scheduleAt' => '2026-07-01T15:00:00.000Z'
]),
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.seamless.ai/api/client/v2/emails"
payload := strings.NewReader("{\n \"contactId\": 12345,\n \"from\": \"rep@acme.com\",\n \"to\": \"prospect@example.com\",\n \"subject\": \"Quick question about your team\",\n \"body\": \"Hi there, I wanted to reach out...\",\n \"cc\": \"manager@example.com\",\n \"bcc\": \"archive@acme.com\",\n \"templateId\": 678,\n \"scheduleAt\": \"2026-07-01T15:00:00.000Z\"\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.seamless.ai/api/client/v2/emails")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"contactId\": 12345,\n \"from\": \"rep@acme.com\",\n \"to\": \"prospect@example.com\",\n \"subject\": \"Quick question about your team\",\n \"body\": \"Hi there, I wanted to reach out...\",\n \"cc\": \"manager@example.com\",\n \"bcc\": \"archive@acme.com\",\n \"templateId\": 678,\n \"scheduleAt\": \"2026-07-01T15:00:00.000Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.seamless.ai/api/client/v2/emails")
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 \"contactId\": 12345,\n \"from\": \"rep@acme.com\",\n \"to\": \"prospect@example.com\",\n \"subject\": \"Quick question about your team\",\n \"body\": \"Hi there, I wanted to reach out...\",\n \"cc\": \"manager@example.com\",\n \"bcc\": \"archive@acme.com\",\n \"templateId\": 678,\n \"scheduleAt\": \"2026-07-01T15:00:00.000Z\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"emailId": "90001",
"contactId": "12345",
"from": "rep@acme.com",
"to": "prospect@example.com",
"cc": "manager@example.com",
"bcc": "archive@acme.com",
"subject": "Quick question about your team",
"body": "<string>",
"status": "TODO",
"scheduledAt": "2023-11-07T05:31:56Z",
"sentAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z"
}
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}