Endpoints
List Drafts
Manage saved unpublished posts without choosing a publish date.
GET
/
api
/
v1
/
drafts
List unpublished drafts
curl --request GET \
--url https://mallary.ai/api/v1/drafts \
--header 'Authorization: Bearer <token>'import requests
url = "https://mallary.ai/api/v1/drafts"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://mallary.ai/api/v1/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://mallary.ai/api/v1/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 => [
"Authorization: Bearer <token>"
],
]);
$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://mallary.ai/api/v1/drafts"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://mallary.ai/api/v1/drafts")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://mallary.ai/api/v1/drafts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"status": "ok",
"data": {
"drafts": [
{
"profile_id": "AbC123xYz90",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"revision": 2,
"status": "draft",
"message": "<string>",
"platforms": [
"facebook"
],
"media": [
{
"url": "<string>"
}
],
"comments_under_post": [
"<string>"
],
"platform_options": {},
"auto_reply_enabled": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"submission": {
"status": "queued",
"batch_id": "<string>",
"profile_id": "<string>",
"jobs": [
{
"platform": "twitter",
"jobId": "<string>",
"platform_post_id": "<string>",
"platform_post_url": "<string>"
}
],
"warnings": [
{
"platform": "twitter",
"code": "<string>",
"severity": "warning",
"message": "<string>"
}
]
}
}
],
"meta": {
"page": 123,
"per_page": 123,
"total": 123
}
}
}Saved drafts are available to all users. Normal publishing and scheduling rules apply when submitting.
Drafts stay separate from scheduled and published posts. Saving does not publish or use your posting allowance. Text, media, destinations, and platform settings can be unfinished.
Use the draft UUID from the save response. Read the draft’s current
revision before editing, deleting, or submitting, then send it as expected_revision. A 409 means the draft changed or was submitted; read it again before continuing.
Only the submit endpoint publishes or schedules. It runs the same account, plan, content, and platform checks as Create Post. If validation fails, the draft stays saved. After a successful submission, the draft read includes submission with the original jobs. Repeating the same submission revision and schedule returns those same jobs.
Use profile_id for a non-default connection profile. A draft uses one profile. Lists include only unpublished drafts in that profile.
See the draft workflow for dashboard, API, MCP, and CLI examples.Authorizations
Use Authorization: Bearer {api_key}
Query Parameters
Omit to use the default profile on lists. On reads, deletes and submissions, optionally verify the draft belongs to this profile.
Random public connection profile ID returned by GET /api/v1/profiles.
Pattern:
^[A-Za-z0-9]{6,32}$Example:
"AbC123xYz90"
Required range:
1 <= x <= 100000Required range:
1 <= x <= 100Last modified on October 9, 2026
Was this page helpful?
List unpublished drafts
curl --request GET \
--url https://mallary.ai/api/v1/drafts \
--header 'Authorization: Bearer <token>'import requests
url = "https://mallary.ai/api/v1/drafts"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://mallary.ai/api/v1/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://mallary.ai/api/v1/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 => [
"Authorization: Bearer <token>"
],
]);
$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://mallary.ai/api/v1/drafts"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://mallary.ai/api/v1/drafts")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://mallary.ai/api/v1/drafts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"status": "ok",
"data": {
"drafts": [
{
"profile_id": "AbC123xYz90",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"revision": 2,
"status": "draft",
"message": "<string>",
"platforms": [
"facebook"
],
"media": [
{
"url": "<string>"
}
],
"comments_under_post": [
"<string>"
],
"platform_options": {},
"auto_reply_enabled": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"submission": {
"status": "queued",
"batch_id": "<string>",
"profile_id": "<string>",
"jobs": [
{
"platform": "twitter",
"jobId": "<string>",
"platform_post_id": "<string>",
"platform_post_url": "<string>"
}
],
"warnings": [
{
"platform": "twitter",
"code": "<string>",
"severity": "warning",
"message": "<string>"
}
]
}
}
],
"meta": {
"page": 123,
"per_page": 123,
"total": 123
}
}
}
