Create an email draft conversation
curl --request POST \
--url https://your-instance.example.com/api/email/messages/draft \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"accountId": "665f1a0c0e0a4b001a2c9f50",
"to": "jamie.lee@example.com",
"subject": "Quick follow-up"
}
'import requests
url = "https://your-instance.example.com/api/email/messages/draft"
payload = {
"accountId": "665f1a0c0e0a4b001a2c9f50",
"to": "jamie.lee@example.com",
"subject": "Quick follow-up"
}
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({
accountId: '665f1a0c0e0a4b001a2c9f50',
to: 'jamie.lee@example.com',
subject: 'Quick follow-up'
})
};
fetch('https://your-instance.example.com/api/email/messages/draft', 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://your-instance.example.com/api/email/messages/draft",
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([
'accountId' => '665f1a0c0e0a4b001a2c9f50',
'to' => 'jamie.lee@example.com',
'subject' => 'Quick follow-up'
]),
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://your-instance.example.com/api/email/messages/draft"
payload := strings.NewReader("{\n \"accountId\": \"665f1a0c0e0a4b001a2c9f50\",\n \"to\": \"jamie.lee@example.com\",\n \"subject\": \"Quick follow-up\"\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://your-instance.example.com/api/email/messages/draft")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"accountId\": \"665f1a0c0e0a4b001a2c9f50\",\n \"to\": \"jamie.lee@example.com\",\n \"subject\": \"Quick follow-up\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://your-instance.example.com/api/email/messages/draft")
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 \"accountId\": \"665f1a0c0e0a4b001a2c9f50\",\n \"to\": \"jamie.lee@example.com\",\n \"subject\": \"Quick follow-up\"\n}"
response = http.request(request)
puts response.read_body{
"conversationId": "665f1a0c0e0a4b001a2c9f70",
"conversation": {
"_id": "665f1a0c0e0a4b001a2c9f70",
"channelType": "email",
"isDraft": true,
"subject": "Follow-up: Maple Court",
"participants": {
"from": "leasing@acme.example",
"to": [
"alex.morgan@example.com"
]
}
}
}{
"error": "Email account not found"
}{
"error": "Email account not found"
}{
"error": "Email account not found"
}Email
Create an email draft conversation
Creates a draft email conversation bound to the supplied recipient(s) and account. The resulting conversation/message can be edited and sent through the standard send flow.
POST
/
api
/
email
/
messages
/
draft
Create an email draft conversation
curl --request POST \
--url https://your-instance.example.com/api/email/messages/draft \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"accountId": "665f1a0c0e0a4b001a2c9f50",
"to": "jamie.lee@example.com",
"subject": "Quick follow-up"
}
'import requests
url = "https://your-instance.example.com/api/email/messages/draft"
payload = {
"accountId": "665f1a0c0e0a4b001a2c9f50",
"to": "jamie.lee@example.com",
"subject": "Quick follow-up"
}
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({
accountId: '665f1a0c0e0a4b001a2c9f50',
to: 'jamie.lee@example.com',
subject: 'Quick follow-up'
})
};
fetch('https://your-instance.example.com/api/email/messages/draft', 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://your-instance.example.com/api/email/messages/draft",
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([
'accountId' => '665f1a0c0e0a4b001a2c9f50',
'to' => 'jamie.lee@example.com',
'subject' => 'Quick follow-up'
]),
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://your-instance.example.com/api/email/messages/draft"
payload := strings.NewReader("{\n \"accountId\": \"665f1a0c0e0a4b001a2c9f50\",\n \"to\": \"jamie.lee@example.com\",\n \"subject\": \"Quick follow-up\"\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://your-instance.example.com/api/email/messages/draft")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"accountId\": \"665f1a0c0e0a4b001a2c9f50\",\n \"to\": \"jamie.lee@example.com\",\n \"subject\": \"Quick follow-up\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://your-instance.example.com/api/email/messages/draft")
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 \"accountId\": \"665f1a0c0e0a4b001a2c9f50\",\n \"to\": \"jamie.lee@example.com\",\n \"subject\": \"Quick follow-up\"\n}"
response = http.request(request)
puts response.read_body{
"conversationId": "665f1a0c0e0a4b001a2c9f70",
"conversation": {
"_id": "665f1a0c0e0a4b001a2c9f70",
"channelType": "email",
"isDraft": true,
"subject": "Follow-up: Maple Court",
"participants": {
"from": "leasing@acme.example",
"to": [
"alex.morgan@example.com"
]
}
}
}{
"error": "Email account not found"
}{
"error": "Email account not found"
}{
"error": "Email account not found"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Response
Draft created
Returned after POST /api/email/messages/draft creates a draft conversation.
Draft conversation document returned after creating an email draft. Marked with isDraft:true until the user sends.
Show child attributes
Show child attributes
Example:
{
"_id": "665f1a0c0e0a4b001a2c9f70",
"organizationId": "64a1b2c3d4e5f60012345678",
"contactId": "64b2c3d4e5f60012345678aa",
"userId": "64a1b2c3d4e5f60012345679",
"channelType": "email",
"emailAccountId": "64d2f9c5e8a1d4e001a0b1c2",
"isDraft": true,
"subject": "Follow-up: Maple Court",
"provider": "gmail",
"participants": {
"from": "leasing@acme.example",
"to": ["alex.morgan@example.com"]
},
"source": "New Email",
"createdAt": "2026-05-20T15:04:01.135Z",
"updatedAt": "2026-05-20T15:04:01.135Z"
}
⌘I