Publish Post
Save a draft, publish, schedule, reply to a post, or create a social media thread.
Save a draft, publish, schedule, reply to a post, or create a social media thread.
/api/v1/post/publishSave a draft, publish, schedule, reply to a post, or create a thread.
{
"accountId": "<accountId>",
"text": "Your post content here",
"media": ["<mediaUrl>"],
"publishAt": "2027-01-20T12:00:00Z"
}{
"accountId": "<accountId>",
"text": "Your post content here",
"media": ["<mediaUrl>"],
"publishAt": "2027-01-20T12:00:00Z"
}| Field | Type | Required | Description |
|---|---|---|---|
accountId | string | Conditional | Connected account ID for one post. Use either accountId or posts. |
posts | object[] | Conditional | One group for 1–20 distinct accounts in one workspace. Each item requires accountId. |
text | string | Conditional | Post text content. Required if no media provided, except for drafts |
media | array | Conditional | Public URLs or media objects with URL, MIME type and optional size/duration/dimensions; conditional on post type |
draft | boolean | No | Defaults to false. Set true to save without publishing or scheduling. Omit publishAt. |
publishAt | string | null | No | ISO 8601 date for scheduling. null or omitted = publish now, unless draft: true |
timezone | string | No | Optional IANA override. Defaults to the workspace timezone. |
replyTo | string | No | External platform post ID to reply to. Supported on X and Threads; this is not a dopost post ID |
thread | object[] | No | Ordered follow-up posts. Supported on X, Threads, Mastodon, and Bluesky. See Replies and threads |
platformOptions | object | No | Platform-specific overrides. See Platform options |
At least one of text or media must be provided, except for drafts and Google Business events and offers.
Use posts instead of accountId to create a single group across several connected accounts, as in Create Post on the dashboard:
{
"text": "Shared caption",
"media": ["https://example.com/video.mp4"],
"posts": [
{ "accountId": "<instagramAccountId>", "platformOptions": { "postType": "reel" } },
{ "accountId": "<youtubeAccountId>", "platformOptions": { "title": "Video title", "videoType": "short" } }
]
}{
"text": "Shared caption",
"media": ["https://example.com/video.mp4"],
"posts": [
{ "accountId": "<instagramAccountId>", "platformOptions": { "postType": "reel" } },
{ "accountId": "<youtubeAccountId>", "platformOptions": { "title": "Video title", "videoType": "short" } }
]
}Each item inherits top-level text, media, platformOptions, replyTo and thread. A supplied item field replaces that entire default field; arrays and platformOptions objects are not merged. This allows different captions, media and platform settings for each account. Put publishAt, timezone and draft at the top level; they apply to the whole group and are rejected inside items.
Groups accept 1–20 distinct active accounts in the same authorized workspace. accountId and posts are mutually exclusive. Every target is authorized before importing files, and every target's publishing rules are checked before any post or schedule is created. A validation failure rejects the group and identifies accountId, zero-based postIndex, and the affected field, for example posts[1].thread[0].media[0].
The same media URL is imported and inspected once within the request, then shared by reference. An existing dopost file is reused. Different media URLs are prepared separately. A group creates one post per account with a shared groupId, and counts one publication per account toward monthly limits. Each social network still receives or downloads the media as required by its publishing API.
A publishing request returns 202 Accepted:
{
"success": true,
"groupId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"jobId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"status": "processing",
"posts": [
{ "accountId": "<instagramAccountId>", "postId": "<instagramPostId>", "platform": "INSTAGRAM_DIRECT", "status": "processing", "threadPosts": 1, "warnings": [] },
{ "accountId": "<youtubeAccountId>", "postId": "<youtubePostId>", "platform": "YOUTUBE", "status": "processing", "threadPosts": 1, "warnings": [] }
],
"message": "Post group accepted for publishing. Check each postId to confirm its result."
}{
"success": true,
"groupId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"jobId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"status": "processing",
"posts": [
{ "accountId": "<instagramAccountId>", "postId": "<instagramPostId>", "platform": "INSTAGRAM_DIRECT", "status": "processing", "threadPosts": 1, "warnings": [] },
{ "accountId": "<youtubeAccountId>", "postId": "<youtubePostId>", "platform": "YOUTUBE", "status": "processing", "threadPosts": 1, "warnings": [] }
],
"message": "Post group accepted for publishing. Check each postId to confirm its result."
}Use each postId with Get Post or get_post to check its result; groupId is a grouping identifier, not a post ID. Post lists and details include groupId. Publication outcomes remain independent for each social network after acceptance. Scheduled groups return scheduled. Add draft: true and omit publishAt to save a draft group (201 Created, status: "draft", no jobId), using the same draft rules below.
Deleting a member through Delete Post or delete_post uses the dashboard's existing group behavior: it deletes the whole group, and a published or processing member blocks deletion. Rescheduling by postId changes only that member's delivery time.
Use the same endpoint and posts:create permission with draft: true:
{
"accountId": "<accountId>",
"draft": true,
"text": "Work in progress"
}{
"accountId": "<accountId>",
"draft": true,
"text": "Work in progress"
}The response is 201 Created:
{
"success": true,
"postId": "cm3abc123def456",
"status": "draft",
"threadPosts": 1,
"warnings": [],
"message": "Draft saved. Open it in dopost to continue editing or publish it."
}{
"success": true,
"postId": "cm3abc123def456",
"status": "draft",
"threadPosts": 1,
"warnings": [],
"message": "Draft saved. Open it in dopost to continue editing or publish it."
}Drafts appear in the dopost dashboard and can be edited or published there. Get Post returns status: "DRAFT"; List Posts supports status=DRAFT. A draft creates no publishing schedule, delivery attempt or job, so the creation response has no jobId. It does not consume the monthly publishing allowance, matching Save Draft in the dashboard.
accountId must identify an active account in an authorized workspace. text and media can be omitted: drafts may be incomplete or exceed the destination's publishing limits. Platform publishing validation runs when publishing or scheduling, rather than blocking draft creation. Attached files are still imported and checked for upload size, format and integrity; their stored copies remain attached to the draft. Normal request types, thread structure and workspace ownership checks still apply.
draft must be a boolean. Combining draft: true with a non-null publishAt returns 400 instead of scheduling the post. With draft omitted or false, existing immediate and scheduled publishing behavior is unchanged.
External attachments are downloaded into dopost storage before accepting the post for publishing or scheduling, including thread attachments. They are stored as post-only files, outside your Media library quota. Existing ready files in the destination workspace are reused. External sources must use public HTTPS URLs and remain accessible until import completes; publishing then uses the stored copy.
The post attachment limit is 500 MB on paid plans (50 MB on Free), with smaller platform-specific limits applied when relevant. Actual file bytes, dimensions, duration and format are inspected. Files exceeding the post-attachment upload cap return 413 MEDIA_TOO_LARGE; unreadable or unsupported files return 415. Platform validation failures use the detailed response below. If an attachment cannot be imported, the request is rejected and the post is not created. For direct file uploads, request purpose: "post" from the media upload endpoint and finalize the file before using it.
Videos are decoded completely before an upload is finalized or a publication is accepted. A readable video header alone is insufficient. Incomplete, corrupt or undecodable videos return 415 MEDIA_FILE_CORRUPT with stage: "inspection" and retryable: false; export a new file before retrying. If integrity verification times out or the inspection service is unavailable, the response is 503 with MEDIA_INSPECTION_TIMEOUT or MEDIA_INSPECTION_UNAVAILABLE and retryable: true. A pending direct upload is retained so you can retry finalization.
Import failures include fileName, field, mediaIndex and stage. A thread attachment also includes threadIndex, with a field such as thread[2].media[0]; indexes start at zero and thread[2] is the third follow-up post. Stages distinguish download, storage_read, storage_write and inspection from platform validation.
| Error code | HTTP status | What to do |
|---|---|---|
MEDIA_SOURCE_DNS_ERROR | 422 or 503 | Check the domain for reasonCode: "ENOTFOUND". For temporary DNS failures (EAI_AGAIN), retry later. |
MEDIA_DOWNLOAD_TIMEOUT | 504 | Retry or use a faster source URL. |
MEDIA_SOURCE_UNAVAILABLE | 503 | The source connection failed or was interrupted. Retry or use another URL. |
MEDIA_SOURCE_TLS_ERROR | 422 | Use a source with a valid HTTPS certificate. |
MEDIA_SOURCE_HTTP_ERROR | 422 or 503 | Check upstreamStatus. For inaccessible or expired URLs, correct the source. For temporary source failures, retry later. |
MEDIA_STORAGE_UNAVAILABLE | 503 | Dopost storage could not be read or written. Retry later. |
retryable describes whether retrying the same request can help. If the cause cannot be determined, it is null; the response does not guess a cause or blame the source URL. MCP preserves these fields in structuredContent and returns a readable error with isError: true.
After receiving the actual file and before accepting a post for publishing or scheduling, the API runs the same validation rules used by the Dopost composer. Reused Media files are inspected from storage too. Client-supplied technical metadata does not override the inspected dimensions, precise duration, FPS, codecs or audio sample rate.
A blocked post returns 422 POST_VALIDATION_FAILED (413 for size violations), with a readable error, stage: "validation", retryable: false, and an issues array containing all blocking issues. Each issue includes its rule/code, field, severity and, when applicable, file name, received metadata, actual value and expected limit. Thread issues include their thread and media indexes. Non-blocking recommendations are returned in warnings; accepted responses also include warnings. Warnings do not prevent publishing or scheduling.
{
"error": "reel.mp4: Instagram Reel video width must not exceed 1920 pixels (current: 2160px).",
"errorCode": "POST_VALIDATION_FAILED",
"stage": "validation",
"platform": "INSTAGRAM_DIRECT",
"postType": "reel",
"retryable": false,
"issues": [{
"code": "HORIZONTAL_RESOLUTION",
"field": "media[0]",
"fileName": "reel.mp4",
"actual": 2160,
"expected": { "max": 1920, "unit": "px" }
}],
"warnings": []
}{
"error": "reel.mp4: Instagram Reel video width must not exceed 1920 pixels (current: 2160px).",
"errorCode": "POST_VALIDATION_FAILED",
"stage": "validation",
"platform": "INSTAGRAM_DIRECT",
"postType": "reel",
"retryable": false,
"issues": [{
"code": "HORIZONTAL_RESOLUTION",
"field": "media[0]",
"fileName": "reel.mp4",
"actual": 2160,
"expected": { "max": 1920, "unit": "px" }
}],
"warnings": []
}The same validation applies to creating and updating recurring posts. Invalid attachments prevent the series from being created or updated. If the platform rejects an accepted post later, query Get Post for its recorded error rather than repeating Create.
{
"success": true,
"jobId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"postId": "cm3abc123def456",
"status": "processing",
"threadPosts": 1,
"message": "Post accepted for publishing. Check its status using postId to confirm the result."
}{
"success": true,
"jobId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"postId": "cm3abc123def456",
"status": "processing",
"threadPosts": 1,
"message": "Post accepted for publishing. Check its status using postId to confirm the result."
}Immediate requests return status: "processing"; scheduled requests return status: "scheduled". Publication is confirmed only when the post reaches PUBLISHED. Use the postId with the Get Post endpoint to check the result.
Use replyTo to reply to an existing X or Threads post. It must contain the external ID assigned by the social platform, not the internal postId returned by dopost.
{
"accountId": "<xAccountId>",
"text": "A reply published with dopost",
"replyTo": "<externalPlatformPostId>"
}{
"accountId": "<xAccountId>",
"text": "A reply published with dopost",
"replyTo": "<externalPlatformPostId>"
}Use thread to publish an ordered reply chain on X, Threads, Mastodon, or Bluesky. text and media at the top level create the first post; every item in thread replies to the previous post.
{
"accountId": "<xAccountId>",
"text": "First post in the thread",
"thread": [
{ "text": "Second post" },
{
"text": "Third post with media",
"media": ["<mediaUrl>"]
}
]
}{
"accountId": "<xAccountId>",
"text": "First post in the thread",
"thread": [
{ "text": "Second post" },
{
"text": "Third post with media",
"media": ["<mediaUrl>"]
}
]
}thread item | Type | Required | Description |
|---|---|---|---|
text | string | Yes | Follow-up post text |
media | array | No | Up to four public media URLs for this follow-up post |
A thread can contain between 1 and 20 follow-up posts. Platform-specific content limits still apply. You can combine replyTo and thread on X or Threads to reply to an existing post and continue with a new chain.
To schedule a post for later, pass a future ISO 8601 date in the publishAt field:
{
"accountId": "<accountId>",
"text": "Scheduled post!",
"publishAt": "2027-01-20T12:00:00Z"
}{
"accountId": "<accountId>",
"text": "Scheduled post!",
"publishAt": "2027-01-20T12:00:00Z"
}The publishAt date must be in the future. Past dates will return a 400 error.
Pass an array of publicly accessible URLs:
{
"accountId": "<accountId>",
"text": "Check this out!",
"media": ["<mediaUrl>", "<mediaUrl>"]
}{
"accountId": "<accountId>",
"text": "Check this out!",
"media": ["<mediaUrl>", "<mediaUrl>"]
}File types are verified from the uploaded content; the URL extension or declared MIME type alone does not determine whether a file is valid. Supported formats depend on the target platform — use the Limits endpoint to check.
Telegram accepts up to 10 JPEG, PNG, WebP, or MP4 items per post. Text-only messages allow 4,096 characters; captions on media posts allow 1,024 characters. Photos may be up to 10 MB and MP4 videos up to 50 MB.
Instagram and LinkedIn each have two connection types (INSTAGRAM / INSTAGRAM_DIRECT, LINKEDIN / LINKEDIN_ORGANIZATION). Use the platform value from List Accounts to determine which one applies to your connected account.
Some platforms accept additional configuration via the optional platformOptions field. All properties are optional — defaults are applied when omitted.
| Option | Type | Default | Description |
|---|---|---|---|
postType | string | "feed" | "feed" | "story" | "reel". Automatically set to "carousel" when multiple media items are provided. |
shareToFeed | boolean | Provider legacy behavior when omitted | Only for postType: "reel". Send true to show the Reel in Feed and Reels, or false for Reels only. Feed videos always use true. |
An explicitly selected feed, reel, or story accepts one media item. Requests with multiple items must use carousel; dopost rejects conflicting explicit post types instead of silently publishing only the first item. Existing scheduled Reels that do not contain shareToFeed keep the previous provider behavior.
| Option | Type | Default | Description |
|---|---|---|---|
pin | boolean | false | Pin the published message, or the first message in a media album. The bot must have permission to pin messages. |
| Option | Type | Default | Description |
|---|---|---|---|
privacyLevel | string | "PUBLIC_TO_EVERYONE" | "PUBLIC_TO_EVERYONE" | "MUTUAL_FOLLOW_FRIENDS" | "FOLLOWER_OF_CREATOR" | "SELF_ONLY" |
disableDuet | boolean | false | Prevent others from creating duets |
disableStitch | boolean | false | Prevent others from stitching your video |
disableComment | boolean | false | Disable comments on the video |
discloseContent | boolean | false | Mark the post as promotional or branded content |
isYourBrand | boolean | false | When disclosing content, identify promotion of your own brand |
isBrandedContent | boolean | false | When disclosing content, identify promotion of a third-party brand |
When discloseContent is true, set at least one of isYourBrand or isBrandedContent to true. TikTok account-level privacy restrictions still apply.
| Option | Type | Default | Description |
|---|---|---|---|
videoType | string | "video" | "video" | "short" |
title | string | First 100 chars of text | Video title |
privacyStatus | string | "public" | "public" | "private" | "unlisted" |
| Option | Type | Default | Description |
|---|---|---|---|
board | string | "" | Board ID to pin to. Required for Pinterest posts. |
Use a connected Google Business location as accountId. Standard updates accept up to 1,500 characters and one image; gallery media posts contain no text.
| Option | Type | Description |
|---|---|---|
postType | string | "standard" | "event" | "offer" | "media" |
ctaType | string | "book" | "order" | "shop" | "learn_more" | "sign_up" | "call" |
ctaUrl | string | Public HTTP(S) URL. Required for every CTA except call; omit for call |
eventTitle | string | Required for events and offers |
eventStart, eventEnd | string | Required ISO dates; unzoned values use the workspace timezone |
couponCode | string | Optional offer coupon code |
redeemOnlineUrl | string | Optional public HTTP(S) offer redemption URL |
termsConditions | string | Optional offer terms |
mediaCategory | string | Gallery category; defaults to ADDITIONAL |
Offers do not accept a separate CTA. Google Business scheduling is handled by dopost and delivered when publishAt is reached.
{
"accountId": "<googleBusinessLocationAccountId>",
"text": "Join us for our weekend tasting",
"media": ["https://cdn.example.com/tasting.jpg"],
"publishAt": "2027-01-20T10:00:00",
"platformOptions": {
"postType": "event",
"eventTitle": "Weekend tasting",
"eventStart": "2027-01-23T17:00:00",
"eventEnd": "2027-01-23T20:00:00",
"ctaType": "book",
"ctaUrl": "https://example.com/book"
}
}{
"accountId": "<googleBusinessLocationAccountId>",
"text": "Join us for our weekend tasting",
"media": ["https://cdn.example.com/tasting.jpg"],
"publishAt": "2027-01-20T10:00:00",
"platformOptions": {
"postType": "event",
"eventTitle": "Weekend tasting",
"eventStart": "2027-01-23T17:00:00",
"eventEnd": "2027-01-23T20:00:00",
"ctaType": "book",
"ctaUrl": "https://example.com/book"
}
}Use List X Communities to discover the Communities saved for an X account, then pass the selected communityId:
| Option | Type | Default | Description |
|---|---|---|---|
communityId | string | — | Saved Community ID, numeric Community ID, or x.com Community URL |
shareWithFollowers | boolean | true | Also distribute the same Community Post to the account's followers |
{
"accountId": "<xAccountId>",
"text": "Community update",
"platformOptions": {
"communityId": "1493446837214187523",
"shareWithFollowers": false
}
}{
"accountId": "<xAccountId>",
"text": "Community update",
"platformOptions": {
"communityId": "1493446837214187523",
"shareWithFollowers": false
}
}Community Posts cannot also use replyTo. The account must be a member of the selected Community and have permission to post there.
| Status | Error | Cause |
|---|---|---|
400 | accountId is required | Missing accountId field |
400 | text or media is required | Neither text nor media provided |
400 | publishAt must be a valid future ISO date | Invalid or past date |
400 | replyTo must be a platform post ID | Empty, invalid, or oversized external post ID |
400 | thread must contain between 1 and 20 posts | Empty or oversized thread |
400 | thread is supported only for X, Threads, Mastodon, and Bluesky | Threads requested for an unsupported platform |
400 | Invalid payload | Content doesn't meet platform requirements |
401 | Invalid or missing API key | Bad or missing x-api-key header |
403 | API key does not have permission for this action | API key lacks the required scope |
404 | Account not found or inactive | Account ID doesn't exist or is disconnected |
429 | Monthly post limit reached | Your plan's monthly post quota has been exceeded. Upgrade your plan or wait for the next billing cycle |
429 | Rate limit exceeded | Too many requests. Check X-RateLimit-* response headers and retry after the indicated time |
Select a platform to see a complete publish request with platform-specific options and inline comments:
const res = await fetch("https://dopost.co/api/v1/post/publish", {
method: "POST",
headers: {
"x-api-key": "<apiKey>",
"Content-Type": "application/json",
},
body: JSON.stringify({
accountId: "<accountId>",
text: "Your caption here",
media: [
{ url: "https://example.com/image.jpg", alt: "Image description" },
],
platformOptions: {
postType: "feed", // "feed" | "story" | "reel". Multiple media → "carousel" automatically
},
}),
});const res = await fetch("https://dopost.co/api/v1/post/publish", {
method: "POST",
headers: {
"x-api-key": "<apiKey>",
"Content-Type": "application/json",
},
body: JSON.stringify({
accountId: "<accountId>",
text: "Your caption here",
media: [
{ url: "https://example.com/image.jpg", alt: "Image description" },
],
platformOptions: {
postType: "feed", // "feed" | "story" | "reel". Multiple media → "carousel" automatically
},
}),
});Unzoned dates and times (2027-01-20T10:00:00) use the workspace IANA timezone automatically. Dates with Z or an explicit offset retain their instant; dopost converts and stores UTC. Nonexistent local times during a daylight-saving transition are rejected. Include an explicit offset to distinguish repeated local times.
Publish and reschedule requests accept an optional IANA timezone override, such as Europe/Madrid. For recurring posts, timezone selects the series and initial-date timezone and defaults to the workspace timezone. Updating a series retains its existing timezone. recurrence.endDate is the series' final calendar date.
event and offer require eventTitle, eventStart, and eventEnd; summary and image are optional. End must follow start; an event may have started before publication. standard requires text or one image. Standard/event/offer accept one JPG/PNG image; this integration does not support Local Post video.
media publishes one JPG/PNG or MP4 to the gallery, with no text or CTA. PROFILE and COVER require photos; deprecated LOGO aliases PROFILE. Cover descriptions are omitted. An accepted PROFILE photo updates the connected account's dopost avatar.
The API validates again after resolving actual Media metadata. Known errors return 400 with issues; external URLs without metadata remain subject to Google's processing checks. 202 means accepted by dopost. Poll the post for its result and providerStatus: a resource accepted by Google can remain PROCESSING and not yet be publicly visible.
See the Google Business guide and limits.