curl -X POST "https://api.submagic.co/v1/projects/550e8400-e29b-41d4-a716-446655440000/publish" \
-H "x-api-key: sk-your-api-key-here" \
-H "Content-Type: application/json" \
-d '{
"platforms": {
"youtube": {
"title": "How I Doubled My Revenue in 30 Days",
"description": "In this video I break down the exact playbook I used.",
"tags": ["business", "marketing", "growth"],
"firstComment": "Drop a comment if this was helpful!"
},
"tiktok": {
"content": "The exact playbook I used to double my revenue ๐ #business #marketing",
"privacyLevel": "public"
},
"twitter": {
"content": "I doubled my revenue in 30 days. Here is the exact playbook ๐งต"
},
"facebook": {
"content": "I doubled my revenue in 30 days. Full breakdown of the playbook inside."
},
"linkedin": {
"content": "How I doubled my revenue in 30 days โ the exact playbook, broken down step by step."
}
}
}'
curl -X POST "https://api.submagic.co/v1/projects/550e8400-e29b-41d4-a716-446655440000/publish" \
-H "x-api-key: sk-your-api-key-here" \
-H "Content-Type: application/json" \
-d '{
"scheduledFor": "2026-05-01T15:00:00Z",
"platforms": {
"instagram": {
"format": "reel",
"content": "New video out now โจ",
"firstComment": "Tap the link in bio for the full episode!"
}
}
}'
const publishProject = async (projectId, payload) => {
const response = await fetch(
`https://api.submagic.co/v1/projects/${projectId}/publish`,
{
method: "POST",
headers: {
"x-api-key": "sk-your-api-key-here",
"Content-Type": "application/json",
},
body: JSON.stringify(payload),
}
);
const result = await response.json();
console.log("Publication:", result.id, result.status);
return result;
};
// Publish to multiple platforms now
const result = await publishProject("550e8400-e29b-41d4-a716-446655440000", {
platforms: {
youtube: {
title: "How I Doubled My Revenue in 30 Days",
description: "In this video I break down the exact playbook I used.",
tags: ["business", "marketing", "growth"],
},
tiktok: {
content: "The exact playbook I used to double my revenue ๐",
privacyLevel: "public",
},
twitter: {
content: "I doubled my revenue in 30 days. Here is the exact playbook ๐งต",
},
linkedin: {
content:
"How I doubled my revenue in 30 days โ the exact playbook, broken down step by step.",
},
},
});
import requests
def publish_project(project_id, payload):
url = f'https://api.submagic.co/v1/projects/{project_id}/publish'
headers = {
'x-api-key': 'sk-your-api-key-here',
'Content-Type': 'application/json'
}
response = requests.post(url, headers=headers, json=payload)
result = response.json()
print(f"Publication: {result.get('id')} - {result.get('status')}")
return result
# Schedule a reel on Instagram
payload = {
'scheduledFor': '2026-05-01T15:00:00Z',
'platforms': {
'instagram': {
'format': 'reel',
'content': 'New video out now โจ',
'firstComment': 'Tap the link in bio for the full episode!'
}
}
}
result = publish_project(
'550e8400-e29b-41d4-a716-446655440000',
payload
)
{
"id": "pub_8f3b4c2e-1a9d-4e5f-9b7c-2a4d6e8f1c3b",
"projectId": "550e8400-e29b-41d4-a716-446655440000",
"scheduled": false,
"publishedAt": "2026-04-28T12:34:56.000Z",
"status": "published",
"platforms": ["youtube", "tiktok", "twitter", "facebook", "linkedin"]
}
{
"id": "pub_8f3b4c2e-1a9d-4e5f-9b7c-2a4d6e8f1c3b",
"projectId": "550e8400-e29b-41d4-a716-446655440000",
"scheduled": true,
"publishedAt": "2026-05-01T15:00:00.000Z",
"status": "scheduled",
"platforms": ["instagram"]
}
{
"error": "BAD_REQUEST",
"message": "Project must be exported before it can be published"
}
{
"error": "PAYMENT_REQUIRED",
"message": "Insufficient API credits to publish"
}
{
"error": "FORBIDDEN",
"message": "Your plan does not allow publishing via the API"
}
{
"error": "NOT_FOUND",
"message": "Project doesn't exist or doesn't belong to user"
}
{
"error": "PRECONDITION_FAILED",
"message": "Some platform accounts are not connected"
}
API Reference
Publish Project
Publish or schedule an exported project to one or more social platforms (YouTube, TikTok, Instagram, X/Twitter, Facebook, LinkedIn) in a single call
POST
/
v1
/
projects
/
{id}
/
publish
curl -X POST "https://api.submagic.co/v1/projects/550e8400-e29b-41d4-a716-446655440000/publish" \
-H "x-api-key: sk-your-api-key-here" \
-H "Content-Type: application/json" \
-d '{
"platforms": {
"youtube": {
"title": "How I Doubled My Revenue in 30 Days",
"description": "In this video I break down the exact playbook I used.",
"tags": ["business", "marketing", "growth"],
"firstComment": "Drop a comment if this was helpful!"
},
"tiktok": {
"content": "The exact playbook I used to double my revenue ๐ #business #marketing",
"privacyLevel": "public"
},
"twitter": {
"content": "I doubled my revenue in 30 days. Here is the exact playbook ๐งต"
},
"facebook": {
"content": "I doubled my revenue in 30 days. Full breakdown of the playbook inside."
},
"linkedin": {
"content": "How I doubled my revenue in 30 days โ the exact playbook, broken down step by step."
}
}
}'
curl -X POST "https://api.submagic.co/v1/projects/550e8400-e29b-41d4-a716-446655440000/publish" \
-H "x-api-key: sk-your-api-key-here" \
-H "Content-Type: application/json" \
-d '{
"scheduledFor": "2026-05-01T15:00:00Z",
"platforms": {
"instagram": {
"format": "reel",
"content": "New video out now โจ",
"firstComment": "Tap the link in bio for the full episode!"
}
}
}'
const publishProject = async (projectId, payload) => {
const response = await fetch(
`https://api.submagic.co/v1/projects/${projectId}/publish`,
{
method: "POST",
headers: {
"x-api-key": "sk-your-api-key-here",
"Content-Type": "application/json",
},
body: JSON.stringify(payload),
}
);
const result = await response.json();
console.log("Publication:", result.id, result.status);
return result;
};
// Publish to multiple platforms now
const result = await publishProject("550e8400-e29b-41d4-a716-446655440000", {
platforms: {
youtube: {
title: "How I Doubled My Revenue in 30 Days",
description: "In this video I break down the exact playbook I used.",
tags: ["business", "marketing", "growth"],
},
tiktok: {
content: "The exact playbook I used to double my revenue ๐",
privacyLevel: "public",
},
twitter: {
content: "I doubled my revenue in 30 days. Here is the exact playbook ๐งต",
},
linkedin: {
content:
"How I doubled my revenue in 30 days โ the exact playbook, broken down step by step.",
},
},
});
import requests
def publish_project(project_id, payload):
url = f'https://api.submagic.co/v1/projects/{project_id}/publish'
headers = {
'x-api-key': 'sk-your-api-key-here',
'Content-Type': 'application/json'
}
response = requests.post(url, headers=headers, json=payload)
result = response.json()
print(f"Publication: {result.get('id')} - {result.get('status')}")
return result
# Schedule a reel on Instagram
payload = {
'scheduledFor': '2026-05-01T15:00:00Z',
'platforms': {
'instagram': {
'format': 'reel',
'content': 'New video out now โจ',
'firstComment': 'Tap the link in bio for the full episode!'
}
}
}
result = publish_project(
'550e8400-e29b-41d4-a716-446655440000',
payload
)
{
"id": "pub_8f3b4c2e-1a9d-4e5f-9b7c-2a4d6e8f1c3b",
"projectId": "550e8400-e29b-41d4-a716-446655440000",
"scheduled": false,
"publishedAt": "2026-04-28T12:34:56.000Z",
"status": "published",
"platforms": ["youtube", "tiktok", "twitter", "facebook", "linkedin"]
}
{
"id": "pub_8f3b4c2e-1a9d-4e5f-9b7c-2a4d6e8f1c3b",
"projectId": "550e8400-e29b-41d4-a716-446655440000",
"scheduled": true,
"publishedAt": "2026-05-01T15:00:00.000Z",
"status": "scheduled",
"platforms": ["instagram"]
}
{
"error": "BAD_REQUEST",
"message": "Project must be exported before it can be published"
}
{
"error": "PAYMENT_REQUIRED",
"message": "Insufficient API credits to publish"
}
{
"error": "FORBIDDEN",
"message": "Your plan does not allow publishing via the API"
}
{
"error": "NOT_FOUND",
"message": "Project doesn't exist or doesn't belong to user"
}
{
"error": "PRECONDITION_FAILED",
"message": "Some platform accounts are not connected"
}
Publish Project
Publish or schedule an exported project to one or more connected social platforms (YouTube, TikTok, Instagram, X/Twitter, Facebook, LinkedIn).This endpoint requires authentication. The project must already be exported
(have a
downloadUrl), and the social accounts you want to publish to must be
connected from the Publishing page in
the dashboard.Authentication
string
required
Your Submagic API key starting with
sk-Path Parameters
string
required
The unique identifier (UUID) of the exported project to publish
Request Body
string
ISO 8601 timestamp to schedule the publication for a future time. Must be in
the future. Omit to publish immediately. Scheduled publications return a
202 Accepted response; immediate publications return 200 OK.object
required
Per-platform publishing options. At least one platform must be provided.
Unknown keys are rejected.
Hide Platforms
Hide Platforms
object
object
TikTok publishing options
Show TikTok
Show TikTok
string
required
Caption / post content (max 2200 characters)
string
Who can see the post:
public (everyone), friends (mutual follows),
followers, or private (only the creator). Defaults to public.
Note that a private TikTok account cannot post public.boolean
Allow comments on the post. Defaults to
true.boolean
Allow Duets. Defaults to
true.boolean
Allow Stitches. Defaults to
true.string
Commercial-content disclosure:
brand_organic (promoting your own
brand) or brand_content (paid partnership). Omit when the post is not
commercial. brand_content cannot be combined with a private
privacyLevel โ TikTok forbids private branded content.boolean
Flags the video as AI-generated content.
object
object
X (Twitter) publishing options
Show X (Twitter)
Show X (Twitter)
string
required
Post content (max 280 characters)
object
Facebook publishing options
Show Facebook
Show Facebook
string
required
Post content (max 5000 characters)
Prerequisites
Before publishing a project, ensure:- Project is exported: The project must have a
downloadUrl(statuscompleted) - Project ownership: The project must belong to the authenticated user
- Accounts connected: Each requested platform must be connected from the Publishing page in the dashboard
- Sufficient credits: Your account must have enough API credits
Response
string
Unique identifier of the publication
string
The unique identifier of the project being published
boolean
true if the publication was scheduled for a future time, false if
published immediatelystring
ISO 8601 timestamp of when the publication was published or is scheduled to
publish
string
Current status of the publication:
published, scheduled, processing, or
failedarray
Array of platforms the project is being published to
curl -X POST "https://api.submagic.co/v1/projects/550e8400-e29b-41d4-a716-446655440000/publish" \
-H "x-api-key: sk-your-api-key-here" \
-H "Content-Type: application/json" \
-d '{
"platforms": {
"youtube": {
"title": "How I Doubled My Revenue in 30 Days",
"description": "In this video I break down the exact playbook I used.",
"tags": ["business", "marketing", "growth"],
"firstComment": "Drop a comment if this was helpful!"
},
"tiktok": {
"content": "The exact playbook I used to double my revenue ๐ #business #marketing",
"privacyLevel": "public"
},
"twitter": {
"content": "I doubled my revenue in 30 days. Here is the exact playbook ๐งต"
},
"facebook": {
"content": "I doubled my revenue in 30 days. Full breakdown of the playbook inside."
},
"linkedin": {
"content": "How I doubled my revenue in 30 days โ the exact playbook, broken down step by step."
}
}
}'
curl -X POST "https://api.submagic.co/v1/projects/550e8400-e29b-41d4-a716-446655440000/publish" \
-H "x-api-key: sk-your-api-key-here" \
-H "Content-Type: application/json" \
-d '{
"scheduledFor": "2026-05-01T15:00:00Z",
"platforms": {
"instagram": {
"format": "reel",
"content": "New video out now โจ",
"firstComment": "Tap the link in bio for the full episode!"
}
}
}'
const publishProject = async (projectId, payload) => {
const response = await fetch(
`https://api.submagic.co/v1/projects/${projectId}/publish`,
{
method: "POST",
headers: {
"x-api-key": "sk-your-api-key-here",
"Content-Type": "application/json",
},
body: JSON.stringify(payload),
}
);
const result = await response.json();
console.log("Publication:", result.id, result.status);
return result;
};
// Publish to multiple platforms now
const result = await publishProject("550e8400-e29b-41d4-a716-446655440000", {
platforms: {
youtube: {
title: "How I Doubled My Revenue in 30 Days",
description: "In this video I break down the exact playbook I used.",
tags: ["business", "marketing", "growth"],
},
tiktok: {
content: "The exact playbook I used to double my revenue ๐",
privacyLevel: "public",
},
twitter: {
content: "I doubled my revenue in 30 days. Here is the exact playbook ๐งต",
},
linkedin: {
content:
"How I doubled my revenue in 30 days โ the exact playbook, broken down step by step.",
},
},
});
import requests
def publish_project(project_id, payload):
url = f'https://api.submagic.co/v1/projects/{project_id}/publish'
headers = {
'x-api-key': 'sk-your-api-key-here',
'Content-Type': 'application/json'
}
response = requests.post(url, headers=headers, json=payload)
result = response.json()
print(f"Publication: {result.get('id')} - {result.get('status')}")
return result
# Schedule a reel on Instagram
payload = {
'scheduledFor': '2026-05-01T15:00:00Z',
'platforms': {
'instagram': {
'format': 'reel',
'content': 'New video out now โจ',
'firstComment': 'Tap the link in bio for the full episode!'
}
}
}
result = publish_project(
'550e8400-e29b-41d4-a716-446655440000',
payload
)
{
"id": "pub_8f3b4c2e-1a9d-4e5f-9b7c-2a4d6e8f1c3b",
"projectId": "550e8400-e29b-41d4-a716-446655440000",
"scheduled": false,
"publishedAt": "2026-04-28T12:34:56.000Z",
"status": "published",
"platforms": ["youtube", "tiktok", "twitter", "facebook", "linkedin"]
}
{
"id": "pub_8f3b4c2e-1a9d-4e5f-9b7c-2a4d6e8f1c3b",
"projectId": "550e8400-e29b-41d4-a716-446655440000",
"scheduled": true,
"publishedAt": "2026-05-01T15:00:00.000Z",
"status": "scheduled",
"platforms": ["instagram"]
}
{
"error": "BAD_REQUEST",
"message": "Project must be exported before it can be published"
}
{
"error": "PAYMENT_REQUIRED",
"message": "Insufficient API credits to publish"
}
{
"error": "FORBIDDEN",
"message": "Your plan does not allow publishing via the API"
}
{
"error": "NOT_FOUND",
"message": "Project doesn't exist or doesn't belong to user"
}
{
"error": "PRECONDITION_FAILED",
"message": "Some platform accounts are not connected"
}
Tracking Published Posts
After publishing, use the List Published Projects endpoint to retrieve the status, platform URLs, and analytics of your posts.Tip: To connect a YouTube, TikTok, Instagram, X (Twitter), Facebook, or
LinkedIn account, visit the Publishing
page in the dashboard. Once connected, the account is available to all
publish requests for that user.
Important: Publication to upstream platforms is asynchronous. A
200
response means the request was accepted and posts have been dispatched, but
individual platform delivery (especially for scheduled posts) is finalized in
the background. Poll the List Published Projects
endpoint to track per-platform publishStatus.โI

