Skip to content
QPost

API Documentation

Integrate QPost directly into your applications, scripts, and workflows.

TikTok account statistics

Use GET /api/accounts/tiktok/stats with your API key or the MCP tool get_account_stats for followers, following, total likes and public-video count. Results include fetchedAt. Existing TikTok connections may need reauthorization in Accounts to grant user.info.stats. A missing grant returns 409 TIKTOK_STATS_SCOPE_REQUIRED. Individual video views still use get_post_stats with video.list.

Before publishing

Connect each selected platform in Accounts before publishing or scheduling. Missing connections return 409 PLATFORM_CONNECTION_REQUIRED, with platforms and accountsUrl, before a new post or media upload is stored. Drafts can be saved without a connection. Tokens can still expire or be revoked after this check.

TikTok’s spam_risk_too_many_posts means the account hit its API posting cap for the last 24 hours. Pause API posting and retry the failed post later. Do not create duplicates or reconnect to reset it; TikTok provides no exact reset time. You can try publishing manually in TikTok. QPost does not automatically retry failed posts. TikTok’s error reference

0 MCP Server (for AI Agents)

QPost speaks MCP so any MCP-compatible AI agent (Claude, Cursor, or your own) can list connected accounts and publish posts directly, no custom integration code required. Both options expose the same tools and wrap the same REST API documented below.

Hosted, nothing to install:

claude mcp add --transport http qpost https://qpost.dev/mcp \
  --header "x-api-key: YOUR_API_KEY"

Any client that supports Streamable HTTP can point at https://qpost.dev/mcp with an x-api-key header.

Local (stdio), if you prefer to run it yourself:

claude mcp add qpost -e QPOST_API_KEY=your_key_here -- npx -y qpost-mcp

Tools exposed: list_connected_accounts, create_post, list_posts, get_post, get_post_stats, update_post, delete_post, retry_post. Generate an API key below, then see the qpost-mcp README for other MCP clients.

n8n: install the community node n8n-nodes-qpost (Settings Community Nodes Install), add a QPost API credential with your key, and publish from any workflow, using binary data from a previous node or a media URL. Get the step-by-step guide and downloadable workflow.

1 Authentication

All API requests must be authenticated using an API Key. You can pass the key in the request headers.

Header NameValueDescription
x-api-keyYOUR_API_KEYPreferred method.
AuthorizationBearer YOUR_API_KEYAlternative standard bearer token method.

2 Create Post

POST/api/post

Request Body (FormData)

FieldTypeDescription
captionstringRequiredThe main text content of your post.
platformsJSON stringRequiredArray of target platforms. See structure below.
videoFileVideo file to upload. (Required if no images)
imagesFile[]One or more image files. (Required if no video)
titlestringOptional title (used for YouTube).
scheduledForISO DateOptional. If provided, post will be scheduled.
timezonestringTimezone for scheduling (default: "UTC").

Platforms Object Structure

The platforms field expects a JSON stringified array of objects with the following shape:

[
  {
    "platform": "YOUTUBE" | "TIKTOK" | "INSTAGRAM",
    "metadata": { ... } // Platform specific options
  }
]

Platform Metadata Details

YouTube Metadata ▼

All fields are optional.

FieldTypeDescriptionDefault
descriptionstringOverride video description-
tagsstring[] | stringArray of strings or comma-separated string-
categoryIdstringYouTube Category ID"22"
embeddablebooleanAllow video to be embedded on other sitestrue
privacyStatus"private" | "unlisted" | "public"Video privacy setting"private"
publishAtstringISO datetime for YouTube's own scheduled publishing-
selfDeclaredMadeForKidsbooleanMark video as made for kidsfalse
TikTok Metadata ▼

All fields are optional.

FieldTypeDescriptionDefault
privacyLevel"PUBLIC_TO_EVERYONE" | "MUTUAL_FOLLOW_FRIENDS" | "SELF_ONLY"Video privacy level"SELF_ONLY"
allowCommentbooleanAllow comments on the post-
allowDuetbooleanAllow other users to create duets-
allowStitchbooleanAllow other users to stitch with this video-
autoAddMusicbooleanAutomatically add background musictrue
videoCoverTimestampMsnumberTimestamp in milliseconds for video cover image1000
commercialContentEnabledbooleanMark content as promotional/commercialfalse
commercialContentSelectionsstring[] ("YOUR_BRAND" | "BRANDED_CONTENT")Disclosure label: YOUR_BRAND promotes your own business, BRANDED_CONTENT is a paid partnership (cannot be private)-
isAigcbooleanContent is AI-generated; TikTok adds its AI-generated labelfalse
Instagram Metadata ▼

All fields are optional. instagramBusinessAccountId is usually auto-detected from your linked Instagram account.

>
FieldTypeDescriptionDefault
instagramBusinessAccountIdstringInstagram Business Account IDauto-detected
mediaType"IMAGE" | "CAROUSEL" | "REELS" | "STORIES"Type of Instagram mediaauto-detected
mediaProductType"FEED" | "STORIES" | "REELS"Where the content will be posted-
disableCommentsbooleanDisable comments on the post-
locationIdstringInstagram Location ID to tag a location-
thumbOffsetnumberThumbnail offset for video posts (in milliseconds)-
userTagsobject[]Array of user tags: [{ username: string, x?: number, y?: number }]. Max 20 tags-
altTextstringCustom alt text for accessibility (max 1000 characters)-

Example Requests

curl -X POST https://qpost.dev/api/post \
  -H "x-api-key: YOUR_API_KEY" \
  -F "caption=Check out this amazing content! #video" \
  -F 'platforms=[{"platform":"YOUTUBE","metadata":{"categoryId":"22","embeddable":true,"privacyStatus":"public","selfDeclaredMadeForKids":false}},{"platform":"TIKTOK","metadata":{"allowDuet":false,"allowStitch":false,"allowComment":false,"autoAddMusic":true,"privacyLevel":"PUBLIC_TO_EVERYONE","videoCoverTimestampMs":1000,"commercialContentEnabled":false,"commercialContentSelections":[]}}]' \
  -F "video=@/path/to/video.mp4" \
  -F "title=My Awesome Video"

3 Get Posts

GET/api/post

Query Parameters

ParameterTypeDescription
statusstringFilter by status: "DRAFT", "SCHEDULED", "POSTED", "FAILED".
platformstringFilter by platform: "YOUTUBE", "TIKTOK", "INSTAGRAM".