Create a post
const url = 'https://api.loomta.com/public/v1/posts';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"platformIds":["8b2c1f4a-77d0-4e2c-9a1e-5c3b2a1d0e4f"],"content":"We just shipped 🚀 #buildinpublic","mode":"now","mediaIds":["a1d4e9b2-3c5f-4a8d-b0e1-2f6c7a9d8b3e"],"settings":{"privacy_level":"PUBLIC_TO_EVERYONE"}}'};
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 \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "platformIds": [ "8b2c1f4a-77d0-4e2c-9a1e-5c3b2a1d0e4f" ], "content": "We just shipped 🚀 #buildinpublic", "mode": "now", "mediaIds": [ "a1d4e9b2-3c5f-4a8d-b0e1-2f6c7a9d8b3e" ], "settings": { "privacy_level": "PUBLIC_TO_EVERYONE" } }'Creates a post on one or more platforms. Each platform is processed independently, so a partial failure does not block the others.
mode decides when the post is sent and the resulting post state:
mode | Result |
|---|---|
now / schedule | QUEUE → PUBLISHED |
draft | DRAFT (saved in Loomta, nothing sent) |
mode= when it goes out.scheduleneedsscheduledFor.draftsends nothing — promote it later withPOST /posts/{id}/publish. TikTok uses Direct Post only. Select a currentprivacy_levelreturned byGET /platforms/{id}/schema; Loomta does not choose one by default.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
Required. One or more platform IDs from GET /platforms.
Required. The post caption / body.
Required (no default). now publishes immediately; schedule requires scheduledFor; draft saves in Loomta without sending.
ISO 8601. Required when mode is schedule; ignored otherwise.
Required. READY media object IDs from POST /media, in order. TikTok needs either exactly one video, or 1–35 images for a photo carousel (you cannot mix images and videos).
Provider-specific settings — see GET /platforms/{id}/schema. TikTok uses content_posting_method: DIRECT_POST; privacy_level is required and has no default. Interaction settings default off.
object
Optional. Replies posted after the root post (thread).
object
Required. The comment’s text.
Optional (default null). Minutes to wait after the root post before sending this comment; null/omitted posts it immediately after.
Optional (default {}). Provider-specific settings for this comment.
object
Optional (default none). Media object IDs attached to this comment, if the platform supports it (see GET /platforms/{id}/schema).
Examples
Publish a video immediately
{ "platformIds": [ "8b2c1f4a-77d0-4e2c-9a1e-5c3b2a1d0e4f" ], "content": "We just shipped 🚀 #buildinpublic", "mode": "now", "mediaIds": [ "a1d4e9b2-3c5f-4a8d-b0e1-2f6c7a9d8b3e" ], "settings": { "privacy_level": "PUBLIC_TO_EVERYONE" }}Schedule a photo carousel
{ "platformIds": [ "8b2c1f4a-77d0-4e2c-9a1e-5c3b2a1d0e4f" ], "content": "3 reasons to try us", "mode": "schedule", "scheduledFor": "2026-07-01T15:00:00Z", "mediaIds": [ "a1d4e9b2-3c5f-4a8d-b0e1-2f6c7a9d8b3e", "b2e5f0c3-4d6a-4b9e-c1f2-3a7d8b0e9c4f", "c3f6a1d4-5e7b-4c0f-d2a3-4b8e9c1f0d5a" ]}Save as an in-app draft (nothing sent)
{ "platformIds": [ "8b2c1f4a-77d0-4e2c-9a1e-5c3b2a1d0e4f" ], "content": "Work in progress", "mode": "draft", "mediaIds": [ "a1d4e9b2-3c5f-4a8d-b0e1-2f6c7a9d8b3e" ]}Responses
Section titled “Responses”Per-platform results.
object
object
object
object
object
object
object
object
Example
{ "results": [ { "status": "created", "post": { "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."}A plan limit was reached (for example the monthly post cap).
object
A stable, machine-readable error code to branch on.
A human-readable description.
Optional structured detail (for example Zod validation issues).
Example
{ "code": "post_limit_reached", "message": "The monthly post limit for this plan has been reached."}