Publish or schedule a draft
const url = 'https://api.loomta.com/public/v1/posts/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/publish';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"mode":"now"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.loomta.com/public/v1/posts/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/publish \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "mode": "now" }'Promote a DRAFT post into the direct-publish queue — publish it now or schedule it. TikTok drafts may supply reviewed content and current Direct Post settings in this request. Only works on posts in the DRAFT state.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The post UUID.
Request Bodyrequired
Section titled “Request Bodyrequired”object
Optional (default now). now publishes immediately; schedule requires scheduledFor.
ISO 8601. Required when mode is schedule; ignored otherwise.
Optional reviewed content to store before publishing.
Optional reviewed provider settings to store before publishing.
object
Examples
Publish the draft now
{ "mode": "now"}Schedule the draft
{ "mode": "schedule", "scheduledFor": "2026-07-01T15:00:00Z"}Responses
Section titled “Responses”The updated post group (now QUEUE).
object
object
object
object
object
Example
{ "root": { "state": "DRAFT" }, "children": [ { "state": "DRAFT" } ]}The request body failed validation.
object
A stable, machine-readable error code to branch on.
A human-readable description.
Optional structured detail (for example Zod validation issues).
Example
{ "code": "invalid_request", "message": "The request payload is invalid.", "details": [ { "path": [ "slideCount" ], "message": "Number must be greater than or equal to 3" } ]}The API key is missing or invalid.
object
A stable, machine-readable error code to branch on.
A human-readable description.
Optional structured detail (for example Zod validation issues).
Examples
{ "code": "missing_api_key", "message": "A Bearer API key is required."}{ "code": "invalid_api_key", "message": "The API key is invalid."}The resource was not found in this workspace.
object
A stable, machine-readable error code to branch on.
A human-readable description.
Optional structured detail (for example Zod validation issues).
Example
{ "code": "invalid_api_key", "message": "The API key is invalid."}The post is not a draft.
object
A stable, machine-readable error code to branch on.
A human-readable description.
Optional structured detail (for example Zod validation issues).
Example
{ "code": "not_a_draft", "message": "Only draft posts can be published this way."}