List unsent drafts on an inbox
curl --request GET \
--url https://core-api.getaptly.com/api/inboxes/{channelId}/drafts \
--header 'x-token: <api-key>'import requests
url = "https://core-api.getaptly.com/api/inboxes/{channelId}/drafts"
headers = {"x-token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-token': '<api-key>'}};
fetch('https://core-api.getaptly.com/api/inboxes/{channelId}/drafts', 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://core-api.getaptly.com/api/inboxes/{channelId}/drafts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://core-api.getaptly.com/api/inboxes/{channelId}/drafts"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-token", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://core-api.getaptly.com/api/inboxes/{channelId}/drafts")
.header("x-token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://core-api.getaptly.com/api/inboxes/{channelId}/drafts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"streamId": "stm_abc",
"uuid": "drf_123",
"channelId": "acc-1",
"subject": "Welcome",
"content": "<p>Hi there</p>",
"to": [
{
"value": "[email protected]"
}
],
"cc": [],
"bcc": [],
"attachments": [],
"ownerId": "u_42",
"sentBy": "u_42",
"addedToOutboxAt": "2026-05-25T18:14:00.000Z"
}
]
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Inboxes
List unsent drafts on an inbox
Returns the unsent drafts on the given email inbox. The inbox is identified
by its channelId — the same value returned as channelId from
GET /api/users/{userId}/inboxes.
Each item in the response is a draft entry with the parent discussion’s
streamId attached. Drafts currently in the process of sending (after
POST /api/email/send was called and before the upstream provider accepts
the message) are excluded.
With API-key auth the only scope check is that the inbox belongs to your
company. With delegate-token auth (inboxes:* scope) the inbox must also be
one the authenticated user can reach personally or via a team membership.
GET
/
api
/
inboxes
/
{channelId}
/
drafts
List unsent drafts on an inbox
curl --request GET \
--url https://core-api.getaptly.com/api/inboxes/{channelId}/drafts \
--header 'x-token: <api-key>'import requests
url = "https://core-api.getaptly.com/api/inboxes/{channelId}/drafts"
headers = {"x-token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-token': '<api-key>'}};
fetch('https://core-api.getaptly.com/api/inboxes/{channelId}/drafts', 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://core-api.getaptly.com/api/inboxes/{channelId}/drafts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://core-api.getaptly.com/api/inboxes/{channelId}/drafts"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-token", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://core-api.getaptly.com/api/inboxes/{channelId}/drafts")
.header("x-token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://core-api.getaptly.com/api/inboxes/{channelId}/drafts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"streamId": "stm_abc",
"uuid": "drf_123",
"channelId": "acc-1",
"subject": "Welcome",
"content": "<p>Hi there</p>",
"to": [
{
"value": "[email protected]"
}
],
"cc": [],
"bcc": [],
"attachments": [],
"ownerId": "u_42",
"sentBy": "u_42",
"addedToOutboxAt": "2026-05-25T18:14:00.000Z"
}
]
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}