# Upload-Post SDK for Node.js Official Node.js client for the [Upload-Post API](https://www.upload-post.com) - Cross-platform social media upload. Upload videos, photos, text posts, and documents to **TikTok, Instagram, YouTube, LinkedIn, Facebook, Pinterest, Threads, Reddit, Bluesky, X (Twitter), Discord, and Telegram** with a single API. ## Installation ```bash npm install upload-post ``` ## Quick Start ```javascript import { UploadPost } from 'upload-post'; const client = new UploadPost('YOUR_API_KEY'); // Upload a video to multiple platforms const response = await client.upload('./video.mp4', { title: 'Check out this awesome video! 🎬', user: 'my-profile', platforms: ['tiktok', 'instagram', 'youtube'] }); console.log(response); ``` ## Features - ✅ **Video Upload** - TikTok, Instagram, YouTube, LinkedIn, Facebook, Pinterest, Threads, Bluesky, X, Discord, Telegram - ✅ **Photo Upload** - TikTok, Instagram, LinkedIn, Facebook, Pinterest, Threads, Reddit, Bluesky, X, Discord, Telegram - ✅ **Text Posts** - X, LinkedIn, Facebook, Threads, Reddit, Bluesky, Discord, Telegram - ✅ **Document Upload** - LinkedIn (PDF, PPT, PPTX, DOC, DOCX) - ✅ **Scheduling** - Schedule posts for later - ✅ **Posting Queue** - Add posts to your configured queue - ✅ **First Comments** - Auto-post first comment after publishing - ✅ **Analytics** - Get engagement metrics - ✅ **Audience** - Who follows a profile, per platform - ✅ **Comments** - Read, reply, moderate; replies under a comment on TikTok, Threads, YouTube, Instagram, Facebook and LinkedIn - ✅ **Direct messages** - Instagram, Messenger, WhatsApp and Bluesky inboxes - ✅ **AutoDM** - Per-post monitors and account-wide Instagram rules (every post, story replies, story mentions, keyword DMs) - ✅ **Webhooks** - Delivery log, retries and redelivery - ✅ **Teams** - Act on the account you were invited to (`actAsUser`) - ✅ **Suggestions** - Hashtags and searches to post about, per platform - ✅ **Full TypeScript Support** ## Using this from an AI agent? Use the MCP server instead If you are wiring Upload-Post into ChatGPT, Claude, Cursor, Claude Code or any other MCP-compatible agent, you do not need to write a client on top of this SDK. The official **[Model Context Protocol server](https://github.com/Upload-Post/upload-post-mcp)** already wraps the whole API as 50 tools the agent can call directly. ```jsonc // Hosted (OAuth or API key) — nothing to install { "mcpServers": { "upload-post": { "url": "https://mcp.upload-post.com/mcp" } } } ``` ```jsonc // Local stdio, built on this SDK { "mcpServers": { "upload-post": { "command": "npx", "args": ["-y", "@upload-post/mcp"], "env": { "UPLOAD_POST_API_KEY": "YOUR_API_KEY" } } } } ``` See the [MCP integration guide](https://docs.upload-post.com/guides/mcp-server-integration). Keep using this SDK when you are writing your own application code. ## API Reference ### Upload Video ```javascript const response = await client.upload('./video.mp4', { title: 'My awesome video', user: 'my-profile', platforms: ['tiktok', 'instagram', 'youtube'], // Optional: Schedule for later scheduledDate: '2024-12-25T10:00:00Z', timezone: 'Europe/Madrid', // Optional: Add first comment firstComment: 'Thanks for watching! 🙏', // Optional: Platform-specific settings tiktokPrivacyLevel: 'PUBLIC_TO_EVERYONE', instagramMediaType: 'REELS', youtubePrivacyStatus: 'public', youtubeTags: ['tutorial', 'coding'], }); ``` ### Upload Photos ```javascript // Upload single or multiple photos const response = await client.uploadPhotos( ['./photo1.jpg', './photo2.jpg', 'https://example.com/photo3.jpg'], { title: 'Check out these photos! 📸', user: 'my-profile', platforms: ['instagram', 'facebook', 'x'], // Optional: Add to queue instead of posting immediately addToQueue: true, // Platform-specific instagramMediaType: 'IMAGE', // or 'STORIES' facebookPageId: 'your-page-id', } ); ``` ### Upload Text Posts ```javascript const response = await client.uploadText({ title: 'Just shipped a new feature! 🚀 Check it out at example.com', user: 'my-profile', platforms: ['x', 'linkedin', 'threads'], // Optional: Create a poll on X xPollOptions: ['Option A', 'Option B', 'Option C'], xPollDuration: 1440, // 24 hours in minutes // Optional: Post to a LinkedIn company page targetLinkedinPageId: 'company-page-id', }); ``` ### Upload Documents (LinkedIn) ```javascript const response = await client.uploadDocument('./presentation.pdf', { title: 'Q4 2024 Report', user: 'my-profile', description: 'Check out our latest quarterly results!', linkedinVisibility: 'PUBLIC', targetLinkedinPageId: 'company-page-id', // Optional: post to company page }); // Any file up to 50 MB to Telegram (or both, with platforms: ['linkedin', 'telegram']) await client.uploadDocument('./archive.zip', { title: 'Files', user: 'my-profile', platforms: ['telegram'] }); ``` ### Check Upload Status For async uploads, check the status using the request_id: ```javascript const status = await client.getStatus('request_id_from_upload'); console.log(status); ``` For scheduled or queued posts, check the status using the job_id: ```javascript const status = await client.getJobStatus('job_id_from_scheduled_post'); console.log(status); ``` ### Get Upload History ```javascript const history = await client.getHistory({ page: 1, limit: 20 }); console.log(history.uploads); ``` ### Scheduled Posts ```javascript // List all scheduled posts const scheduled = await client.listScheduled(); // Edit a scheduled post await client.editScheduled('job-id', { scheduledDate: '2024-12-26T15:00:00Z', timezone: 'America/New_York', }); // Fix the text of a pending post in place (only the platforms listed change) await client.editScheduled('job-id', { platformContent: { instagram: { caption: 'New Instagram caption' }, tiktok: { caption: 'New TikTok caption' }, }, }); // Change any other option by its API form name (null removes it), schedule the // video natively on YouTube, or replace the Reels cover await client.editScheduled('job-id', { fields: { privacyStatus: 'unlisted', disable_comment: true, instagram_first_comment: 'Link in bio' }, youtubePublishAt: '2026-11-01T09:00:00Z', coverImageBase64: 'data:image/jpeg;base64,...', // or removeCover: true }); // Cancel a scheduled post await client.cancelScheduled('job-id'); ``` ### User Management ```javascript // List all profiles const users = await client.listUsers(); // Create a new profile (409 "Username already in use" if it exists, // 403 PROFILE_LIMIT_REACHED at the plan's profile limit) await client.createUser('new-profile'); // Delete a profile await client.deleteUser('old-profile'); // Generate JWT for platform integration (white-label) const jwt = await client.generateJwt('my-profile', { redirectUrl: 'https://yourapp.com/callback', platforms: ['tiktok', 'instagram'], // Optional: force the connection page language for this profile. // Supported: 'en' | 'es' | 'de' | 'fr' | 'pt' | 'pl' | 'tr'. When omitted, the // page auto-detects the visitor's browser language and falls back to English. language: 'es', // Optional: override individual connection-page strings. Flat object of i18n // dot-path keys to strings. Max 100 entries, keys ^[a-zA-Z0-9_.]+$, values // up to 300 chars. Echoed back in the `profile` object of validateJwt. uiLabels: { 'connect.title': 'Link your accounts', 'connect.subtitle': 'Publish everywhere from one place', }, }); ``` ### Get Analytics ```javascript const analytics = await client.getAnalytics('my-profile', { platforms: ['instagram', 'tiktok'], }); console.log(analytics); // Instagram returns two audience breakdowns with the same shape // ({ age, gender, country, city }): console.log(analytics.analytics.instagram.follower_demographics); console.log(analytics.analytics.instagram.engaged_audience_demographics); ``` ### Cached Post Analytics Replays per-post metrics already fetched, instead of calling the platforms again. Only contains posts previously fetched through a live per-post endpoint; there is no background refresh, so captured_at is the last time that post was read live. Not subject to the live calls, so it is not subject to the live post-analytics rate limit (100 requests / 5 minutes). Use it to page through a profile's post history. ```javascript let cursor; do { const page = await client.getCachedPostAnalytics('my-profile', { platform: 'youtube', // optional: instagram, tiktok, youtube, facebook, linkedin, threads, pinterest, reddit limit: 50, // default 50, max 200 since: '2026-06-01', // defaults to 30 days ago until: '2026-07-01', // defaults to today cursor, }); for (const post of page.posts) { console.log(post.platform, post.post_id, post.metrics); } cursor = page.next_cursor; } while (cursor); ``` ### Get Media Retrieve recent posts from a connected social account. Supported platforms: `instagram`, `tiktok`, `youtube`, `linkedin`, `facebook`, `x`, `threads`, `pinterest`, `bluesky`, `reddit`. ```javascript const { media } = await client.getMedia('linkedin', 'my-profile'); // Force the personal LinkedIn profile of an account connected as an org admin: await client.getMedia('linkedin', 'my-profile', { pageUrn: 'me' }); // Target a specific LinkedIn organization page: await client.getMedia('linkedin', 'my-profile', { pageUrn: '12345' }); ``` The response carries a `pagination` object — `{ limit, next_cursor, has_more }`, with `next_cursor: null` and `has_more: false` on the last page: ```javascript let cursor; do { const page = await client.getMedia('instagram', 'my-profile', { limit: 50, cursor }); console.log(page.media.length); cursor = page.pagination.next_cursor; } while (cursor); ``` `limit` defaults to 25 and is clamped to 1-100, with per-platform caps of 20 for TikTok and 50 for YouTube. **LinkedIn, Discord and Telegram do not support cursors** — they accept `limit` only, and passing a `cursor` returns HTTP 400. ### Helper Methods ```javascript // Get Facebook pages for a profile const fbPages = await client.getFacebookPages('my-profile'); // Get LinkedIn pages for a profile const liPages = await client.getLinkedinPages('my-profile'); // Get Pinterest boards for a profile const boards = await client.getPinterestBoards('my-profile'); // TikTok: trending Commercial Music Library tracks const music = await client.getTiktokTrendingMusic('my-profile', { genre: 'POP', countryCode: 'ES', dateRange: '7DAY', // 1DAY, 7DAY, 30DAY, 90DAY }); // TikTok: find a track by song or artist const found = await client.searchTiktokMusic('my-profile', { q: 'bad bunny', countryCode: 'ES', }); // TikTok: search locations to tag const locations = await client.getTiktokLocations('my-profile', 'Madrid'); ``` ### LinkedIn mentions Mention a company Page in a LinkedIn post or comment with `@[Exact Page Name](urn:li:organization:ID)`, a person with `@[Name](urn:li:person:ID)`, or a Page by its vanity name (`@company-vanity`). LinkedIn only links a company mention when the name matches exactly, capitals included; otherwise it is published as plain text. Get the URN and the exact name from the Page URL: ```javascript const org = await client.resolveLinkedinOrganization({ user: 'my-profile', // uses this profile's LinkedIn connection url: 'https://www.linkedin.com/company/linkedin/', // or 'linkedin', '@linkedin', '1337', 'urn:li:organization:1337' }); // { urn: 'urn:li:organization:1337', id: '1337', name: 'LinkedIn', vanity_name: 'linkedin', // mention: '@[LinkedIn](urn:li:organization:1337)', cached: false } await client.uploadText({ user: 'my-profile', platforms: ['linkedin'], title: `Great talk by ${org.mention} today`, }); ``` People cannot be resolved (LinkedIn member ids are app-scoped), so a `/in/` URL fails with `linkedin_person_not_resolvable`. Other errors: `invalid_parameter`, `linkedin_reauth_required`, `linkedin_permission_missing` (reconnect LinkedIn), `organization_not_found`, `rate_limited` / `linkedin_rate_limited`, `linkedin_unavailable`. ### Comments The same methods cover every platform that has comments — Instagram, Facebook, YouTube, LinkedIn and TikTok. There is no per-network method: the endpoint answers one question and `platform` says who to ask. ```javascript // Read the comments on a post const { comments } = await client.getPostComments({ user: 'my-profile', platform: 'tiktok', postId: '7412345678901234567', // TikTok has no post-URL lookup, pass the video id limit: 20, }); // Read the replies hanging from one of them — same question, one more parameter const { comments: replies } = await client.getPostComments({ user: 'my-profile', platform: 'tiktok', postId: '7412345678901234567', commentId: comments[0].id, }); // LinkedIn (company Pages): pass the full comment_urn for a single call await client.getPostComments({ user: 'my-profile', platform: 'linkedin', postId: 'urn:li:share:7300000000000000000', commentId: 'urn:li:comment:(urn:li:activity:7300000000000000000,7300000000000000001)', }); // Comment on the post, or reply to a comment await client.createComment({ user: 'my-profile', platform: 'tiktok', postId: '7412345678901234567', message: 'Thanks for watching!', }); await client.createComment({ user: 'my-profile', platform: 'tiktok', commentId: comments[0].id, message: 'Glad you liked it', }); // Delete one await client.deleteComment({ user: 'my-profile', platform: 'tiktok', commentId: comments[0].id, }); ``` You can also have the first comment posted for you right after publishing, with `firstComment` for every platform or `tiktokFirstComment` for TikTok alone. On TikTok all of this needs the `comments` capability, which the account grants when it connects — see [What a TikTok connection can do](#what-a-tiktok-connection-can-do-capabilities). Replies under a comment (`commentId`) can be read on TikTok, Threads, YouTube, Instagram, Facebook and LinkedIn; X, Bluesky and Reddit answer `platform_not_supported`. - **Instagram:** numeric comment id. - **Facebook:** `postId` is still required (its `{pageId}_` prefix picks the Page). - **LinkedIn:** company Pages only. A bare numeric id is looked up in the post's first 250 comments (`linkedin_comment_not_found` if it is not there: pass the `comment_urn`). `after` is a numeric offset. A personal profile post gives `linkedin_personal_not_supported`; a Page you no longer administer, `linkedin_page_access_denied`. - A malformed id gives `invalid_comment_id`, an unknown one on Instagram or Facebook `comment_not_found`. A comment without replies returns an empty list. #### Moderating a comment: hide, like, pin `commentAction()` does the three and undoes them, on any platform that supports it. Each action carries its own inverse, and `postId` is only sent when the platform needs it: ```javascript await client.commentAction({ user: 'my-profile', platform: 'tiktok', action: 'hide', commentId: '7412345678909999999', postId: '7412345678901234567', }); await client.commentAction({ user: 'my-profile', platform: 'tiktok', action: 'like', commentId: '7412345678909999999', }); await client.commentAction({ user: 'my-profile', platform: 'tiktok', action: 'unpin', commentId: '7412345678909999999', postId: '7412345678901234567', }); ``` | `action` | Undo | `postId` | | --- | --- | --- | | `hide` | `unhide` | required | | `like` | `unlike` | not sent | | `pin` | `unpin` | required | ### Audience Where the analytics methods answer *how did my posts do*, `getAudience()` answers *who is following me*. One endpoint, one `platform` parameter, like every other question in the API. ```javascript const audience = await client.getAudience({ user: 'my-profile', platform: 'tiktok', startDate: '2026-07-01', endDate: '2026-07-30', }); console.log(audience.range); // the window actually used console.log(audience.audience.countries); // and .cities, .ages, .genders console.log(audience.activity_by_hour); // [{ hour: '14', followers_online: 1494 }, ...] console.log(audience.followers_daily); // [{ date, total, new, lost }, ...] console.log(audience.profile_actions); // bio link, address, email, phone, leads console.log(audience.bio_description); ``` The window is clamped on the server: at most 60 days, and `endDate` always before today. A wider window is trimmed to what the platform accepts instead of failing. Ask for a `benchmarkCategory` and the same call also returns how the account compares with the average of that category. The accepted categories come back in `benchmark_categories` on every response, so a picker needs no second call: ```javascript const { benchmark_categories } = await client.getAudience({ user: 'my-profile', platform: 'tiktok', }); const { benchmark } = await client.getAudience({ user: 'my-profile', platform: 'tiktok', benchmarkCategory: 'SOFTWARE_AND_APPS', }); console.log(benchmark.average_engagement_rate, benchmark.average_video_views); ``` ### Suggestions `getSuggestions()` answers *what is worth posting about*: the hashtags or the searches a platform suggests around a keyword. One endpoint for both, told apart by `type`. ```javascript const { hashtags } = await client.getSuggestions({ user: 'my-profile', platform: 'tiktok', type: 'hashtags', q: 'pilates', countryCode: 'ES', language: 'es', }); console.log(hashtags); // [{ name, view_count }, ...] const { keywords } = await client.getSuggestions({ user: 'my-profile', platform: 'tiktok', type: 'keywords', q: 'pilates', }); ``` Per-post numbers stay in `getPostAnalytics()`. On TikTok that response carries more than the usual counters: `retention` (the curve, second by second), `impression_sources` (For You, search, profile...), `audience_types` (followers vs non-followers), `new_followers`, `reach` and the watch times. Asking a platform a question it cannot answer fails with `platform_not_supported` and the list of the ones that can. ### Direct messages `sendDm()` and `getDmConversations()` cover Instagram, Facebook Messenger (`platform: 'facebook'`), WhatsApp and Bluesky. `sendDm()` also sends from your own Telegram bot (`platform: 'telegram'`) to people who started it, and `getDmConversations({ platform: 'telegram' })` reads them once the bot's updates are turned on. Options are camelCase; any other key is sent to the API as given. ```javascript // Read the inbox const { conversations, pagination } = await client.getDmConversations({ platform: 'instagram', user: 'my-profile', messagesLimit: 5, }); // Reply to someone await client.sendDm({ platform: 'instagram', user: 'my-profile', recipientId: '17841400000000000', message: 'Thanks for writing!', buttons: [{ title: 'Open the guide', url: 'https://example.com/guide' }], }); ``` #### Bluesky DMs Bluesky DMs need an app password created with **"Allow access to your direct messages"** (Bluesky > Settings > Privacy and security > App passwords). Without it every call fails with `bluesky_dm_scope_missing`: create a new app password with that box ticked and reconnect Bluesky. ```javascript // recipientId: handle, @handle, DID or profile link const sent = await client.sendDm({ platform: 'bluesky', user: 'my-profile', recipientId: 'alice.bsky.social', message: 'Hi @alice.bsky.social, here it is: https://example.com #launch', }); // Share a post, reply to a message, react, mark as read... await client.sendDm({ platform: 'bluesky', user: 'my-profile', recipientId: 'alice.bsky.social', message: 'look at this', attachments: { type: 'post', url: 'https://bsky.app/profile/alice.bsky.social/post/3l...' }, }); await client.sendDm({ platform: 'bluesky', user: 'my-profile', conversationId: sent.conversation_id, senderAction: 'react', messageId: sent.message_id, reaction: '🔥', }); // Conversations: at most 25 per page; requests only, unread only, or one chat's history await client.getDmConversations({ platform: 'bluesky', user: 'my-profile', status: 'request' }); await client.getDmConversations({ platform: 'bluesky', user: 'my-profile', readState: 'unread' }); await client.getDmConversations({ platform: 'bluesky', user: 'my-profile', conversationId: sent.conversation_id, messagesCursor: '...', }); ``` - `message`: at most 1,000 characters and 10 `@mentions`; links, mentions and hashtags are clickable. Too long: `bluesky_message_too_long`. - `senderAction`: `mark_seen` / `mark_read`, `react` / `unreact` (exactly one emoji in `reaction`), `delete` (for you), `accept` (a request), `mute`, `unmute`, `leave`. None of them counts towards the daily DM allowance. - Buttons, quick replies, templates and typing do not exist on Bluesky and are rejected with 400. - `bluesky_send_unconfirmed` (HTTP 504, `retryable: false`): the DM may have gone out. Check the conversation before sending it again. - Other errors: `bluesky_recipient_unavailable` (403, with `reason`), `bluesky_recipient_not_found`, `bluesky_conversation_not_found`, `bluesky_post_not_found` (404), `bluesky_rejected` (400), `bluesky_reauth_required` (401), `bluesky_rate_limited` (429, `retryAfter`), `bluesky_chat_unavailable` / `bluesky_edge_rate_limited` (502/503). - New Bluesky DMs reach your webhook as `dm_received` (subscribe to it with `updateNotificationConfig`). They are checked every few minutes, not in real time. ### AutoDM **Per-post monitors** answer every new comment on one post: a private DM on Instagram, a public reply on TikTok, YouTube, Facebook, Threads and Bluesky. They stop after 15 days and a profile can start 2 per day. ```javascript const monitor = await client.startAutodm({ profileUsername: 'my-profile', postUrl: 'https://www.instagram.com/p/ABC123/', replyMessage: 'Here is your guide: https://example.com/guide', triggerKeywords: ['guide'], }); await client.getAutodmStatus({ includeInactive: true }); await client.getAutodmLogs(monitor.monitor_id); await client.pauseAutodm(monitor.monitor_id); // resumeAutodm, stopAutodm, deleteAutodm ``` **Account-wide rules (Instagram)** watch the whole account instead: every post and reel, present and future, plus story replies, story mentions and DMs with a keyword. They never expire, up to 10 per Instagram account, and do not count towards the 2 monitors per day. ```javascript const { rule } = await client.createAutodmRule({ profileUsername: 'my-profile', triggers: ['comment', 'story_reply', 'story_mention', 'dm_keyword'], triggerKeywords: ['guide'], // required for dm_keyword replyMessage: 'Here is your free guide!', buttons: [{ title: 'Get the guide', url: 'https://example.com/guide' }], perUserCooldownHours: 24, // whole number 0-720 }); const { rules } = await client.listAutodmRules({ profileUsername: 'my-profile' }); for (const r of rules) { if (!r.webhook.receiving_events || r.webhook.error) console.warn(r.rule_id, r.webhook.hint || r.webhook.error); } await client.pauseAutodmRule(rule.rule_id); // resumeAutodmRule, deleteAutodmRule ``` - Rules work only from Meta's webhooks. If Meta refuses the subscription the rule is not created: `webhook_subscription_failed` (502), reconnect Instagram. - `status` is `active`, `paused`, `reconnect_required`, `stopped` (with `stop_reason`, e.g. `account_moved`) or `disabled`. A stopped rule resumes only once its account is back on its profile (`rule_stopped` otherwise). - For `story_reply`, `story_mention` and `dm_keyword` the cooldown is never below 24 hours (`message_cooldown_hours`), so two bots cannot answer each other. - Errors: `duplicate_rule`, `rule_limit_reached`, `rule_creation_in_progress` (409, retry in a few seconds), `account_rules_disabled` (503). - A post with its own monitor is answered by that monitor only. ### Webhooks ```javascript // Subscribe the account webhook (dm_received / comment_received are opt-in) await client.updateNotificationConfig({ webhookUrl: 'https://example.com/upload-post', webhookEvents: ['upload_completed', 'dm_received', 'comment_received'], channels: { webhook: true }, }); // A different endpoint for one profile await client.setProfileWebhook({ profileUsername: 'my-profile', webhookUrl: 'https://example.com/hooks/my-profile', webhookEvents: { upload_completed: true, comment_received: true }, }); const { webhook_secret } = await client.rotateWebhookSecret(); ``` Webhooks are delivered **at least once**. A timeout, connection error, `5xx`, `408` or `429` is retried up to 6 attempts over about 8.5 hours with the same body and the same `X-Upload-Post-Delivery` id (deduplicate on it); `X-Upload-Post-Attempt` says which attempt it is. Other `4xx` answers are final. Every delivery is logged for 7 days: ```javascript const { deliveries } = await client.listWebhookDeliveries({ status: 'failed', // pending, delivered, failed, cancelled event: 'upload_completed', // requestId, jobId, profileUsername, limit (1-100), page (1-50) }); const { delivery } = await client.getWebhookDelivery(deliveries[0].delivery_id); // with payload const { delivery: again } = await client.redeliverWebhook(delivery.delivery_id); console.log(again.delivery_id, again.redelivery_of); ``` A redelivery is a new delivery (`X-Upload-Post-Redelivery-Of` names the original) sent to the webhook URL configured now. It fails with 409 and `error.reason` `webhook_removed`, `event_unsubscribed` or `blocked_url` when there is nowhere to send it. ### Teams A team member acts on the owner's account by passing the owner's email: ```javascript const owner = new UploadPost('MEMBER_API_KEY', { actAsUser: 'owner@example.com' }); await owner.listUsers(); ``` When the owner's plan covers fewer seats than it has members (after a downgrade), the last invited members are **suspended, not removed**: their requests fail with HTTP 403 and `error.code === 'TEAM_SEAT_SUSPENDED'` until the owner upgrades or removes someone. `listTeamMembers()` (owner) and `listSharedAccounts()` (member) show `suspended` and `suspended_reason`. #### Roles and post approvals (not generally available yet) Team roles (admin, editor, contributor, viewer) and the approval queue are **not generally available yet**: while they are switched off the approval methods answer HTTP 503 (`post_approvals_disabled`) and every member acts as an Admin. The owner invites members and sets their role and profiles in the dashboard; that is not done with the API key. With the API you can read them: `getTeamRoles()` (roles and your own), `listTeamMembers()` and `listSharedAccounts()` (each entry adds `role` and `profiles`, `null` = every profile) and `listTeamAudit()` (owner and Admins). When an Editor uploads, the post is **not** published or scheduled: the upload answers HTTP 202 with `pending_approval: true`, `approval_id`, `approval_status: 'pending_approval'` and `job_id: null` (a Contributor gets `approval_status: 'draft'`). A reviewer (owner or Admin) decides: ```javascript const { items } = await client.listPostApprovals({ status: 'pending_approval' }); const { counts, total } = await client.listPostApprovals({ countOnly: true }); const { item } = await client.getPostApproval({ approvalId: items[0].approval_id }); // version is required: the item.version you reviewed (409 approval_version_changed otherwise) await client.approvePostApproval({ approvalId: item.approval_id, version: item.version }); // or: comment is required to reject await client.rejectPostApproval({ approvalId: item.approval_id, comment: 'Fix the caption' }); ``` `editPostApproval()` and `withdrawPostApproval()` change or withdraw an open item. The end client of a white-label profile can decide too: generate the profile JWT with `generateJwt(username, { clientApproval: true })` and call `listClientPostApprovals({ token })`, `approveClientPostApproval({ token, approvalId, version })` or `rejectClientPostApproval({ token, approvalId, comment })` with that JWT instead of the API key. ### Post actions, best times, queue, Telegram, Bluesky and Google Business Editing and reposting published posts, the best time to post, the queue, and the management endpoints of Telegram, Bluesky and Google Business are plain methods that take one options object and send it to the API **without dropping anything**: top-level camelCase keys become the API's snake_case names (`locationId` → `location_id`; snake_case keys are sent as given) and nested objects keep their own shape, so Telegram and Google objects go through untouched. A file field (`file`, `photo`, `animation`, `sticker`, `avatar`, `banner`, `telegramMedia`...) given as a local path, stream or `Buffer` turns the request into `multipart/form-data`; URLs and Telegram `file_id`s stay strings. Each method links to its page in the API docs for the full list of fields. ```javascript // Best hours to post on Instagram, and a queue that fills them by itself const { best_times } = await client.getBestTimes({ profileUsername: 'my-profile', platform: 'instagram', top: 3 }); await client.updateQueueSettings({ profileUsername: 'my-profile', slots: 'auto', autoSlotsCount: 3, autoPlatforms: ['instagram', 'tiktok'] }); // Telegram: pin a post, forward it to another chat, delete every message of an album await client.editPost({ user: 'my-profile', platform: 'telegram', postId: '42', action: 'pin' }); await client.repostPost({ user: 'my-profile', platform: 'telegram', postId: '42', mode: 'copy', targetChatId: '@other_channel' }); await client.unpublishPost({ user: 'my-profile', platform: 'telegram', postId: '42', deleteAllMessages: true }); // Telegram chat management await client.createTelegramInviteLink({ user: 'my-profile', name: 'Newsletter', createsJoinRequest: true }); await client.updateTelegramChatInfo({ user: 'my-profile', photo: './logo.jpg' }); // multipart // Bluesky: bookmark a post, read notifications, save a draft await client.postAction({ user: 'my-profile', platform: 'bluesky', action: 'bookmark', postId: 'at://did:plc:.../app.bsky.feed.post/3l...' }); const { notifications } = await client.getBlueskyNotifications({ user: 'my-profile', limit: 20 }); await client.createBlueskyDraft({ user: 'my-profile', posts: [{ text: 'Coming soon' }] }); // Google Business: reviews, gallery, daily metrics, strict location edits const { reviews } = await client.listGoogleBusinessReviews({ user: 'my-shop', pageSize: 20 }); await client.replyToGoogleBusinessReview({ user: 'my-shop', reviewName: reviews[0].name, comment: 'Thank you!' }); await client.uploadGoogleBusinessMedia({ user: 'my-shop', file: './dining-room.jpg', category: 'INTERIOR' }); await client.getGoogleBusinessPerformance({ user: 'my-shop', metrics: ['call_clicks', 'website_clicks'], startDate: '2026-10-01', endDate: '2026-10-31' }); await client.updateGoogleBusinessLocationInfo({ user: 'my-shop', editMode: 'strict', dryRun: true, phone: '+34 900 000 000' }); ``` Telegram analytics come from `getAnalytics('my-profile', { platforms: ['telegram'] })` (subscribers or members, reactions, boosts), and Telegram DMs from your own bot go through `sendDm({ platform: 'telegram', ... })`. #### Posts: edit, repost, actions | Method | Endpoint | What it does | | :-- | :-- | :-- | | [`editPost`](https://docs.upload-post.com/api/edit-post) | `POST /api/uploadposts/posts/edit` | Edit a published post (Facebook, LinkedIn, X, Google Business, Telegram: text, buttons, pin/unpin, stop a poll, live location, replace the media). | | [`repostPost`](https://docs.upload-post.com/api/repost) | `POST /api/uploadposts/posts/repost` | Repost / reshare a post (LinkedIn, X, Threads; Telegram forward or copy with `mode`, `post_ids`, `all_messages`). | | [`postAction`](https://docs.upload-post.com/api/bluesky-post-actions) | `POST /api/uploadposts/posts/action` | Act on a published post: Telegram reactions and forward/copy; Bluesky bookmark/unbookmark, pin/unpin, reply and quote settings, detach/reattach quotes. | | [`savePost`](https://docs.upload-post.com/api/save-pin) | `POST /api/uploadposts/posts/save` | Save a post: a Pinterest Pin to a board, or a Bluesky bookmark (`platform: "bluesky"`). | #### Best time to post and queue | Method | Endpoint | What it does | | :-- | :-- | :-- | | [`getBestTimes`](https://docs.upload-post.com/api/best-times) | `GET /api/uploadposts/best-times` | Best hours to publish for a connected account, with `source` and `confidence` (`timezone`, `top`, `refresh`, `page_urn`, `facebook_page_id`). | | [`getQueueSettings`](https://docs.upload-post.com/api/queue-system) | `GET /api/uploadposts/queue/settings` | Queue settings, including `slots_mode`, `auto_slots` and `effective_slots`. | | [`updateQueueSettings`](https://docs.upload-post.com/api/queue-system) | `POST /api/uploadposts/queue/settings` | Update the queue. `slots: "auto"` (or `slots_mode: "auto"`) fills the best hours automatically (`auto_slots_count`, `auto_platforms`, `refresh`); a `slots` array switches back to fixed slots. | | [`getQueuePreview`](https://docs.upload-post.com/api/queue-system) | `GET /api/uploadposts/queue/preview` | Upcoming queue slots and what is scheduled in each (`count`, max 50). | | [`getNextQueueSlot`](https://docs.upload-post.com/api/queue-system) | `GET /api/uploadposts/queue/next-slot` | Next free queue slot. | | [`markQueueSlotFull`](https://docs.upload-post.com/api/queue-system) | `POST /api/uploadposts/queue/slot-full` | Mark a queue slot (ISO 8601, UTC) as full. | | [`unmarkQueueSlotFull`](https://docs.upload-post.com/api/queue-system) | `DELETE /api/uploadposts/queue/slot-full` | Unmark a queue slot marked as full. | #### Telegram: chat, members and invite links | Method | Endpoint | What it does | | :-- | :-- | :-- | | [`getTelegramChatInfo`](https://docs.upload-post.com/api/telegram-chat-insights) | `GET /api/uploadposts/telegram/chat-info` | Chat details, subscribers/members and administrators (`include_administrators`, `return_bots`). | | [`updateTelegramChatInfo`](https://docs.upload-post.com/api/telegram-chat) | `PATCH /api/uploadposts/telegram/chat-info` | Change the chat title, description, photo (file or `photo_url`), permissions, slow mode, sticker set... | | [`getTelegramBoosts`](https://docs.upload-post.com/api/telegram-chat-insights) | `GET /api/uploadposts/telegram/boosts` | Boosts of the chat (with `user_id`: that user's boosts). | | [`getTelegramMember`](https://docs.upload-post.com/api/telegram-chat) | `GET /api/uploadposts/telegram/members` | Read one member (`user_id`) or list the administrators. | | [`moderateTelegramMember`](https://docs.upload-post.com/api/telegram-chat) | `POST /api/uploadposts/telegram/members` | Ban, unban, restrict, promote or give a custom title to a member (`action`). | | [`createTelegramInviteLink`](https://docs.upload-post.com/api/telegram-chat) | `POST /api/uploadposts/telegram/invite-links` | Create an invite link (name, expiry, member limit, join requests, subscription). | | [`editTelegramInviteLink`](https://docs.upload-post.com/api/telegram-chat) | `PATCH /api/uploadposts/telegram/invite-links` | Edit an invite link. | | [`revokeTelegramInviteLink`](https://docs.upload-post.com/api/telegram-chat) | `DELETE /api/uploadposts/telegram/invite-links` | Revoke an invite link. | | [`createTelegramPrimaryInviteLink`](https://docs.upload-post.com/api/telegram-chat) | `POST /api/uploadposts/telegram/invite-links/primary` | Generate a new primary invite link (the previous one stops working). | | [`answerTelegramJoinRequest`](https://docs.upload-post.com/api/telegram-chat) | `POST /api/uploadposts/telegram/join-requests` | Approve or decline a request to join the chat. | | [`getTelegramTopicIcons`](https://docs.upload-post.com/api/telegram-chat) | `GET /api/uploadposts/telegram/topics/icons` | Custom emoji that can be used as forum topic icons. | | [`createTelegramTopic`](https://docs.upload-post.com/api/telegram-chat) | `POST /api/uploadposts/telegram/topics` | Create a forum topic. | | [`editTelegramTopic`](https://docs.upload-post.com/api/telegram-chat) | `PATCH /api/uploadposts/telegram/topics` | Edit, close, reopen, hide, unhide or unpin a forum topic. | | [`deleteTelegramTopic`](https://docs.upload-post.com/api/telegram-chat) | `DELETE /api/uploadposts/telegram/topics` | Delete a forum topic. | | [`unpinAllTelegramMessages`](https://docs.upload-post.com/api/telegram-chat) | `POST /api/uploadposts/telegram/unpin-all` | Unpin every message of the chat (or of a topic). | | [`leaveTelegramChat`](https://docs.upload-post.com/api/telegram-chat) | `POST /api/uploadposts/telegram/leave` | Make the bot leave the connected chat. | | [`answerTelegramSuggestedPost`](https://docs.upload-post.com/api/telegram-chat) | `POST /api/uploadposts/telegram/suggested-posts` | Approve or decline a suggested post in a channel direct messages chat. | | [`getTelegramUserPersonalChatMessages`](https://docs.upload-post.com/api/telegram-chat) | `GET /api/uploadposts/telegram/users/{user_id}/personal-chat-messages` | Last messages of a user's personal channel. | | [`getTelegramUserProfileAudios`](https://docs.upload-post.com/api/telegram-chat) | `GET /api/uploadposts/telegram/users/{user_id}/profile-audios` | Profile audios of a Telegram user. | | [`getTelegramShareThemeBackdrops`](https://docs.upload-post.com/api/telegram-chat) | `GET /api/uploadposts/telegram/share-theme-backdrops` | Backdrops available for the Telegram share screen theme. | | [`getTelegramUpdatesStatus`](https://docs.upload-post.com/api/telegram-inbox) | `GET /api/uploadposts/telegram/updates` | Whether update receiving is on for the bot. | #### Telegram: bot profile, commands and stickers | Method | Endpoint | What it does | | :-- | :-- | :-- | | [`getTelegramBotProfile`](https://docs.upload-post.com/api/telegram-bot-profile) | `GET /api/uploadposts/telegram/bot-profile` | Bot name, descriptions, photo, menu button and default administrator rights. | | [`updateTelegramBotProfile`](https://docs.upload-post.com/api/telegram-bot-profile) | `PATCH /api/uploadposts/telegram/bot-profile` | Change the bot profile (`photo`/`animation` as file or URL, `menu_button`, `default_administrator_rights`...). | | [`getTelegramBotCommands`](https://docs.upload-post.com/api/telegram-bot-profile) | `GET /api/uploadposts/telegram/bot-commands` | Bot commands for a scope and language. | | [`setTelegramBotCommands`](https://docs.upload-post.com/api/telegram-bot-profile) | `POST /api/uploadposts/telegram/bot-commands` | Set the bot commands (`commands`, `scope`, `language_code`). | | [`deleteTelegramBotCommands`](https://docs.upload-post.com/api/telegram-bot-profile) | `DELETE /api/uploadposts/telegram/bot-commands` | Delete the bot commands of a scope and language. | | [`getTelegramStickerSet`](https://docs.upload-post.com/api/telegram-stickers) | `GET /api/uploadposts/telegram/sticker-sets` | Read a sticker set (`name`) or custom emoji stickers. | | [`createTelegramStickerSet`](https://docs.upload-post.com/api/telegram-stickers) | `POST /api/uploadposts/telegram/sticker-sets` | Create a sticker set. | | [`editTelegramStickerSet`](https://docs.upload-post.com/api/telegram-stickers) | `PATCH /api/uploadposts/telegram/sticker-sets` | Edit a sticker set (add, replace, reorder stickers, title, thumbnail, emoji, keywords...). | | [`deleteTelegramStickerSet`](https://docs.upload-post.com/api/telegram-stickers) | `DELETE /api/uploadposts/telegram/sticker-sets` | Delete a sticker set, or a sticker from it. | | [`uploadTelegramStickerFile`](https://docs.upload-post.com/api/telegram-stickers) | `POST /api/uploadposts/telegram/sticker-sets/upload` | Upload a sticker file (`sticker` file or `sticker_url`, `sticker_format`, `owner_user_id`); returns its `file_id`. | #### Telegram: Stars, invoices and gifts | Method | Endpoint | What it does | | :-- | :-- | :-- | | [`getTelegramStars`](https://docs.upload-post.com/api/telegram-chat-insights) | `GET /api/uploadposts/telegram/stars` | The bot's Telegram Stars balance. | | [`getTelegramStarTransactions`](https://docs.upload-post.com/api/telegram-chat-insights) | `GET /api/uploadposts/telegram/stars/transactions` | The bot's Telegram Stars transactions (`offset`, `limit`). | | [`sendTelegramInvoice`](https://docs.upload-post.com/api/telegram-payments) | `POST /api/uploadposts/telegram/invoices` | Send an invoice to the connected chat or to `chat_id` (payments go to your bot). | | [`createTelegramInvoiceLink`](https://docs.upload-post.com/api/telegram-payments) | `POST /api/uploadposts/telegram/invoice-links` | Create an invoice link. | | [`refundTelegramStarPayment`](https://docs.upload-post.com/api/telegram-payments) | `POST /api/uploadposts/telegram/stars/refund` | Refund a Telegram Stars payment (`user_id`, `telegram_payment_charge_id`). | | [`editTelegramStarSubscription`](https://docs.upload-post.com/api/telegram-payments) | `POST /api/uploadposts/telegram/stars/subscription` | Cancel or re-enable a user's Stars subscription. | | [`getTelegramAvailableGifts`](https://docs.upload-post.com/api/telegram-payments) | `GET /api/uploadposts/telegram/gifts` | Gifts the bot can send. | | [`getTelegramOwnedGifts`](https://docs.upload-post.com/api/telegram-payments) | `GET /api/uploadposts/telegram/gifts/owned` | Gifts owned by a user or a chat. | | [`getTelegramUniqueGift`](https://docs.upload-post.com/api/telegram-payments) | `GET /api/uploadposts/telegram/gifts/unique` | A unique gift by name. | | [`getTelegramUnansweredPayments`](https://docs.upload-post.com/api/telegram-payments) | `GET /api/uploadposts/telegram/payments/unanswered` | Payment queries that were not answered in time. | #### Bluesky: reads | Method | Endpoint | What it does | | :-- | :-- | :-- | | [`getPostEngagement`](https://docs.upload-post.com/api/bluesky-reads) | `GET /api/uploadposts/post-engagement` | Who liked, reposted or quoted a post (`type`: likes, reposts, quotes; `limit`, `cursor`). | | [`getBlueskyProfiles`](https://docs.upload-post.com/api/bluesky-reads) | `GET /api/uploadposts/bluesky/profile` | One or several Bluesky profiles (`actor`: handles or DIDs, comma separated, up to 25; without it, the connected account). | | [`searchBlueskyPosts`](https://docs.upload-post.com/api/bluesky-reads) | `GET /api/uploadposts/bluesky/search/posts` | Search Bluesky posts (`sort`, `since`, `until`, `author`, `lang`, `tag`, `limit`, `cursor`...). | | [`searchBlueskyActors`](https://docs.upload-post.com/api/bluesky-reads) | `GET /api/uploadposts/bluesky/search/actors` | Search Bluesky accounts. | | [`getBlueskyFollowers`](https://docs.upload-post.com/api/bluesky-reads) | `GET /api/uploadposts/bluesky/followers` | Followers of an account (`actor`, or the connected one with `user`; `known=true` for followers you follow). | | [`getBlueskyFollows`](https://docs.upload-post.com/api/bluesky-reads) | `GET /api/uploadposts/bluesky/follows` | Accounts an account follows. | | [`blueskyXrpc`](https://docs.upload-post.com/api/bluesky-reads) | `GET /api/uploadposts/bluesky/xrpc/{nsid}` | Read-only gateway to an allow-listed public Bluesky XRPC method (e.g. `app.bsky.feed.getAuthorFeed`); returns Bluesky's answer untouched. | | [`getBlueskyLabels`](https://docs.upload-post.com/api/bluesky-reads) | `GET /api/uploadposts/bluesky/labels` | Moderation labels on the account and its posts. | #### Bluesky: notifications | Method | Endpoint | What it does | | :-- | :-- | :-- | | [`getBlueskyNotifications`](https://docs.upload-post.com/api/bluesky-notifications) | `GET /api/uploadposts/bluesky/notifications` | List notifications (`reasons`, `priority`, `limit`, `cursor`). | | [`getBlueskyUnreadCount`](https://docs.upload-post.com/api/bluesky-notifications) | `GET /api/uploadposts/bluesky/notifications/unread-count` | Unread notification count. | | [`markBlueskyNotificationsSeen`](https://docs.upload-post.com/api/bluesky-notifications) | `POST /api/uploadposts/bluesky/notifications/seen` | Mark notifications as seen (up to `seen_at`). | | [`getBlueskyNotificationPreferences`](https://docs.upload-post.com/api/bluesky-notifications) | `GET /api/uploadposts/bluesky/notification-preferences` | Notification preferences. | | [`updateBlueskyNotificationPreferences`](https://docs.upload-post.com/api/bluesky-notifications) | `POST /api/uploadposts/bluesky/notification-preferences` | Update notification preferences. | | [`getBlueskyActivitySubscriptions`](https://docs.upload-post.com/api/bluesky-notifications) | `GET /api/uploadposts/bluesky/activity-subscriptions` | Accounts whose activity you are subscribed to. | | [`setBlueskyActivitySubscription`](https://docs.upload-post.com/api/bluesky-notifications) | `POST /api/uploadposts/bluesky/activity-subscriptions` | Subscribe to (or stop) an account's posts and replies. | #### Bluesky: profile, settings and drafts | Method | Endpoint | What it does | | :-- | :-- | :-- | | [`getBlueskyOwnProfile`](https://docs.upload-post.com/api/bluesky-profile) | `GET /api/uploadposts/bluesky/profile/self` | The connected account's profile record. | | [`updateBlueskyProfile`](https://docs.upload-post.com/api/bluesky-profile) | `POST /api/uploadposts/bluesky/profile/self` | Update the profile (display name, description, `avatar`/`banner` files, links, pinned post...). Fields not sent stay as they are. | | [`getBlueskyStatus`](https://docs.upload-post.com/api/bluesky-profile) | `GET /api/uploadposts/bluesky/status` | Read the live status. | | [`setBlueskyStatus`](https://docs.upload-post.com/api/bluesky-profile) | `POST /api/uploadposts/bluesky/status` | Set the live status. | | [`clearBlueskyStatus`](https://docs.upload-post.com/api/bluesky-profile) | `DELETE /api/uploadposts/bluesky/status` | Clear the live status. | | [`getBlueskySettings`](https://docs.upload-post.com/api/bluesky-profile) | `GET /api/uploadposts/bluesky/settings` | Chat and discovery settings. | | [`updateBlueskySettings`](https://docs.upload-post.com/api/bluesky-profile) | `POST /api/uploadposts/bluesky/settings` | Change chat and discovery settings. | | [`getBlueskyPreferences`](https://docs.upload-post.com/api/bluesky-profile) | `GET /api/uploadposts/bluesky/preferences` | App preferences (content filters, feeds, muted words...). | | [`updateBlueskyPreferences`](https://docs.upload-post.com/api/bluesky-profile) | `PUT /api/uploadposts/bluesky/preferences` | Replace some app preferences. | | [`listBlueskyDrafts`](https://docs.upload-post.com/api/bluesky-drafts) | `GET /api/uploadposts/bluesky/drafts` | List drafts. | | [`createBlueskyDraft`](https://docs.upload-post.com/api/bluesky-drafts) | `POST /api/uploadposts/bluesky/drafts` | Create a draft. | | [`updateBlueskyDraft`](https://docs.upload-post.com/api/bluesky-drafts) | `PATCH /api/uploadposts/bluesky/drafts/{draft_id}` | Replace a draft. | | [`deleteBlueskyDraft`](https://docs.upload-post.com/api/bluesky-drafts) | `DELETE /api/uploadposts/bluesky/drafts/{draft_id}` | Delete a draft. | #### Bluesky: chat | Method | Endpoint | What it does | | :-- | :-- | :-- | | [`getBlueskyChatStatus`](https://docs.upload-post.com/api/bluesky-chat) | `GET /api/uploadposts/dms/bluesky/status` | Chat status of the account. | | [`getBlueskyChatPreferences`](https://docs.upload-post.com/api/bluesky-chat) | `GET /api/uploadposts/dms/bluesky/preferences` | DM notification settings. | | [`updateBlueskyChatPreferences`](https://docs.upload-post.com/api/bluesky-chat) | `POST /api/uploadposts/dms/bluesky/preferences` | Change DM notification settings. | | [`exportBlueskyChat`](https://docs.upload-post.com/api/bluesky-chat) | `GET /api/uploadposts/dms/bluesky/export` | Export the account's chat history. | #### Google Business: posts and reviews | Method | Endpoint | What it does | | :-- | :-- | :-- | | [`listGoogleBusinessPosts`](https://docs.upload-post.com/api/google-business-posts) | `GET /api/uploadposts/google-business/posts` | List the location's posts (`location_id`, `page_size`, `page_token`). Edit them with editPost and delete them with unpublishPost. | | [`getGoogleBusinessPost`](https://docs.upload-post.com/api/google-business-posts) | `GET /api/uploadposts/google-business/posts/get` | Read one post (`post_id` or `post_name`). | | [`listGoogleBusinessReviews`](https://docs.upload-post.com/api/google-business-reviews) | `GET /api/uploadposts/google-business/reviews` | List reviews (`location_id`, `page_size`, `page_token`, `order_by`). | | [`getGoogleBusinessReview`](https://docs.upload-post.com/api/google-business-reviews) | `GET /api/uploadposts/google-business/reviews/get` | Read one review (`review_name`, or `review_id` + `location_id`). | | [`batchGetGoogleBusinessReviews`](https://docs.upload-post.com/api/google-business-reviews) | `GET /api/uploadposts/google-business/reviews/batch` | Reviews of several locations at once (`location_ids`). | | [`replyToGoogleBusinessReview`](https://docs.upload-post.com/api/google-business-reviews) | `PUT /api/uploadposts/google-business/reviews/reply` | Reply to a review, or replace the reply (`review_name`, or `review_id` + `location_id`). | | [`deleteGoogleBusinessReviewReply`](https://docs.upload-post.com/api/google-business-reviews) | `DELETE /api/uploadposts/google-business/reviews/reply` | Delete the reply to a review. | #### Google Business: gallery and performance | Method | Endpoint | What it does | | :-- | :-- | :-- | | [`listGoogleBusinessMedia`](https://docs.upload-post.com/api/google-business-media) | `GET /api/uploadposts/google-business/media` | List the location's gallery. | | [`getGoogleBusinessMedia`](https://docs.upload-post.com/api/google-business-media) | `GET /api/uploadposts/google-business/media/get` | Read one gallery item. | | [`uploadGoogleBusinessMedia`](https://docs.upload-post.com/api/google-business-media) | `POST /api/uploadposts/google-business/media` | Upload a photo or video to the gallery: `file` (local path, stream or Buffer) or `source_url`, plus `category`, `description`, `media_format`. | | [`updateGoogleBusinessMedia`](https://docs.upload-post.com/api/google-business-media) | `PATCH /api/uploadposts/google-business/media` | Change a gallery item's category. | | [`deleteGoogleBusinessMedia`](https://docs.upload-post.com/api/google-business-media) | `DELETE /api/uploadposts/google-business/media` | Delete a gallery item. | | [`listGoogleBusinessCustomerMedia`](https://docs.upload-post.com/api/google-business-media) | `GET /api/uploadposts/google-business/media/customers` | Photos uploaded by customers. | | [`getGoogleBusinessCustomerMedia`](https://docs.upload-post.com/api/google-business-media) | `GET /api/uploadposts/google-business/media/customers/get` | One customer photo. | | [`getGoogleBusinessPerformance`](https://docs.upload-post.com/api/google-business-performance) | `GET /api/uploadposts/google-business/performance` | Daily metrics for any date range (impressions, calls, website clicks, directions...: `metrics`, `start_date`, `end_date`). | | [`getGoogleBusinessSearchKeywords`](https://docs.upload-post.com/api/google-business-performance) | `GET /api/uploadposts/google-business/performance/keywords` | Monthly search keywords that showed the location (`start_month`, `end_month`). | #### Google Business: location info | Method | Endpoint | What it does | | :-- | :-- | :-- | | [`getGoogleBusinessLocationInfo`](https://docs.upload-post.com/api/google-business-info) | `GET /api/uploadposts/google-business/location-info` | Read the location's info (name, address, hours, phones, categories, service area, open status...). | | [`updateGoogleBusinessLocationInfo`](https://docs.upload-post.com/api/google-business-info) | `PATCH /api/uploadposts/google-business/location-info` | Edit the location's info. `edit_mode: "legacy"` (default) or `"strict"` (`dry_run`, `confirm`, `include_edit_status`); `validate_only` in both. | | [`getGoogleBusinessGoogleUpdates`](https://docs.upload-post.com/api/google-business-info) | `GET /api/uploadposts/google-business/location-info/google-updated` | Changes Google suggested for the location (`diff_fields`). | | [`answerGoogleBusinessGoogleUpdates`](https://docs.upload-post.com/api/google-business-info) | `POST /api/uploadposts/google-business/location-info/google-updates` | Accept or reject Google's suggested changes, field by field. | | [`getGoogleBusinessLocationInfoExtended`](https://docs.upload-post.com/api/google-business-info) | `GET /api/uploadposts/google-business/location-info/extended` | Edit status of each field (experimental). | | [`listGoogleBusinessLocations`](https://docs.upload-post.com/api/google-business-info) | `GET /api/uploadposts/google-business/locations/list` | List locations with filters (`account`, `filter`, `order_by`, `read_mask`, `page_size`, `page_token`). | | [`getGoogleBusinessPinnedLocation`](https://docs.upload-post.com/api/google-business-location) | `GET /api/uploadposts/users/google-business-location` | Locations available to a profile and the one pinned for its uploads. | | [`pinGoogleBusinessLocation`](https://docs.upload-post.com/api/google-business-location) | `POST /api/uploadposts/users/google-business-location` | Pin the location a profile publishes to (instead of passing gbpLocationId on every upload). | | [`clearGoogleBusinessLocationPin`](https://docs.upload-post.com/api/google-business-location) | `DELETE /api/uploadposts/users/google-business-location` | Clear the pinned location. | #### Google Business: catalogs, attributes, Place Actions, menus, services and lodging | Method | Endpoint | What it does | | :-- | :-- | :-- | | [`searchGoogleBusinessCategories`](https://docs.upload-post.com/api/google-business-catalogs) | `GET /api/uploadposts/google-business/categories` | Search categories (`region_code`, `language_code`, `query`). | | [`batchGetGoogleBusinessCategories`](https://docs.upload-post.com/api/google-business-catalogs) | `GET /api/uploadposts/google-business/categories/batch` | Category details: service types and more-hours types (`names`). | | [`searchGoogleBusinessChains`](https://docs.upload-post.com/api/google-business-catalogs) | `GET /api/uploadposts/google-business/chains` | Search chains (`name`). | | [`getGoogleBusinessChain`](https://docs.upload-post.com/api/google-business-catalogs) | `GET /api/uploadposts/google-business/chains/get` | One chain (`chain`). | | [`searchGoogleBusinessGoogleLocations`](https://docs.upload-post.com/api/google-business-catalogs) | `POST /api/uploadposts/google-business/google-locations/search` | Is the business already on Google? Search Google's listings. | | [`getGoogleBusinessRecommendedLocations`](https://docs.upload-post.com/api/google-business-catalogs) | `GET /api/uploadposts/google-business/google-locations/recommended` | Locations Google recommends for the account. | | [`reportGoogleBusinessGoogleLocation`](https://docs.upload-post.com/api/google-business-catalogs) | `POST /api/uploadposts/google-business/google-locations/report` | Report a wrong listing to Google. | | [`getGoogleBusinessAvailableAttributes`](https://docs.upload-post.com/api/google-business-attributes) | `GET /api/uploadposts/google-business/attributes/available` | Attributes the location can use. | | [`getGoogleBusinessAttributes`](https://docs.upload-post.com/api/google-business-attributes) | `GET /api/uploadposts/google-business/attributes` | Current attributes of the location. | | [`updateGoogleBusinessAttributes`](https://docs.upload-post.com/api/google-business-attributes) | `PATCH /api/uploadposts/google-business/attributes` | Update attributes. | | [`getGoogleBusinessAttributesGoogleUpdated`](https://docs.upload-post.com/api/google-business-attributes) | `GET /api/uploadposts/google-business/attributes/google-updated` | Attributes as Google shows them. | | [`getGoogleBusinessAttributesExtended`](https://docs.upload-post.com/api/google-business-attributes) | `GET /api/uploadposts/google-business/attributes/extended` | Attributes with their edit status (experimental). | | [`getGoogleBusinessPlaceActionTypes`](https://docs.upload-post.com/api/google-business-place-actions) | `GET /api/uploadposts/google-business/place-actions/types` | Place Action types (booking, ordering, shopping links...) the location can use. | | [`listGoogleBusinessPlaceActions`](https://docs.upload-post.com/api/google-business-place-actions) | `GET /api/uploadposts/google-business/place-actions` | List Place Action links. | | [`getGoogleBusinessPlaceAction`](https://docs.upload-post.com/api/google-business-place-actions) | `GET /api/uploadposts/google-business/place-actions/get` | Read one Place Action link (`link`). | | [`createGoogleBusinessPlaceAction`](https://docs.upload-post.com/api/google-business-place-actions) | `POST /api/uploadposts/google-business/place-actions` | Create a Place Action link. | | [`updateGoogleBusinessPlaceAction`](https://docs.upload-post.com/api/google-business-place-actions) | `PATCH /api/uploadposts/google-business/place-actions` | Edit or switch off a Place Action link. | | [`deleteGoogleBusinessPlaceAction`](https://docs.upload-post.com/api/google-business-place-actions) | `DELETE /api/uploadposts/google-business/place-actions` | Delete a Place Action link. | | [`getGoogleBusinessFoodMenus`](https://docs.upload-post.com/api/google-business-menus-services) | `GET /api/uploadposts/google-business/food-menus` | Food menus of the location. | | [`updateGoogleBusinessFoodMenus`](https://docs.upload-post.com/api/google-business-menus-services) | `PUT /api/uploadposts/google-business/food-menus` | Replace the food menus. | | [`getGoogleBusinessServices`](https://docs.upload-post.com/api/google-business-menus-services) | `GET /api/uploadposts/google-business/services` | Services of the location. | | [`updateGoogleBusinessServices`](https://docs.upload-post.com/api/google-business-menus-services) | `PUT /api/uploadposts/google-business/services` | Replace the services. | | [`getGoogleBusinessLodging`](https://docs.upload-post.com/api/google-business-lodging) | `GET /api/uploadposts/google-business/lodging` | Lodging data of a hotel (`read_mask`). | | [`updateGoogleBusinessLodging`](https://docs.upload-post.com/api/google-business-lodging) | `PATCH /api/uploadposts/google-business/lodging` | Update lodging data. | | [`getGoogleBusinessLodgingGoogleUpdated`](https://docs.upload-post.com/api/google-business-lodging) | `GET /api/uploadposts/google-business/lodging/google-updated` | Lodging data as Google shows it. | #### Google Business: accounts and verification (reads) | Method | Endpoint | What it does | | :-- | :-- | :-- | | [`listGoogleBusinessAccounts`](https://docs.upload-post.com/api/google-business-accounts) | `GET /api/uploadposts/google-business/accounts` | Google Business accounts and location groups (`type`). | | [`getGoogleBusinessAccount`](https://docs.upload-post.com/api/google-business-accounts) | `GET /api/uploadposts/google-business/accounts/get` | Read one account (`account`). | | [`createGoogleBusinessAccount`](https://docs.upload-post.com/api/google-business-accounts) | `POST /api/uploadposts/google-business/accounts` | Create a location group or user group (`type`, `account_name`, `confirm`). | | [`listGoogleBusinessAdmins`](https://docs.upload-post.com/api/google-business-accounts) | `GET /api/uploadposts/google-business/admins` | Admins of an account or a location (`scope`, `location_id`). | | [`listGoogleBusinessInvitations`](https://docs.upload-post.com/api/google-business-accounts) | `GET /api/uploadposts/google-business/invitations` | Pending invitations of an account. | | [`getGoogleBusinessVerificationState`](https://docs.upload-post.com/api/google-business-verification) | `GET /api/uploadposts/google-business/verification/state` | Whether the location is verified and in good standing. | | [`getGoogleBusinessVerificationOptions`](https://docs.upload-post.com/api/google-business-verification) | `POST /api/uploadposts/google-business/verification/options` | Verification methods available for the location. | | [`listGoogleBusinessVerifications`](https://docs.upload-post.com/api/google-business-verification) | `GET /api/uploadposts/google-business/verifications` | Past verifications of the location. | ### YouTube management Video details and your daily allowance, thumbnails, playlists, captions, the comments inbox, search and catalogs, subscriptions, ratings and reports, channel settings, live broadcasts and streams, and the live chat. Same rules as the methods above (every option is sent, files go multipart). Destructive or hard-to-undo calls need `confirm: true`, which the SDK never adds for you (`400 confirmation_required` otherwise). These calls share a daily allowance per account, in YouTube quota units: check it with `getYoutubeQuota()`. ```javascript const { videos } = await client.getYoutubeVideos({ user: 'my-profile', ids: 'dQw4w9WgXcQ' }); await client.uploadYoutubeCaption({ user: 'my-profile', videoId: 'dQw4w9WgXcQ', language: 'es', file: './es.srt' }); const srt = await client.downloadYoutubeCaption({ user: 'my-profile', captionId: 'AUieDa...', tfmt: 'srt' }); // text await client.moderateYoutubeComments({ user: 'my-profile', commentIds: ['Ugz...'], status: 'rejected', confirm: true }); const { broadcast } = await client.createYoutubeBroadcast({ user: 'my-profile', title: 'Live Q&A', scheduledStartTime: '2026-12-01T18:00:00Z' }); await client.transitionYoutubeBroadcast({ user: 'my-profile', broadcastId: broadcast.id, status: 'live', confirm: true }); ``` Editing a published video goes through `editPost({ platform: 'youtube', ... })` with YouTube's own names (`privacyStatus`, `categoryId`, `publishAt`, `hasPaidProductPlacement`...), plus `localizations`, `localizationsRemove` and `brandPartner`. #### YouTube: videos, thumbnail and quota | Method | Endpoint | What it does | | :-- | :-- | :-- | | [`getYoutubeVideos`](https://docs.upload-post.com/api/youtube-videos) | `GET /api/uploadposts/youtube/videos` | Full details of videos: status, processing, statistics, translations, paid placement... (`ids`, `chart` or `my_rating`; `parts`, `include_owner_details`). | | [`getYoutubeQuota`](https://docs.upload-post.com/api/youtube-videos) | `GET /api/uploadposts/youtube/quota` | Your account's daily allowance for the YouTube management endpoints and what is left. | | [`setYoutubeThumbnail`](https://docs.upload-post.com/api/youtube-thumbnail) | `POST /api/uploadposts/youtube/thumbnail` | Set a video's thumbnail: `thumbnail` (local file, stream or Buffer) or `thumbnail_url`. | #### YouTube: playlists | Method | Endpoint | What it does | | :-- | :-- | :-- | | [`listYoutubePlaylists`](https://docs.upload-post.com/api/youtube-playlists) | `GET /api/uploadposts/youtube/playlists` | List the channel's playlists (or `ids`). | | [`createYoutubePlaylist`](https://docs.upload-post.com/api/youtube-playlists) | `POST /api/uploadposts/youtube/playlists` | Create a playlist (`title`, `description`, `privacy_status`, `default_language`, `localizations`...). | | [`updateYoutubePlaylist`](https://docs.upload-post.com/api/youtube-playlists) | `PATCH /api/uploadposts/youtube/playlists/{playlist_id}` | Edit a playlist (only what you send changes). | | [`deleteYoutubePlaylist`](https://docs.upload-post.com/api/youtube-playlists) | `DELETE /api/uploadposts/youtube/playlists/{playlist_id}` | Delete a playlist (needs `confirm: true`; the videos stay). | | [`listYoutubePlaylistItems`](https://docs.upload-post.com/api/youtube-playlists) | `GET /api/uploadposts/youtube/playlists/{playlist_id}/items` | Videos of a playlist. | | [`addYoutubePlaylistItem`](https://docs.upload-post.com/api/youtube-playlists) | `POST /api/uploadposts/youtube/playlists/{playlist_id}/items` | Add a video to a playlist (`video_id`, `position`, `note`). | | [`updateYoutubePlaylistItem`](https://docs.upload-post.com/api/youtube-playlists) | `PATCH /api/uploadposts/youtube/playlists/{playlist_id}/items/{item_id}` | Reorder a playlist video or change its note. | | [`deleteYoutubePlaylistItem`](https://docs.upload-post.com/api/youtube-playlists) | `DELETE /api/uploadposts/youtube/playlists/{playlist_id}/items/{item_id}` | Remove a video from a playlist (needs `confirm: true`). | | [`getYoutubePlaylistImage`](https://docs.upload-post.com/api/youtube-playlists) | `GET /api/uploadposts/youtube/playlists/{playlist_id}/image` | The playlist's custom image. | | [`setYoutubePlaylistImage`](https://docs.upload-post.com/api/youtube-playlists) | `POST /api/uploadposts/youtube/playlists/{playlist_id}/image` | Add the playlist image: `image` (local file, stream or Buffer) or `image_url`. | | [`replaceYoutubePlaylistImage`](https://docs.upload-post.com/api/youtube-playlists) | `PUT /api/uploadposts/youtube/playlists/{playlist_id}/image` | Replace the playlist image (same fields, needs `confirm: true`). | | [`deleteYoutubePlaylistImage`](https://docs.upload-post.com/api/youtube-playlists) | `DELETE /api/uploadposts/youtube/playlists/{playlist_id}/image` | Remove the playlist image (needs `confirm: true`). | #### YouTube: captions | Method | Endpoint | What it does | | :-- | :-- | :-- | | [`listYoutubeCaptions`](https://docs.upload-post.com/api/youtube-captions) | `GET /api/uploadposts/youtube/captions` | Caption tracks of a video. | | [`uploadYoutubeCaption`](https://docs.upload-post.com/api/youtube-captions) | `POST /api/uploadposts/youtube/captions` | Add a caption track: `file` (local file, stream or Buffer) or `file_url`, plus `language`, `name`, `is_draft`. | | [`updateYoutubeCaption`](https://docs.upload-post.com/api/youtube-captions) | `PUT /api/uploadposts/youtube/captions/{caption_id}` | Replace a track's file and/or publish a draft (`is_draft: false`). | | [`downloadYoutubeCaption`](https://docs.upload-post.com/api/youtube-captions) | `GET /api/uploadposts/youtube/captions/{caption_id}/download` | Download a track (`tfmt`: srt, vtt, sbv, scc, ttml; `tlang` to translate). Returns the file's text. | | [`deleteYoutubeCaption`](https://docs.upload-post.com/api/youtube-captions) | `DELETE /api/uploadposts/youtube/captions/{caption_id}` | Delete a track (needs `confirm: true`). | #### YouTube: comments inbox | Method | Endpoint | What it does | | :-- | :-- | :-- | | [`listYoutubeComments`](https://docs.upload-post.com/api/youtube-comments) | `GET /api/uploadposts/youtube/comments` | Comment threads of a video (`video_id`), of the whole channel (`scope: "channel"`) or by `ids`; `moderation_status`, `order`, `search_terms`... | | [`listYoutubeCommentReplies`](https://docs.upload-post.com/api/youtube-comments) | `GET /api/uploadposts/youtube/comments/replies` | Replies to a comment (`parent_id`) or comments by `ids`. | | [`createYoutubeComment`](https://docs.upload-post.com/api/youtube-comments) | `POST /api/uploadposts/youtube/comments` | Reply to a comment (`parent_id`) or comment on a video (`video_id`); `idempotency_key` optional. | | [`updateYoutubeComment`](https://docs.upload-post.com/api/youtube-comments) | `PATCH /api/uploadposts/youtube/comments/{comment_id}` | Edit your own comment (`text`). | | [`deleteYoutubeComment`](https://docs.upload-post.com/api/youtube-comments) | `DELETE /api/uploadposts/youtube/comments/{comment_id}` | Delete your own comment (needs `confirm: true`). | | [`moderateYoutubeComments`](https://docs.upload-post.com/api/youtube-comments) | `POST /api/uploadposts/youtube/comments/moderate` | Approve, hold or reject comments of your channel (`rejected` needs `confirm: true`; `ban_author`). | #### YouTube: search and catalogs | Method | Endpoint | What it does | | :-- | :-- | :-- | | [`searchYoutube`](https://docs.upload-post.com/api/youtube-search-catalogs) | `GET /api/uploadposts/youtube/search` | Search videos, channels and playlists (`q`, `for_mine`, `channel_id`, `type`, `order`...). | | [`getYoutubeCategories`](https://docs.upload-post.com/api/youtube-search-catalogs) | `GET /api/uploadposts/youtube/categories` | Video categories of a region (`region`, `hl`, `assignable_only`). | | [`getYoutubeLanguages`](https://docs.upload-post.com/api/youtube-search-catalogs) | `GET /api/uploadposts/youtube/languages` | Languages YouTube supports (`hl`). | | [`getYoutubeRegions`](https://docs.upload-post.com/api/youtube-search-catalogs) | `GET /api/uploadposts/youtube/regions` | Regions (countries) YouTube supports (`hl`). | | [`getYoutubeAbuseReasons`](https://docs.upload-post.com/api/youtube-search-catalogs) | `GET /api/uploadposts/youtube/abuse-reasons` | Reasons for an abuse report (`hl`). | #### YouTube: subscriptions, ratings, reports and activity | Method | Endpoint | What it does | | :-- | :-- | :-- | | [`listYoutubeSubscriptions`](https://docs.upload-post.com/api/youtube-channel-actions) | `GET /api/uploadposts/youtube/subscriptions` | Channels the connected channel subscribes to (or its subscribers). | | [`subscribeYoutubeChannel`](https://docs.upload-post.com/api/youtube-channel-actions) | `POST /api/uploadposts/youtube/subscriptions` | Subscribe the connected channel to a channel (`channel_id`). | | [`unsubscribeYoutubeChannel`](https://docs.upload-post.com/api/youtube-channel-actions) | `DELETE /api/uploadposts/youtube/subscriptions/{subscription_id}` | Unsubscribe. | | [`rateYoutubeVideo`](https://docs.upload-post.com/api/youtube-channel-actions) | `POST /api/uploadposts/youtube/videos/{video_id}/rate` | Like, dislike or remove the rating of a video (`rating`: like, dislike, none). | | [`getYoutubeRating`](https://docs.upload-post.com/api/youtube-channel-actions) | `GET /api/uploadposts/youtube/videos/rating` | The channel's rating of up to 50 videos. | | [`reportYoutubeVideoAbuse`](https://docs.upload-post.com/api/youtube-channel-actions) | `POST /api/uploadposts/youtube/videos/{video_id}/report-abuse` | Report a video (needs `confirm: true`; it cannot be withdrawn). | | [`getYoutubeActivities`](https://docs.upload-post.com/api/youtube-channel-actions) | `GET /api/uploadposts/youtube/activities` | Activity of the channel (uploads, likes, playlist additions...). | #### YouTube: channel settings | Method | Endpoint | What it does | | :-- | :-- | :-- | | [`getYoutubeChannel`](https://docs.upload-post.com/api/youtube-channel) | `GET /api/uploadposts/youtube/channel` | Read the connected channel (settings, branding, translations, statistics). | | [`updateYoutubeChannel`](https://docs.upload-post.com/api/youtube-channel) | `PATCH /api/uploadposts/youtube/channel` | Change the channel settings or translations (only what you send changes). | | [`lookupYoutubeChannel`](https://docs.upload-post.com/api/youtube-channel) | `GET /api/uploadposts/youtube/channel/lookup` | Public data of any channel (`for_handle`, `channel_id`...). | | [`setYoutubeChannelBanner`](https://docs.upload-post.com/api/youtube-channel) | `POST /api/uploadposts/youtube/channel/banner` | Upload and apply the banner: `image` (local file, stream or Buffer) or `image_url`. | | [`listYoutubeChannelSections`](https://docs.upload-post.com/api/youtube-channel) | `GET /api/uploadposts/youtube/channel/sections` | Sections of the channel page. | | [`createYoutubeChannelSection`](https://docs.upload-post.com/api/youtube-channel) | `POST /api/uploadposts/youtube/channel/sections` | Create a section. | | [`updateYoutubeChannelSection`](https://docs.upload-post.com/api/youtube-channel) | `PATCH /api/uploadposts/youtube/channel/sections/{section_id}` | Edit or move a section. | | [`deleteYoutubeChannelSection`](https://docs.upload-post.com/api/youtube-channel) | `DELETE /api/uploadposts/youtube/channel/sections/{section_id}` | Delete a section (needs `confirm: true`). | | [`setYoutubeWatermark`](https://docs.upload-post.com/api/youtube-channel) | `POST /api/uploadposts/youtube/channel/watermark` | Set the watermark: `image` (local file, stream or Buffer) or `image_url`, `timing_type`, `offset_ms`, `duration_ms` (needs `confirm: true`). | | [`removeYoutubeWatermark`](https://docs.upload-post.com/api/youtube-channel) | `DELETE /api/uploadposts/youtube/channel/watermark` | Remove the watermark (needs `confirm: true`). | #### YouTube: live broadcasts and streams | Method | Endpoint | What it does | | :-- | :-- | :-- | | [`listYoutubeBroadcasts`](https://docs.upload-post.com/api/youtube-live) | `GET /api/uploadposts/youtube/live/broadcasts` | List live broadcasts (`status`, `ids`...). | | [`createYoutubeBroadcast`](https://docs.upload-post.com/api/youtube-live) | `POST /api/uploadposts/youtube/live/broadcasts` | Create a broadcast (`title`, `scheduled_start_time`, `privacy_status`...). | | [`getYoutubeBroadcast`](https://docs.upload-post.com/api/youtube-live) | `GET /api/uploadposts/youtube/live/broadcasts/{broadcast_id}` | One broadcast. | | [`updateYoutubeBroadcast`](https://docs.upload-post.com/api/youtube-live) | `PATCH /api/uploadposts/youtube/live/broadcasts/{broadcast_id}` | Edit a broadcast. | | [`deleteYoutubeBroadcast`](https://docs.upload-post.com/api/youtube-live) | `DELETE /api/uploadposts/youtube/live/broadcasts/{broadcast_id}` | Delete a broadcast (needs `confirm: true`). | | [`bindYoutubeBroadcast`](https://docs.upload-post.com/api/youtube-live) | `POST /api/uploadposts/youtube/live/broadcasts/{broadcast_id}/bind` | Bind a stream to the broadcast (`stream_id`), or unbind it. | | [`transitionYoutubeBroadcast`](https://docs.upload-post.com/api/youtube-live) | `POST /api/uploadposts/youtube/live/broadcasts/{broadcast_id}/transition` | Go `testing`, `live` or `complete` (`live` and `complete` need `confirm: true`). | | [`insertYoutubeCuepoint`](https://docs.upload-post.com/api/youtube-live) | `POST /api/uploadposts/youtube/live/broadcasts/{broadcast_id}/cuepoint` | Insert an ad break. | | [`listYoutubeStreams`](https://docs.upload-post.com/api/youtube-live) | `GET /api/uploadposts/youtube/live/streams` | List streams. | | [`createYoutubeStream`](https://docs.upload-post.com/api/youtube-live) | `POST /api/uploadposts/youtube/live/streams` | Create a stream (its key is a secret). | | [`getYoutubeStream`](https://docs.upload-post.com/api/youtube-live) | `GET /api/uploadposts/youtube/live/streams/{stream_id}` | One stream. | | [`updateYoutubeStream`](https://docs.upload-post.com/api/youtube-live) | `PATCH /api/uploadposts/youtube/live/streams/{stream_id}` | Edit a stream. | | [`deleteYoutubeStream`](https://docs.upload-post.com/api/youtube-live) | `DELETE /api/uploadposts/youtube/live/streams/{stream_id}` | Delete a stream (needs `confirm: true`; encoders using its key stop). | #### YouTube: live chat, polls and moderation | Method | Endpoint | What it does | | :-- | :-- | :-- | | [`getYoutubeLiveChat`](https://docs.upload-post.com/api/youtube-live-chat) | `GET /api/uploadposts/youtube/live/chat` | Read the live chat (`broadcast_id` or `live_chat_id`, `page_token`). | | [`sendYoutubeLiveChatMessage`](https://docs.upload-post.com/api/youtube-live-chat) | `POST /api/uploadposts/youtube/live/chat` | Post a message or a poll in the live chat (`idempotency_key` optional). | | [`closeYoutubeLiveChatPoll`](https://docs.upload-post.com/api/youtube-live-chat) | `POST /api/uploadposts/youtube/live/chat/polls/{message_id}/close` | Close a poll. | | [`deleteYoutubeLiveChatMessage`](https://docs.upload-post.com/api/youtube-live-chat) | `DELETE /api/uploadposts/youtube/live/chat/messages/{message_id}` | Delete a chat message (needs `confirm: true`). | | [`listYoutubeLiveModerators`](https://docs.upload-post.com/api/youtube-live-chat) | `GET /api/uploadposts/youtube/live/moderators` | Moderators of the live chat. | | [`addYoutubeLiveModerator`](https://docs.upload-post.com/api/youtube-live-chat) | `POST /api/uploadposts/youtube/live/moderators` | Add a moderator (`channel_id`). | | [`removeYoutubeLiveModerator`](https://docs.upload-post.com/api/youtube-live-chat) | `DELETE /api/uploadposts/youtube/live/moderators/{moderator_id}` | Remove a moderator (the `id` from the list; needs `confirm: true`). | | [`banYoutubeLiveChatUser`](https://docs.upload-post.com/api/youtube-live-chat) | `POST /api/uploadposts/youtube/live/bans` | Ban a user from the chat (`permanent` or `temporary` with `ban_duration_seconds`; needs `confirm: true`). | | [`unbanYoutubeLiveChatUser`](https://docs.upload-post.com/api/youtube-live-chat) | `DELETE /api/uploadposts/youtube/live/bans/{ban_id}` | Lift a ban. | | [`listYoutubeSuperChats`](https://docs.upload-post.com/api/youtube-live-chat) | `GET /api/uploadposts/youtube/live/super-chats` | Super Chats and Super Stickers received. | ### Not generally available yet These hand-written methods call operations that are **not generally available yet**: they answer an error (usually HTTP 503) until the feature is switched on for your account. Generated from `codegen/openapi.json`. | Method | Endpoint | Until it is switched on | | :-- | :-- | :-- | | `listYoutubeBroadcasts` | `GET /api/uploadposts/youtube/live/broadcasts` | Off by default: answers `503` with `youtube_feature_disabled` until the feature is available. | | `createYoutubeBroadcast` | `POST /api/uploadposts/youtube/live/broadcasts` | Off by default: answers `503` with `youtube_feature_disabled` until the feature is available. | | `getYoutubeBroadcast` | `GET /api/uploadposts/youtube/live/broadcasts/{broadcast_id}` | Off by default: answers `503` with `youtube_feature_disabled` until the feature is available. | | `updateYoutubeBroadcast` | `PATCH /api/uploadposts/youtube/live/broadcasts/{broadcast_id}` | Off by default: answers `503` with `youtube_feature_disabled` until the feature is available. | | `deleteYoutubeBroadcast` | `DELETE /api/uploadposts/youtube/live/broadcasts/{broadcast_id}` | Off by default: answers `503` with `youtube_feature_disabled` until the feature is available. | | `bindYoutubeBroadcast` | `POST /api/uploadposts/youtube/live/broadcasts/{broadcast_id}/bind` | Off by default: answers `503` with `youtube_feature_disabled` until the feature is available. | | `transitionYoutubeBroadcast` | `POST /api/uploadposts/youtube/live/broadcasts/{broadcast_id}/transition` | Off by default: answers `503` with `youtube_feature_disabled` until the feature is available. | | `insertYoutubeCuepoint` | `POST /api/uploadposts/youtube/live/broadcasts/{broadcast_id}/cuepoint` | Off by default: answers `503` with `youtube_feature_disabled` until the feature is available. | | `listYoutubeStreams` | `GET /api/uploadposts/youtube/live/streams` | Off by default: answers `503` with `youtube_feature_disabled` until the feature is available. | | `createYoutubeStream` | `POST /api/uploadposts/youtube/live/streams` | Off by default: answers `503` with `youtube_feature_disabled` until the feature is available. | | `getYoutubeStream` | `GET /api/uploadposts/youtube/live/streams/{stream_id}` | Off by default: answers `503` with `youtube_feature_disabled` until the feature is available. | | `updateYoutubeStream` | `PATCH /api/uploadposts/youtube/live/streams/{stream_id}` | Off by default: answers `503` with `youtube_feature_disabled` until the feature is available. | | `deleteYoutubeStream` | `DELETE /api/uploadposts/youtube/live/streams/{stream_id}` | Off by default: answers `503` with `youtube_feature_disabled` until the feature is available. | | `getYoutubeLiveChat` | `GET /api/uploadposts/youtube/live/chat` | Off by default: answers `503` with `youtube_feature_disabled` until the feature is available. | | `sendYoutubeLiveChatMessage` | `POST /api/uploadposts/youtube/live/chat` | Off by default: answers `503` with `youtube_feature_disabled` until the feature is available. | | `closeYoutubeLiveChatPoll` | `POST /api/uploadposts/youtube/live/chat/polls/{message_id}/close` | Off by default: answers `503` with `youtube_feature_disabled` until the feature is available. | | `deleteYoutubeLiveChatMessage` | `DELETE /api/uploadposts/youtube/live/chat/messages/{message_id}` | Off by default: answers `503` with `youtube_feature_disabled` until the feature is available. | | `listYoutubeLiveModerators` | `GET /api/uploadposts/youtube/live/moderators` | Off by default: answers `503` with `youtube_feature_disabled` until the feature is available. | | `addYoutubeLiveModerator` | `POST /api/uploadposts/youtube/live/moderators` | Off by default: answers `503` with `youtube_feature_disabled` until the feature is available. | | `removeYoutubeLiveModerator` | `DELETE /api/uploadposts/youtube/live/moderators/{moderator_id}` | Off by default: answers `503` with `youtube_feature_disabled` until the feature is available. | | `banYoutubeLiveChatUser` | `POST /api/uploadposts/youtube/live/bans` | Off by default: answers `503` with `youtube_feature_disabled` until the feature is available. | | `unbanYoutubeLiveChatUser` | `DELETE /api/uploadposts/youtube/live/bans/{ban_id}` | Off by default: answers `503` with `youtube_feature_disabled` until the feature is available. | | `listYoutubeSuperChats` | `GET /api/uploadposts/youtube/live/super-chats` | Off by default: answers `503` with `youtube_feature_disabled` until the feature is available. | | `listYoutubeComments` | `GET /api/uploadposts/youtube/comments` | Off by default: answers `503` with `youtube_feature_disabled` until the feature is available. | | `createYoutubeComment` | `POST /api/uploadposts/youtube/comments` | Off by default: answers `503` with `youtube_feature_disabled` until the feature is available. | | `listYoutubeCommentReplies` | `GET /api/uploadposts/youtube/comments/replies` | Off by default: answers `503` with `youtube_feature_disabled` until the feature is available. | | `moderateYoutubeComments` | `POST /api/uploadposts/youtube/comments/moderate` | Off by default: answers `503` with `youtube_feature_disabled` until the feature is available. | | `updateYoutubeComment` | `PATCH /api/uploadposts/youtube/comments/{comment_id}` | Off by default: answers `503` with `youtube_feature_disabled` until the feature is available. | | `deleteYoutubeComment` | `DELETE /api/uploadposts/youtube/comments/{comment_id}` | Off by default: answers `503` with `youtube_feature_disabled` until the feature is available. | | `getYoutubeCategories` | `GET /api/uploadposts/youtube/categories` | Off by default: answers `503` with `youtube_feature_disabled` until the feature is available. | | `getYoutubeLanguages` | `GET /api/uploadposts/youtube/languages` | Off by default: answers `503` with `youtube_feature_disabled` until the feature is available. | | `getYoutubeRegions` | `GET /api/uploadposts/youtube/regions` | Off by default: answers `503` with `youtube_feature_disabled` until the feature is available. | | `getYoutubeAbuseReasons` | `GET /api/uploadposts/youtube/abuse-reasons` | Off by default: answers `503` with `youtube_feature_disabled` until the feature is available. | | `searchYoutube` | `GET /api/uploadposts/youtube/search` | Off by default: answers `503` with `youtube_feature_disabled` until the feature is available. | | `listYoutubeSubscriptions` | `GET /api/uploadposts/youtube/subscriptions` | Off by default: answers `503` with `youtube_feature_disabled` until the feature is available. | | `subscribeYoutubeChannel` | `POST /api/uploadposts/youtube/subscriptions` | Off by default: answers `503` with `youtube_feature_disabled` until the feature is available. | | `unsubscribeYoutubeChannel` | `DELETE /api/uploadposts/youtube/subscriptions/{subscription_id}` | Off by default: answers `503` with `youtube_feature_disabled` until the feature is available. | | `getYoutubeRating` | `GET /api/uploadposts/youtube/videos/rating` | Off by default: answers `503` with `youtube_feature_disabled` until the feature is available. | | `rateYoutubeVideo` | `POST /api/uploadposts/youtube/videos/{video_id}/rate` | Off by default: answers `503` with `youtube_feature_disabled` until the feature is available. | | `reportYoutubeVideoAbuse` | `POST /api/uploadposts/youtube/videos/{video_id}/report-abuse` | Off by default: answers `503` with `youtube_feature_disabled` until the feature is available. | | `getYoutubeActivities` | `GET /api/uploadposts/youtube/activities` | Off by default: answers `503` with `youtube_feature_disabled` until the feature is available. | | `getYoutubeChannel` | `GET /api/uploadposts/youtube/channel` | Off by default: answers `503` with `youtube_feature_disabled` until the feature is available. | | `updateYoutubeChannel` | `PATCH /api/uploadposts/youtube/channel` | Off by default: answers `503` with `youtube_feature_disabled` until the feature is available. | | `lookupYoutubeChannel` | `GET /api/uploadposts/youtube/channel/lookup` | Off by default: answers `503` with `youtube_feature_disabled` until the feature is available. | | `setYoutubeChannelBanner` | `POST /api/uploadposts/youtube/channel/banner` | Off by default: answers `503` with `youtube_feature_disabled` until the feature is available. | | `listYoutubeChannelSections` | `GET /api/uploadposts/youtube/channel/sections` | Off by default: answers `503` with `youtube_feature_disabled` until the feature is available. | | `createYoutubeChannelSection` | `POST /api/uploadposts/youtube/channel/sections` | Off by default: answers `503` with `youtube_feature_disabled` until the feature is available. | | `updateYoutubeChannelSection` | `PATCH /api/uploadposts/youtube/channel/sections/{section_id}` | Off by default: answers `503` with `youtube_feature_disabled` until the feature is available. | | `deleteYoutubeChannelSection` | `DELETE /api/uploadposts/youtube/channel/sections/{section_id}` | Off by default: answers `503` with `youtube_feature_disabled` until the feature is available. | | `setYoutubeWatermark` | `POST /api/uploadposts/youtube/channel/watermark` | Off by default: answers `503` with `youtube_feature_disabled` until the feature is available. | | `removeYoutubeWatermark` | `DELETE /api/uploadposts/youtube/channel/watermark` | Off by default: answers `503` with `youtube_feature_disabled` until the feature is available. | | `listYoutubePlaylists` | `GET /api/uploadposts/youtube/playlists` | Off by default: answers `503` with `youtube_feature_disabled` until the feature is available. | | `createYoutubePlaylist` | `POST /api/uploadposts/youtube/playlists` | Off by default: answers `503` with `youtube_feature_disabled` until the feature is available. | | `updateYoutubePlaylist` | `PATCH /api/uploadposts/youtube/playlists/{playlist_id}` | Off by default: answers `503` with `youtube_feature_disabled` until the feature is available. | | `deleteYoutubePlaylist` | `DELETE /api/uploadposts/youtube/playlists/{playlist_id}` | Off by default: answers `503` with `youtube_feature_disabled` until the feature is available. | | `listYoutubePlaylistItems` | `GET /api/uploadposts/youtube/playlists/{playlist_id}/items` | Off by default: answers `503` with `youtube_feature_disabled` until the feature is available. | | `addYoutubePlaylistItem` | `POST /api/uploadposts/youtube/playlists/{playlist_id}/items` | Off by default: answers `503` with `youtube_feature_disabled` until the feature is available. | | `updateYoutubePlaylistItem` | `PATCH /api/uploadposts/youtube/playlists/{playlist_id}/items/{item_id}` | Off by default: answers `503` with `youtube_feature_disabled` until the feature is available. | | `deleteYoutubePlaylistItem` | `DELETE /api/uploadposts/youtube/playlists/{playlist_id}/items/{item_id}` | Off by default: answers `503` with `youtube_feature_disabled` until the feature is available. | | `getYoutubePlaylistImage` | `GET /api/uploadposts/youtube/playlists/{playlist_id}/image` | Off by default: answers `503` with `youtube_feature_disabled` until the feature is available. | | `setYoutubePlaylistImage` | `POST /api/uploadposts/youtube/playlists/{playlist_id}/image` | Off by default: answers `503` with `youtube_feature_disabled` until the feature is available. | | `replaceYoutubePlaylistImage` | `PUT /api/uploadposts/youtube/playlists/{playlist_id}/image` | Off by default: answers `503` with `youtube_feature_disabled` until the feature is available. | | `deleteYoutubePlaylistImage` | `DELETE /api/uploadposts/youtube/playlists/{playlist_id}/image` | Off by default: answers `503` with `youtube_feature_disabled` until the feature is available. | | `listYoutubeCaptions` | `GET /api/uploadposts/youtube/captions` | Off by default: answers `503` with `youtube_feature_disabled` until the feature is available. | | `uploadYoutubeCaption` | `POST /api/uploadposts/youtube/captions` | Off by default: answers `503` with `youtube_feature_disabled` until the feature is available. | | `updateYoutubeCaption` | `PUT /api/uploadposts/youtube/captions/{caption_id}` | Off by default: answers `503` with `youtube_feature_disabled` until the feature is available. | | `deleteYoutubeCaption` | `DELETE /api/uploadposts/youtube/captions/{caption_id}` | Off by default: answers `503` with `youtube_feature_disabled` until the feature is available. | | `downloadYoutubeCaption` | `GET /api/uploadposts/youtube/captions/{caption_id}/download` | Off by default: answers `503` with `youtube_feature_disabled` until the feature is available. | ### Everything else in the API Every operation of the [API reference](https://docs.upload-post.com) has a method. The ones below are generated from the OpenAPI spec, so they stay in step with it. Generated from the OpenAPI spec (`codegen/openapi.json`) by `codegen/generate.py`. Each method takes one options object (camelCase or API names; any other API field is sent as well) and its TypeScript type lists the fields. Methods marked *not generally available* answer HTTP 503 until the feature is switched on for your account. #### Telegram | Method | Endpoint | What it does | | :-- | :-- | :-- | | `sendTelegramGift` | `POST /api/uploadposts/telegram/gifts` | Send a gift from the bot's Stars. *Not generally available.* | | `giftTelegramPremium` | `POST /api/uploadposts/telegram/gifts/premium` | Gift Telegram Premium from the bot's Stars. *Not generally available.* | | `getTelegramPaymentSettings` | `GET /api/uploadposts/telegram/payments/settings` | Automatic pre-checkout rules. | | `updateTelegramPaymentSettings` | `PUT /api/uploadposts/telegram/payments/settings` | Set automatic pre-checkout rules. | | `setTelegramUpdates` | `POST /api/uploadposts/telegram/updates` | Turn Telegram updates on or off. *Not generally available.* | | `answerTelegramQuery` | `POST /api/uploadposts/telegram/answer` | Answer a Telegram query. | | `getTelegramBusinessConnections` | `GET /api/uploadposts/telegram/business-connections` | Telegram Business connections. *Not generally available.* | | `getTelegramBusinessProfile` | `GET /api/uploadposts/telegram/business-profile` | Telegram Business account. *Not generally available.* | | `updateTelegramBusinessProfile` | `PATCH /api/uploadposts/telegram/business-profile` | Update the Telegram Business profile. *Not generally available.* | | `postTelegramStory` | `POST /api/uploadposts/telegram/business-stories` | Post a Telegram story. *Not generally available.* | | `editTelegramStory` | `PATCH /api/uploadposts/telegram/business-stories` | Edit a Telegram story. *Not generally available.* | | `deleteTelegramStory` | `DELETE /api/uploadposts/telegram/business-stories` | Delete a Telegram story. *Not generally available.* | | `repostTelegramStory` | `POST /api/uploadposts/telegram/business-stories/repost` | Repost a Telegram story. *Not generally available.* | | `getTelegramBusinessGifts` | `GET /api/uploadposts/telegram/business-gifts` | Telegram Business gifts. *Not generally available.* | | `manageTelegramBusinessGift` | `POST /api/uploadposts/telegram/business-gifts` | Convert, upgrade, transfer or delete a gift. *Not generally available.* | | `getTelegramBusinessStars` | `GET /api/uploadposts/telegram/business-stars` | Telegram Business Stars balance. *Not generally available.* | | `transferTelegramBusinessStars` | `POST /api/uploadposts/telegram/business-stars/transfer` | Move Stars to the bot. *Not generally available.* | #### Content Upload | Method | Endpoint | What it does | | :-- | :-- | :-- | | `analyzeShorts` | `POST /api/uploadposts/analyze-shorts` | AI titles and captions for a short video. | | `rewriteCaptions` | `POST /api/uploadposts/rewrite-captions` | Translate or rewrite captions with AI. | | `createMediaUpload` | `POST /api/uploadposts/media-uploads` | Get a signed URL to upload a file. | | `completeMediaUpload` | `POST /api/uploadposts/media-uploads/{upload_id}/complete` | Confirm a signed upload. | | `getMediaUpload` | `GET /api/uploadposts/media-uploads/{upload_id}` | Get a signed upload. | | `deleteMediaUpload` | `DELETE /api/uploadposts/media-uploads/{upload_id}` | Delete a signed upload. | #### Upload Management | Method | Endpoint | What it does | | :-- | :-- | :-- | | `getScheduledPost` | `GET /api/uploadposts/schedule/{job_id}` | Get a scheduled post. | | `getScheduledPostThumbnail` | `GET /api/uploadposts/schedule/{job_id}/thumbnail` | Get a scheduled post's thumbnail. | | `getScheduledPostPreview` | `GET /api/uploadposts/schedule/{job_id}/preview` | Preview URLs of a scheduled post. | #### Platform Integration | Method | Endpoint | What it does | | :-- | :-- | :-- | | `createPinterestBoard` | `POST /api/uploadposts/pinterest/boards` | Create a Pinterest board. | | `queryYoutubeAnalytics` | `GET /api/uploadposts/youtube/analytics/query` | Run a YouTube Analytics channel report. *Not generally available.* | | `listYoutubeAnalyticsReports` | `GET /api/uploadposts/youtube/analytics/reports` | YouTube Analytics report catalog. *Not generally available.* | | `listYoutubeAnalyticsGroups` | `GET /api/uploadposts/youtube/analytics/groups` | List YouTube Analytics groups. *Not generally available.* | | `listYoutubeAnalyticsGroupItems` | `GET /api/uploadposts/youtube/analytics/groups/{group_id}/items` | List the items of a YouTube Analytics group. *Not generally available.* | | `getYoutubeAnalyticsUsage` | `GET /api/uploadposts/youtube/analytics/usage` | Daily allowance of YouTube Analytics and bulk reports. *Not generally available.* | | `listYoutubeReportTypes` | `GET /api/uploadposts/youtube/reporting/report-types` | List YouTube bulk report types. *Not generally available.* | | `listYoutubeReportingJobs` | `GET /api/uploadposts/youtube/reporting/jobs` | List YouTube reporting jobs. *Not generally available.* | | `createYoutubeReportingJob` | `POST /api/uploadposts/youtube/reporting/jobs` | Create a YouTube reporting job. *Not generally available.* | | `getYoutubeReportingJob` | `GET /api/uploadposts/youtube/reporting/jobs/{job_id}` | Get a YouTube reporting job. *Not generally available.* | | `deleteYoutubeReportingJob` | `DELETE /api/uploadposts/youtube/reporting/jobs/{job_id}` | Delete a YouTube reporting job. *Not generally available.* | | `listYoutubeReports` | `GET /api/uploadposts/youtube/reporting/jobs/{job_id}/reports` | List the reports of a YouTube reporting job. *Not generally available.* | | `getYoutubeReport` | `GET /api/uploadposts/youtube/reporting/jobs/{job_id}/reports/{report_id}` | Get a YouTube report. *Not generally available.* | | `downloadYoutubeReport` | `GET /api/uploadposts/youtube/reporting/jobs/{job_id}/reports/{report_id}/download` | Download a YouTube report (CSV). *Not generally available.* | | `getYoutubePush` | `GET /api/uploadposts/youtube/push` | YouTube new video notifications status. *Not generally available.* | | `enableYoutubePush` | `POST /api/uploadposts/youtube/push` | Turn on YouTube new video notifications. *Not generally available.* | | `disableYoutubePush` | `DELETE /api/uploadposts/youtube/push` | Turn off YouTube new video notifications. *Not generally available.* | | `getInstagramPublishingLimit` | `GET /api/uploadposts/instagram/publishing_limit` | Instagram publishing quota. | | `getThreadsPublishingLimit` | `GET /api/uploadposts/threads/publishing_limit` | Threads publishing quota. | | `listPinterestBoardSections` | `GET /api/uploadposts/pinterest/boards/{board_id}/sections` | List the sections of a Pinterest board. | | `createPinterestBoardSection` | `POST /api/uploadposts/pinterest/boards/{board_id}/sections` | Create a section in a Pinterest board. | | `getFacebookPageInfo` | `GET /api/uploadposts/facebook/page-info` | Read a Facebook Page's public info. | | `updateFacebookPageInfo` | `PATCH /api/uploadposts/facebook/page-info` | Update a Facebook Page's public info. | | `listRedditSubreddits` | `GET /api/uploadposts/reddit/subreddits` | Subreddits the Reddit account belongs to. | | `getRedditPostTypes` | `GET /api/uploadposts/reddit/post-types` | Post types a subreddit allows. | | `listRedditFlairs` | `GET /api/uploadposts/reddit/flairs` | Post flairs of a subreddit. | #### User Management | Method | Endpoint | What it does | | :-- | :-- | :-- | | `getUserProfile` | `GET /api/uploadposts/users/{username}` | Get a specific user profile. | | `renameUserProfile` | `PATCH /api/uploadposts/users/{username}` | Rename a user profile. | | `disconnectSocialAccount` | `DELETE /api/uploadposts/users/social` | Disconnect a social account from a profile. | | `connectDiscordCredentials` | `POST /api/uploadposts/users/discord/credentials` | Connect Discord with credentials. | | `connectTelegramCredentials` | `POST /api/uploadposts/users/telegram/credentials` | Connect Telegram with credentials. | | `connectSlackCredentials` | `POST /api/uploadposts/users/slack/credentials` | Connect Slack with credentials. | | `connectMastodonCredentials` | `POST /api/uploadposts/users/mastodon/credentials` | Connect Mastodon with credentials. | | `connectNostrCredentials` | `POST /api/uploadposts/users/nostr/credentials` | Connect Nostr with credentials. | | `connectLemmyCredentials` | `POST /api/uploadposts/users/lemmy/credentials` | Connect Lemmy with credentials. | | `connectDevtoCredentials` | `POST /api/uploadposts/users/devto/credentials` | Connect Dev.to with credentials. | | `connectHashnodeCredentials` | `POST /api/uploadposts/users/hashnode/credentials` | Connect Hashnode with credentials. | | `connectWordpressCredentials` | `POST /api/uploadposts/users/wordpress/credentials` | Connect WordPress with credentials. | | `connectWhopCredentials` | `POST /api/uploadposts/users/whop/credentials` | Connect Whop with credentials. | | `connectListmonkCredentials` | `POST /api/uploadposts/users/listmonk/credentials` | Connect Listmonk with credentials. | | `listFacebookPageChoices` | `GET /api/uploadposts/users/facebook-page` | List the Facebook Pages a profile can publish to. | | `setFacebookPage` | `POST /api/uploadposts/users/facebook-page` | Select the Facebook Page used when publishing. | | `clearFacebookPage` | `DELETE /api/uploadposts/users/facebook-page` | Clear the selected Facebook Page. | | `listLinkedinPageChoices` | `GET /api/uploadposts/users/linkedin-page` | List the LinkedIn Pages a profile can publish to. | | `setLinkedinPage` | `POST /api/uploadposts/users/linkedin-page` | Select the LinkedIn Page used when publishing. | | `clearLinkedinPage` | `DELETE /api/uploadposts/users/linkedin-page` | Clear the selected LinkedIn Page. | | `connectBlueskyCredentials` | `POST /api/uploadposts/users/bluesky/credentials` | Connect Bluesky with an app password. | | `setYoutubeOauthClient` | `POST /api/uploadposts/users/youtube/credentials` | Use your own Google OAuth client for a profile's YouTube. | #### Authentication | Method | Endpoint | What it does | | :-- | :-- | :-- | | `getCurrentUser` | `GET /api/uploadposts/me` | Get current user. | | `startOauthConnection` | `POST /api/uploadposts/oauth/{platform}/start` | Connect API: start connecting a social account. | #### FFmpeg Editor | Method | Endpoint | What it does | | :-- | :-- | :-- | | `createFfmpegJob` | `POST /api/uploadposts/ffmpeg/jobs/upload` | Create FFmpeg job. | | `getFfmpegJobStatus` | `GET /api/uploadposts/ffmpeg/jobs/{job_id}` | Get FFmpeg job status. | | `downloadFfmpegResult` | `GET /api/uploadposts/ffmpeg/jobs/{job_id}/download` | Download FFmpeg result. | | `getFfmpegConsumption` | `GET /api/uploadposts/ffmpeg/consumption` | Get FFmpeg consumption. | #### Webhooks | Method | Endpoint | What it does | | :-- | :-- | :-- | | `listWebhookSubscriptions` | `GET /api/uploadposts/webhooks/subscriptions` | List webhook subscriptions. *Not generally available.* | | `createWebhookSubscription` | `POST /api/uploadposts/webhooks/subscriptions` | Create a webhook subscription. *Not generally available.* | | `getWebhookSubscription` | `GET /api/uploadposts/webhooks/subscriptions/{subscription_id}` | Get a webhook subscription. *Not generally available.* | | `deleteWebhookSubscription` | `DELETE /api/uploadposts/webhooks/subscriptions/{subscription_id}` | Delete a webhook subscription. *Not generally available.* | | `testWebhookSubscription` | `POST /api/uploadposts/webhooks/subscriptions/{subscription_id}/test` | Send a test event to a subscription. *Not generally available.* | #### Instagram Interactions | Method | Endpoint | What it does | | :-- | :-- | :-- | | `deleteCommentPost` | `POST /api/uploadposts/comments/delete` | Delete a comment (POST alias). | | `deleteBlueskyChatAccount` | `POST /api/uploadposts/dms/bluesky/account/delete` | Delete the Bluesky chat account. *Not generally available.* | | `listBlueskyMutualGroups` | `GET /api/uploadposts/dms/bluesky/groups` | Bluesky groups shared with someone. *Not generally available.* | | `createBlueskyGroup` | `POST /api/uploadposts/dms/bluesky/groups` | Create a Bluesky group chat. *Not generally available.* | | `editBlueskyGroup` | `PATCH /api/uploadposts/dms/bluesky/groups/{conversation_id}` | Rename, lock or unlock a Bluesky group. *Not generally available.* | | `listBlueskyGroupMembers` | `GET /api/uploadposts/dms/bluesky/groups/{conversation_id}/members` | Bluesky group members. *Not generally available.* | | `addBlueskyGroupMembers` | `POST /api/uploadposts/dms/bluesky/groups/{conversation_id}/members` | Add members to a Bluesky group. *Not generally available.* | | `removeBlueskyGroupMembers` | `DELETE /api/uploadposts/dms/bluesky/groups/{conversation_id}/members` | Remove members from a Bluesky group. *Not generally available.* | | `manageBlueskyJoinLink` | `POST /api/uploadposts/dms/bluesky/groups/{conversation_id}/join-link` | Manage a Bluesky group join link. *Not generally available.* | | `listBlueskyJoinRequests` | `GET /api/uploadposts/dms/bluesky/groups/{conversation_id}/join-requests` | Pending requests to join a Bluesky group. *Not generally available.* | | `answerBlueskyJoinRequest` | `POST /api/uploadposts/dms/bluesky/groups/{conversation_id}/join-requests` | Answer or withdraw a Bluesky join request. *Not generally available.* | | `previewBlueskyJoinLinks` | `GET /api/uploadposts/dms/bluesky/join-links` | Preview Bluesky join links. *Not generally available.* | | `joinBlueskyGroup` | `POST /api/uploadposts/dms/bluesky/join-links` | Ask to join a Bluesky group. *Not generally available.* | | `downloadDmMedia` | `GET /api/uploadposts/dms/media` | Download a DM attachment. | #### Bluesky | Method | Endpoint | What it does | | :-- | :-- | :-- | | `blueskyGraphAction` | `POST /api/uploadposts/bluesky/graph` | Follow, block or mute (one target per call). *Not generally available.* | | `listBlueskyLists` | `GET /api/uploadposts/bluesky/lists` | The account's lists. *Not generally available.* | | `createBlueskyList` | `POST /api/uploadposts/bluesky/lists` | Create a list. *Not generally available.* | | `getBlueskyList` | `GET /api/uploadposts/bluesky/lists/{list_id}` | A list and its members. *Not generally available.* | | `updateBlueskyList` | `PATCH /api/uploadposts/bluesky/lists/{list_id}` | Update a list. *Not generally available.* | | `deleteBlueskyList` | `DELETE /api/uploadposts/bluesky/lists/{list_id}` | Delete a list and its members. *Not generally available.* | | `listBlueskyListMembers` | `GET /api/uploadposts/bluesky/lists/{list_id}/members` | List members. *Not generally available.* | | `addBlueskyListMember` | `POST /api/uploadposts/bluesky/lists/{list_id}/members` | Add a member. *Not generally available.* | | `removeBlueskyListMember` | `DELETE /api/uploadposts/bluesky/lists/{list_id}/members` | Remove a member. *Not generally available.* | | `optOutBlueskyList` | `POST /api/uploadposts/bluesky/lists/opt-out` | Ask not to appear in a reference list. *Not generally available.* | | `removeOptOutBlueskyList` | `DELETE /api/uploadposts/bluesky/lists/opt-out` | Withdraw the opt-out. *Not generally available.* | | `listBlueskyStarterPacks` | `GET /api/uploadposts/bluesky/starter-packs` | The account's starter packs. *Not generally available.* | | `createBlueskyStarterPack` | `POST /api/uploadposts/bluesky/starter-packs` | Create a starter pack. *Not generally available.* | | `getBlueskyStarterPack` | `GET /api/uploadposts/bluesky/starter-packs/{pack_id}` | A starter pack. *Not generally available.* | | `updateBlueskyStarterPack` | `PATCH /api/uploadposts/bluesky/starter-packs/{pack_id}` | Update a starter pack. *Not generally available.* | | `deleteBlueskyStarterPack` | `DELETE /api/uploadposts/bluesky/starter-packs/{pack_id}` | Delete a starter pack. *Not generally available.* | | `listBlueskyFeeds` | `GET /api/uploadposts/bluesky/feeds` | Feeds declared by the account. *Not generally available.* | | `createBlueskyFeed` | `POST /api/uploadposts/bluesky/feeds` | Declare a custom feed. *Not generally available.* | | `updateBlueskyFeed` | `PATCH /api/uploadposts/bluesky/feeds/{rkey}` | Update a feed declaration. *Not generally available.* | | `deleteBlueskyFeed` | `DELETE /api/uploadposts/bluesky/feeds/{rkey}` | Delete a feed declaration. *Not generally available.* | | `reportOnBluesky` | `POST /api/uploadposts/bluesky/report` | Report a post or account to Bluesky moderation. *Not generally available.* | #### Teams and Approvals | Method | Endpoint | What it does | | :-- | :-- | :-- | | `listPostApprovals` | `GET /api/uploadposts/approvals` | List posts awaiting approval. *Not generally available.* | | `getPostApproval` | `GET /api/uploadposts/approvals/{approval_id}` | Get a post awaiting approval. *Not generally available.* | | `editPostApproval` | `PATCH /api/uploadposts/approvals/{approval_id}` | Edit a post awaiting approval. *Not generally available.* | | `withdrawPostApproval` | `DELETE /api/uploadposts/approvals/{approval_id}` | Withdraw or discard a post awaiting approval. *Not generally available.* | | `approvePostApproval` | `POST /api/uploadposts/approvals/{approval_id}/approve` | Approve a post. *Not generally available.* | | `rejectPostApproval` | `POST /api/uploadposts/approvals/{approval_id}/reject` | Reject a post. *Not generally available.* | | `listClientPostApprovals` | `GET /api/uploadposts/approvals/client` | End client: list posts to approve. *Not generally available.* | | `approveClientPostApproval` | `POST /api/uploadposts/approvals/client/{approval_id}/approve` | End client: approve a post. *Not generally available.* | | `rejectClientPostApproval` | `POST /api/uploadposts/approvals/client/{approval_id}/reject` | End client: reject a post. *Not generally available.* | | `getTeamRoles` | `GET /api/uploadposts/teams/roles` | Team roles and your role. | | `listTeamAudit` | `GET /api/uploadposts/teams/audit` | Team activity log. | #### Feedback | Method | Endpoint | What it does | | :-- | :-- | :-- | | `sendFeedback` | `POST /api/uploadposts/feedback` | Send feedback to the Upload-Post team. | #### Google Business | Method | Endpoint | What it does | | :-- | :-- | :-- | | `updateGoogleBusinessAccount` | `PATCH /api/uploadposts/google-business/accounts` | Rename a Google Business account. *Not generally available.* | | `createGoogleBusinessAdmin` | `POST /api/uploadposts/google-business/admins` | Invite an admin. *Not generally available.* | | `updateGoogleBusinessAdmin` | `PATCH /api/uploadposts/google-business/admins` | Change an admin's role. *Not generally available.* | | `deleteGoogleBusinessAdmin` | `DELETE /api/uploadposts/google-business/admins` | Remove an admin. *Not generally available.* | | `acceptGoogleBusinessInvitation` | `POST /api/uploadposts/google-business/invitations/accept` | Accept an invitation. *Not generally available.* | | `declineGoogleBusinessInvitation` | `POST /api/uploadposts/google-business/invitations/decline` | Decline an invitation. *Not generally available.* | | `transferGoogleBusinessLocation` | `POST /api/uploadposts/google-business/locations/transfer` | Transfer a location to another account. *Not generally available.* | | `createGoogleBusinessLocation` | `POST /api/uploadposts/google-business/locations/create` | Create a location. *Not generally available.* | | `deleteGoogleBusinessLocation` | `DELETE /api/uploadposts/google-business/locations/delete` | Delete a location. *Not generally available.* | | `getGoogleBusinessNotificationSettings` | `GET /api/uploadposts/google-business/notifications` | Get real-time notification settings. *Not generally available.* | | `updateGoogleBusinessNotificationSettings` | `PUT /api/uploadposts/google-business/notifications` | Turn real-time notifications on or off. *Not generally available.* | | `startGoogleBusinessVerification` | `POST /api/uploadposts/google-business/verification/start` | Start a verification. *Not generally available.* | | `completeGoogleBusinessVerification` | `POST /api/uploadposts/google-business/verification/complete` | Enter the verification code. *Not generally available.* | | `generateGoogleBusinessVerificationToken` | `POST /api/uploadposts/google-business/verification/token` | Get an instant verification token. *Not generally available.* | #### ChatGPT Ads | Method | Endpoint | What it does | | :-- | :-- | :-- | | `connectChatgptAdsAccount` | `POST /api/uploadposts/ads/chatgpt/connect` | Connect a ChatGPT Ads account. | | `listChatgptAdsAccounts` | `GET /api/uploadposts/ads/chatgpt/accounts` | List connected ChatGPT Ads accounts. | | `disconnectChatgptAdsAccount` | `DELETE /api/uploadposts/ads/chatgpt/accounts/{ad_account_id}` | Disconnect a ChatGPT Ads account. | | `getChatgptAdsAccount` | `GET /api/uploadposts/ads/chatgpt/account` | Get live ad account metadata. | | `listChatgptAdsCampaigns` | `GET /api/uploadposts/ads/chatgpt/campaigns` | List campaigns. | | `createChatgptAdsCampaign` | `POST /api/uploadposts/ads/chatgpt/campaigns` | Create a campaign. | | `getChatgptAdsCampaign` | `GET /api/uploadposts/ads/chatgpt/campaigns/{campaign_id}` | Get a campaign. | | `updateChatgptAdsCampaign` | `POST /api/uploadposts/ads/chatgpt/campaigns/{campaign_id}` | Update a campaign. | | `activateChatgptAdsCampaign` | `POST /api/uploadposts/ads/chatgpt/campaigns/{campaign_id}/activate` | Activate a campaign. | | `pauseChatgptAdsCampaign` | `POST /api/uploadposts/ads/chatgpt/campaigns/{campaign_id}/pause` | Pause a campaign. | | `archiveChatgptAdsCampaign` | `POST /api/uploadposts/ads/chatgpt/campaigns/{campaign_id}/archive` | Archive a campaign. | | `getChatgptAdsCampaignInsights` | `GET /api/uploadposts/ads/chatgpt/campaigns/{campaign_id}/insights` | Get campaign insights. | | `listChatgptAdsAdGroups` | `GET /api/uploadposts/ads/chatgpt/adgroups` | List ad groups. | | `createChatgptAdsAdGroup` | `POST /api/uploadposts/ads/chatgpt/adgroups` | Create an ad group. | | `getChatgptAdsAdGroup` | `GET /api/uploadposts/ads/chatgpt/adgroups/{ad_group_id}` | Get an ad group. | | `updateChatgptAdsAdGroup` | `POST /api/uploadposts/ads/chatgpt/adgroups/{ad_group_id}` | Update an ad group. | | `activateChatgptAdsAdGroup` | `POST /api/uploadposts/ads/chatgpt/adgroups/{ad_group_id}/activate` | Activate an ad group. | | `pauseChatgptAdsAdGroup` | `POST /api/uploadposts/ads/chatgpt/adgroups/{ad_group_id}/pause` | Pause an ad group. | | `archiveChatgptAdsAdGroup` | `POST /api/uploadposts/ads/chatgpt/adgroups/{ad_group_id}/archive` | Archive an ad group. | | `getChatgptAdsAdGroupInsights` | `GET /api/uploadposts/ads/chatgpt/adgroups/{ad_group_id}/insights` | Get ad group insights. | | `listChatgptAdsAds` | `GET /api/uploadposts/ads/chatgpt/ads` | List ads. | | `createChatgptAdsAd` | `POST /api/uploadposts/ads/chatgpt/ads` | Create an ad. | | `getChatgptAdsAd` | `GET /api/uploadposts/ads/chatgpt/ads/{ad_id}` | Get an ad. | | `updateChatgptAdsAd` | `POST /api/uploadposts/ads/chatgpt/ads/{ad_id}` | Update an ad. | | `activateChatgptAdsAd` | `POST /api/uploadposts/ads/chatgpt/ads/{ad_id}/activate` | Activate an ad. | | `pauseChatgptAdsAd` | `POST /api/uploadposts/ads/chatgpt/ads/{ad_id}/pause` | Pause an ad. | | `archiveChatgptAdsAd` | `POST /api/uploadposts/ads/chatgpt/ads/{ad_id}/archive` | Archive an ad. | | `getChatgptAdsAdInsights` | `GET /api/uploadposts/ads/chatgpt/ads/{ad_id}/insights` | Get ad insights. | | `previewChatgptAdsAd` | `POST /api/uploadposts/ads/chatgpt/ads/{ad_id}/preview` | Preview an ad. | | `uploadChatgptAdsCreative` | `POST /api/uploadposts/ads/chatgpt/creatives` | Upload a creative image. | | `getChatgptAdsAccountInsights` | `GET /api/uploadposts/ads/chatgpt/insights` | Get ad account insights. | | `promoteChatgptAds` | `POST /api/uploadposts/ads/chatgpt/promote` | Launch an ad in one call. | ## What a TikTok connection can do (`capabilities`) Not every TikTok connection can do the same things. `listUsers()` (`GET /api/uploadposts/users`) returns a `capabilities` array on each profile's TikTok account; check it before offering a feature. | Capability | What it unlocks | | --- | --- | | `music` | `tiktokMusicId` and the volume/trim fields, plus `getTiktokTrendingMusic()` and `searchTiktokMusic()` | | `location` | `tiktokLocationId` / `tiktokLocationName`, plus `getTiktokLocations()` | | `cover_image` | `tiktokCoverImageUrl` | | `cover_timestamp` | `tiktokCoverTimestamp` | | `draft` | `tiktokUploadToDraft` | | `video_privacy` | `tiktokPrivacyLevel` on video | | `photo_privacy` | `tiktokPrivacyLevel` on photo posts | | `profile_analytics` | `getAudience()` and `getSuggestions({ type: 'hashtags' })` with `platform: 'tiktok'` | | `comments` | Comments on TikTok: `getPostComments()` (top-level and replies), `createComment()`, `deleteComment()`, `commentAction()` and `tiktokFirstComment` | | `trend_search` | `getSuggestions({ type: 'keywords' })` with `platform: 'tiktok'` | > **`comments` and `trend_search` need the account to be reconnected.** TikTok > grants them at connect time, so an account linked before they existed keeps > working for everything else but will not list them — reconnect it from Manage > Users to enable them. If a connection lacks a capability the upload field is simply ignored: the post still publishes and the response carries a per-field `warnings` entry. The methods above answer with an error asking for a reconnection. ## TikTok music, location, cover and drafts > Needs the `music`, `location`, `cover_image` or `draft` capability — see > [What a TikTok connection can do](#what-a-tiktok-connection-can-do-capabilities). ```javascript // 1. Pick a track and a place const { tracks } = await client.getTiktokTrendingMusic('my-profile', { countryCode: 'ES' }); // ...or find one by name. TikTok has no music search endpoint, so this searches // the trending charts Upload-Post caches, not TikTok's whole catalogue. // const { tracks } = await client.searchTiktokMusic('my-profile', { q: 'bossa', countryCode: 'ES' }); const { locations } = await client.getTiktokLocations('my-profile', 'Madrid'); // 2. Publish with them await client.upload('./video.mp4', { title: 'Shot in Madrid', user: 'my-profile', platforms: ['tiktok'], tiktokMusicId: tracks[0].id, tiktokMusicVolume: 70, // 0-100, defaults to 50 when music is set tiktokMusicStart: 0, // ms tiktokMusicEnd: 15000, // ms tiktokOriginalSoundVolume: 30, // 0-100, defaults to 50 so the original audio is not muted tiktokLocationId: locations[0].location_id, tiktokLocationName: locations[0].location_name, // required together with the id tiktokCoverImageUrl: 'https://example.com/cover.jpg', tiktokIsAiGenerated: false, tiktokUploadToDraft: true, // same draft as postMode: 'MEDIA_UPLOAD' // postMode: 'MEDIA_UPLOAD', // alias of the same draft }); ``` #### Analytics of a draft A draft has no post until the creator publishes it from the TikTok app. Ask `getPostAnalytics(requestId)` after that: Upload-Post finds the post that came from the draft and returns its metrics with `platform_post_id`, `post_url` and `original_publish_id` (the upload's TikTok `publish_id`). While the draft is still in the inbox, `post_metrics_error` says so. TikTok only gives the id of a **public** post that passed moderation, so a draft published as private never gets per-post analytics; after 30 days without a post, use `getPostAnalyticsByPlatformId()` with the TikTok post id. ### Options | Option | Type | Notes | | --- | --- | --- | | `tiktokMusicId` | string | The track `id` from `getTiktokTrendingMusic()` or `searchTiktokMusic()` (not `commercial_music_id`) | | `tiktokMusicVolume` | number | 0-100. Defaults to 50 when music is set | | `tiktokMusicStart` | number | Music start offset in ms | | `tiktokMusicEnd` | number | Music end offset in ms | | `tiktokOriginalSoundVolume` | number | 0-100. Defaults to 50 when music is set, so the original audio is not muted | | `tiktokLocationId` | string | `location_id` from `getTiktokLocations()` | | `tiktokLocationName` | string | Required whenever `tiktokLocationId` is set | | `tiktokCoverImageUrl` | string | Custom cover image URL | | `tiktokIsAiGenerated` | boolean | AI-generated content disclosure | | `tiktokUploadToDraft` | boolean | Publish to drafts (same as `postMode: 'MEDIA_UPLOAD'` / `tiktokPostMode: 'MEDIA_UPLOAD'`). Aliases: `uploadToDraft`, `tiktok_upload_to_draft`, `upload_to_draft`. TikTok ignores the rest of the post settings | | `tiktokPhotoCoverIndex` | number | Cover photo index for photo posts (0-based) | | `tiktokIsAdsOnly` | boolean | Only show the video in ads | | `tiktokTtoInviteLink` | string | TikTok One invite link (requires branded content) | ## Platform-Specific Options ### TikTok (Video) - `tiktokPrivacyLevel` - PUBLIC_TO_EVERYONE, MUTUAL_FOLLOW_FRIENDS, FOLLOWER_OF_CREATOR, SELF_ONLY - `tiktokDisableDuet` - Disable duet - `tiktokDisableComment` - Disable comments - `tiktokDisableStitch` - Disable stitch - `tiktokCoverTimestamp` - Timestamp in ms for cover - `tiktokIsAigc` - AI-generated content flag - `tiktokPostMode` / `postMode` - DIRECT_POST or MEDIA_UPLOAD. `MEDIA_UPLOAD` is the same draft as `tiktokUploadToDraft` - `brandContentToggle` - Branded content toggle - `brandOrganicToggle` - Brand organic toggle - `tiktokIsAdsOnly` - Only show the video in ads - `tiktokTtoInviteLink` - TikTok One invite link (requires branded content) > **Which privacy levels are available is decided by TikTok per account.** A > private account, for example, is offered `FOLLOWER_OF_CREATOR`, > `MUTUAL_FOLLOW_FRIENDS` and `SELF_ONLY` and has no `PUBLIC_TO_EVERYONE`. > Asking for one the account does not have fails with > `error_code: "tiktok_privacy_unavailable"` and an error listing the ones it > does have. Omit `tiktokPrivacyLevel` on video and TikTok keeps the account's > own default; on **photo** posts it defaults to `PUBLIC_TO_EVERYONE`. See [TikTok music, location, cover and drafts](#tiktok-music-location-cover-and-drafts) for those options. ### TikTok (Photos) - `tiktokAutoAddMusic` - Auto add music - `tiktokPhotoCoverIndex` - Index of photo for cover (0-based) - `tiktokDisableComment` - Disable comments - `tiktokPrivacyLevel` - PUBLIC_TO_EVERYONE, MUTUAL_FOLLOW_FRIENDS, FOLLOWER_OF_CREATOR, SELF_ONLY (same field and same per-account limits as video) - `tiktokMusicId` - Commercial Music Library track id (see `getTiktokTrendingMusic`) - `tiktokLocationId` / `tiktokLocationName` - Location tag, both required together - `tiktokIsAiGenerated` - AI-generated content disclosure - `tiktokPostMode` / `postMode` - DIRECT_POST or MEDIA_UPLOAD. `MEDIA_UPLOAD` is the same draft as `tiktokUploadToDraft` - `tiktokUploadToDraft` - Publish to drafts (same draft as `postMode: 'MEDIA_UPLOAD'`) > TikTok's photo contract takes the music track id alone: `tiktokMusicVolume`, > `tiktokMusicStart`, `tiktokMusicEnd`, `tiktokOriginalSoundVolume` and > `tiktokCoverImageUrl` are video-only. Draft (`tiktokUploadToDraft` / > `postMode: 'MEDIA_UPLOAD'`) works on video and photos. ### Instagram - `instagramMediaType` - REELS, STORIES, IMAGE - `instagramShareToFeed` - Share to feed (for Reels/Stories) - `instagramCollaborators` - Comma-separated collaborator usernames - `instagramCoverUrl` - Custom cover URL - `instagramAudioName` - Audio track name - `instagramUserTags` - Comma-separated user tags - `instagramLocationId` - Location ID - `instagramThumbOffset` - Thumbnail offset - `instagramAltText` - Alt text on photos (string or list, ≤1000 chars each) - `instagramShareMode` - Trial Reels: `TRIAL_REELS_SHARE_TO_FOLLOWERS_IF_LIKED` or `TRIAL_REELS_DONT_SHARE_TO_FOLLOWERS` (videos only) - `instagramIsAiGenerated` - AI-generated content label (sent as the generic `is_ai_generated`, which other platforms in the same post also read) ### YouTube - `youtubeTags` - Array or comma-separated tags - `youtubeCategoryId` - Category ID (default: "22" People & Blogs) - `youtubePrivacyStatus` - public, unlisted, private - `youtubeEmbeddable` - Allow embedding - `youtubeLicense` - youtube, creativeCommon - `youtubePublicStatsViewable` - Show public stats - `youtubeThumbnailUrl` - Custom thumbnail URL - `youtubeSelfDeclaredMadeForKids` - Made for kids (COPPA) - `youtubeContainsSyntheticMedia` - AI/synthetic content flag - `youtubeDefaultLanguage` - Title/description language (BCP-47) - `youtubeDefaultAudioLanguage` - Audio language (BCP-47) - `youtubeAllowedCountries` / `youtubeBlockedCountries` - Country restrictions - `youtubeHasPaidProductPlacement` - Paid placement flag - `youtubeRecordingDate` - Recording date (ISO 8601) - `youtubeNotifySubscribers` - Notify subscribers (default true) - `youtubePublishAt` - RFC3339 time; video stays private until then - `youtubeLocalizations` - Translated title/description per language: `{ es: { title, description } }` - `youtubeBrandPartner` - Brand partner channel id (`UC…`) for creator-initiated brand partner access ### LinkedIn - `linkedinVisibility` - PUBLIC, CONNECTIONS, LOGGED_IN, CONTAINER - `targetLinkedinPageId` - Page ID for organization posts - `linkedinAltText` - Alt text per image - `linkedinDisableReshare` - Disable reshare - `linkedinLinkTitle` / `linkedinLinkDescription` / `linkedinThumbnailAltText` - Link-share overrides - `linkedinTargetGeoLocations` / `linkedinTargetIndustries` / `linkedinTargetSeniorities` / `linkedinTargetJobFunctions` / `linkedinTargetStaffCountRanges` / `linkedinTargetInterfaceLocales` / `linkedinTargetDegrees` / `linkedinTargetFieldsOfStudy` / `linkedinTargetOrganizations` - Organic Page targeting - `linkedinTargetEntities` - Raw targeting facets JSON - `linkedinTargetCheckAudience` - Reject if LinkedIn reports audience under 300 - `linkedinSubtitles` / `linkedinSubtitlesUrl` / `linkedinSubtitlesText` - English SRT captions on video ### Facebook - `facebookPageId` - Facebook Page ID (required) - `facebookVideoState` - PUBLISHED, DRAFT - `facebookMediaType` - REELS, STORIES, VIDEO (VIDEO for normal page videos with no 9:16 restriction) - `thumbnailUrl` - URL for custom video cover (generic field, also read by X, YouTube and LinkedIn; on Facebook only when facebookMediaType is VIDEO) - `facebookLinkUrl` - URL for text posts - `facebookAltText` - Alt text per photo - `facebookMediaType` on photos - POSTS (feed, default) or STORIES (Page photo story) - `facebookPlaceId` - Place ID - `facebookTargeting` / `facebookFeedTargeting` - Audience JSON - `facebookCallToAction` / `facebookChildAttachments` / `facebookMultiShareEndCard` - Link posts - `facebookIsAiGenerated` - AI disclosure on Reels - `facebookUnpublishedContentType` - DRAFT, INLINE_CREATED, ADS_POST, PUBLISHED (do not send SCHEDULED; use `scheduledDate`) - `facebookNoStory` / `facebookSecret` - Page video flags - `facebookCollaborators` - Page IDs to invite on Reels ### Pinterest - `pinterestBoardId` - Board ID - `pinterestLink` - Destination link - `pinterestAltText` - Alt text for photos - `pinterestCoverImageUrl` - Cover image URL (video) - `pinterestCoverImageKeyFrameTime` - Key frame time in seconds (values larger than the video duration are treated as milliseconds) - `pinterestBoardSectionId` - Board section ID - `pinterestAiDisclosures` - `AI_MODIFIED` and/or `SYNTHETIC_PERFORMER` - `pinterestCarouselTitles` / `pinterestCarouselDescriptions` / `pinterestCarouselLinks` / `pinterestCarouselIndex` - 2–5 photo carousel ### X (Twitter) - `xReplySettings` - everyone, following, mentionedUsers, subscribers, verified - `xNullcast` - Promoted-only post - `xTaggedUserIds` - User IDs to tag - `xPlaceId` / `xGeoPlaceId` - Location place ID - `xQuoteTweetId` - Tweet ID to quote (X API Enterprise plan) - `xPollOptions` - Poll options (2-4) - `xPollDuration` - Poll duration in minutes (5-10080) - `xForSuperFollowersOnly` - Exclusive for super followers - `xCommunityId` - Community ID - `xShareWithFollowers` - Share community post with followers - `xCardUri` - Card URI for Twitter Cards - `xLongTextAsPost` - Post long text as single post - `xThreadImageLayout` - Comma-separated image layout for thread (e.g. "4,4" or "2,3,1") - `xAltText` - Alt text (≤1000 chars) - `xSubtitles` / `xSubtitlesUrl` / `xSubtitlesLanguage` / `xSubtitlesName` - Video captions - `xPaidPartnership` - Paid partnership label - `madeWithAi` - Disclose AI-generated media on X (`made_with_ai`; alias `isAiGenerated`) - `thumbnailUrl` - Custom video cover (generic field; applied by X as the post's preview image) - `xArticleTitle` / `xArticleBody` / `xArticleContentState` / `xArticleDraft` / `xArticleCoverMedia` - X Articles (Premium). Articles have two heading levels: `###` and `header-three` become `header-two` ### Threads - `threadsLongTextAsPost` - Post long text as single post (vs thread) - `threadsThreadMediaLayout` - Comma-separated list of how many media items to include in each Threads post. Each value must be 1-20, and the total must equal the number of files. Example: '5,5' splits 10 items into 2 posts with 5 each. If omitted and more than 20 items are provided, auto-chunks into groups of 20. - `threadsTopicTag` - Topic tag for the Threads post (1-50 characters, no periods or ampersands). One tag per post. Helps increase reach. - `threadsReplyControl` - Who can reply (`everyone`, `accounts_you_follow`, `mentioned_only`, `parent_post_author_only`, `followers_only`) - `threadsAltText` - Alt text per image/video - `threadsReplyToId` / `threadsQuotePostId` - Reply or quote - `threadsLinkAttachment` - Force a link preview (text) - `threadsPollOptions` - 2–4 poll options (text) - `threadsAutoPublishText` - Skip the second publish call on text ### Reddit Reddit is currently unavailable. Uploads, OAuth and comments return HTTP 503 with `error_code=reddit_unavailable`. - `redditSubreddit` - Subreddit name (without r/) - `redditFlairId` - Flair template ID - `redditNsfw` / `redditSpoiler` / `redditResubmit` / `redditSendReplies` - Post flags - `redditFlairText` - Custom text for editable flairs - `redditGalleryCaptions` / `redditGalleryUrls` - Per-image captions and outbound URLs ### Bluesky - `blueskyAltText` - Alt text per image/video - `blueskyLangs` - Up to 3 BCP-47 language codes - `blueskyLabels` - `porn`, `sexual`, `nudity`, `graphic-media` - `blueskyGallery` - Publish up to 10 images as a gallery (`app.bsky.embed.gallery`). With 11 or more, the first 10 are published and the response carries a `warnings` entry; without it, Bluesky takes the first 4 - `blueskyThreadgate` / `blueskyReplySettings` - Who can reply - `blueskyPostgate` / `blueskyQuoteSettings` - Block quotes with `disable_quotes` - `blueskyQuoteUri` - Quote a post (URL or `at://` URI) - `blueskyTags` - Up to 8 extra hashtags stored on the post, not shown in the text - `blueskyCreatedAt` - Date Bluesky shows the post with (ISO 8601 with timezone, not in the future) - `blueskyThreadOverflow` - Text over 300 characters goes on as replies instead of being cut - `blueskyGifAsVideo` - A single animated GIF published as a looping video - `blueskyCaptions` - Video subtitles: `[{ lang: 'es', url: 'https://.../es.vtt' }]` (WebVTT) - `blueskyVideoPresentation` - `default` or `gif` ### Discord - `discordThreadId` / `discordThreadName` / `discordAppliedTags` - Thread / forum - `discordEmbeds` / `discordUsername` / `discordAvatarUrl` / `discordAllowedMentions` - `discordAltText` / `discordFlags` / `discordTts` / `discordPoll` / `discordMaxFileMb` ### Telegram - `telegramParseMode` - `MarkdownV2` or `HTML` - `telegramMessageThreadId` - Forum topic - `telegramDisableNotification` / `telegramProtectContent` / `telegramHasSpoiler` - `telegramLinkPreview` / `telegramReplyMarkup` / `telegramCaptionOverflow` (`truncate` or `split`) - `telegramAsDocument` / `telegramMediaUrls` - `telegramTitle` / `telegramFirstComment` - Telegram text and first comment - `telegramPoll` / `telegramLocation` / `telegramVenue` / `telegramContact` / `telegramDice` / `telegramGameShortName` - Send a poll, a (live) location, a venue, a contact or a dice instead of a plain message (Telegram's JSON shapes) - `telegramPin` / `telegramPinNotify` - Pin the message after sending it - `telegramReplyToMessageId` / `telegramReplyQuote` / `telegramReplyParameters` - Reply to a message - `telegramLinkPreviewOptions` / `telegramEntities` / `telegramCaptionEntities` / `telegramShowCaptionAboveMedia` - Formatting - `telegramFirstCommentAsReply` - The first comment as a reply to the post (default `true`) - `telegramDirectMessagesTopicId` / `telegramSuggestedPostParameters` / `telegramEphemeralMessageParameters` / `telegramMessageEffectId` - `telegramSendAs` (`animation`, `video_note`, `live_photo`, `document`, `audio`, `voice`...) with `telegramPerformer` / `telegramTitleAudio` / `telegramDuration` / `telegramLength` / `telegramEmoji` / `telegramLivePhotoPhoto` - `telegramPaidStarCount` / `telegramPaidPayload` - Paid media unlocked with Telegram Stars - `telegramCover` / `telegramThumbnail` / `telegramStartTimestamp` / `telegramSendByUrl` / `telegramDisableContentTypeDetection` ### Mastodon - `mastodonVisibility` - `public`, `unlisted`, `private`, `direct` - `mastodonSensitive` / `mastodonSpoilerText` / `mastodonLanguage` / `mastodonAltText` - `mastodonPollOptions` / `mastodonPollExpiresIn` / `mastodonPollMultiple` - `mastodonScheduledAt` - ISO 8601, at least 5 minutes ahead ### WordPress - `wordpressStatus` / `wordpressDate` / `wordpressCategories` / `wordpressTags` - `wordpressExcerpt` / `wordpressSlug` / `wordpressAltText` / `wordpressMediaCaption` - `wordpressBlockFormat` ### Lemmy - `lemmyUrl` / `lemmyCommunity` / `lemmyNsfw` / `lemmyLanguageId` / `lemmyAltText` ### Slack - `slackMarkdown` / `slackBlocks` / `slackMrkdwn` / `slackAltText` - `slackFirstCommentMode` - `separate` (default) or `inline` ### Nostr - `nostrKind` - `1`, `20`, `22`, `34235`, `30023` - `nostrLongForm` - kind 30023 ### Dev.to - `devtoTags` / `devtoCanonicalUrl` / `devtoDescription` / `devtoMainImage` / `devtoSeries` / `devtoPublished` ### Hashnode - `hashnodeTags` / `hashnodeOriginalArticleUrl` / `hashnodeSubtitle` / `hashnodeCoverImageUrl` - `hashnodeDraft` / `hashnodeBody` (alias `content`) ### Whop - `whopBody` / `whopPinned` / `whopIsMention` / `whopPaywallAmount` / `whopPaywallCurrency` / `whopAttachmentIds` ### Listmonk - `listmonkContentType` / `listmonkSendAt` / `listmonkLists` / `listmonkTemplateId` / `listmonkMediaIds` ## Common Options These options work across all upload methods: | Option | Description | |--------|-------------| | `title` | Post title/caption (required) | | `user` | Profile name (required) | | `platforms` | Target platforms array (required) | | `firstComment` | First comment to post | | `tiktokFirstComment` | First comment for TikTok only (needs the `comments` capability) | | `replyToId` | Publish as a reply to an existing post (X: tweet ID; Bluesky: post URL or AT-URI). Alias: `xReplyToId` | | `altText` | Alt text for accessibility | | `scheduledDate` | ISO date for scheduling | | `timezone` | Timezone for scheduled date | | `addToQueue` | Add to posting queue | | `maxPostsPerSlot` | Max posts per queue slot (overrides profile setting) | | `asyncUpload` | Process asynchronously (default: true) | | `idempotencyKey` | Collapses duplicate uploads within 24h. Reuse the same value when retrying. Alias: `requestId` | | `paidPartnership` | Sponsored post. Mapped to each network's native label (TikTok `brand_content_toggle`, YouTube `hasPaidProductPlacement`, X `paid_partnership`); Facebook and Pinterest also need `facebookSponsorId` / `pinterestSponsorId`. Networks without a label publish without it, with a warning. A network-specific field wins. TikTok's own switch: `tiktokDiscloseCommercial` with `tiktokYourBrand` / `tiktokBrandedContent` | ## Google Business Profile Pass the target location on the upload itself. There is no separate "select a location" call — the API resolves the location per post. ```javascript const { locations } = await client.getGoogleBusinessLocations('myprofile'); await client.upload('video.mp4', { user: 'myprofile', platforms: ['google_business'], title: 'Now open on Sundays', gbpLocationId: locations[0].name, // "accounts/123/locations/456" }); ``` `gbpLocationId` is **required when the account has more than one location** — the API only auto-selects when exactly one exists. Beyond a standard post you can publish an event or an offer: ```javascript await client.uploadText({ user: 'myprofile', platforms: ['google_business'], title: 'Summer sale', gbpLocationId: locations[0].name, gbpTopicType: 'OFFER', gbpOfferCoupon: 'SUMMER25', gbpOfferRedeemUrl: 'https://example.com/redeem', gbpOfferTerms: 'One per customer', }); ``` Recurring EVENT/OFFER posts take `gbpRecurrence` (`DAILY`, `WEEKLY`, `MONTHLY`) with `gbpRecurrenceDays`, `gbpRecurrenceDayOfMonth` or `gbpRecurrenceWeekOccurrence` and `gbpRecurrenceEnd`; `gbpScheduledTime` uses Google's own scheduling; `gbpMultiMedia: true` with an array in `gbpMediaUrl` sends several photos (max 10); `gbpAlertType` is for ALERT posts. List, read, edit and delete the posts afterwards with `listGoogleBusinessPosts()`, `getGoogleBusinessPost()`, `editPost()` and `unpublishPost()`, or pin the location a profile publishes to with `pinGoogleBusinessLocation()`. Also available: `gbpTopicType: 'EVENT'` with `gbpEventTitle` / `gbpEventStartDate` / `gbpEventStartTime` / `gbpEventEndDate` / `gbpEventEndTime`, a call-to-action via `gbpCtaType` + `gbpCtaUrl`, and `gbpMediaUrl` / `gbpMediaFormat`. `gbpLanguageCode` defaults to `en`. Offer aliases: `gbpCouponCode` → `gbpOfferCoupon`, `gbpRedeemUrl` → `gbpOfferRedeemUrl`, `gbpTerms` → `gbpOfferTerms`. ### Gallery photos Set `gbpPostType` to publish straight into the location's photo gallery instead of creating a Local Post: ```javascript await client.uploadPhotos(['storefront.jpg'], { user: 'myprofile', platforms: ['google_business'], gbpLocationId: locations[0].name, gbpPostType: 'GALLERY', // MEDIA | PHOTO | GALLERY gbpMediaCategory: 'EXTERIOR', // defaults to ADDITIONAL }); ``` Omitting `gbpPostType` (or sending any other value) keeps the existing Local Post behaviour. `gbpMediaCategory` accepts `COVER`, `PROFILE`, `LOGO`, `EXTERIOR`, `INTERIOR`, `PRODUCT`, `AT_WORK`, `FOOD_AND_DRINK`, `MENU`, `COMMON_AREA`, `ROOMS`, `TEAMS` and `ADDITIONAL`. ## Retrying an upload safely An upload that times out may still have been accepted by the API. Retrying it without an idempotency key publishes the post a second time. Pass the same `idempotencyKey` on every attempt and the API returns the original job instead of creating a new one: ```javascript import { randomUUID } from 'crypto'; const idempotencyKey = randomUUID(); // generate ONCE, outside the retry loop for (let attempt = 0; attempt < 3; attempt++) { try { return await client.upload('video.mp4', { user, platforms: ['tiktok'], title, idempotencyKey }); } catch (err) { if (attempt === 2) throw err; } } ``` Generating the key inside the loop defeats the mechanism: each attempt would look like a new upload. ## TypeScript Support Full TypeScript support with comprehensive type definitions: ```typescript import { UploadPost, UploadVideoOptions, UploadResponse } from 'upload-post'; const client = new UploadPost('YOUR_API_KEY'); const options: UploadVideoOptions = { title: 'My video', user: 'my-profile', platforms: ['tiktok', 'instagram'], tiktokPrivacyLevel: 'PUBLIC_TO_EVERYONE', }; const response: UploadResponse = await client.upload('./video.mp4', options); ``` ## Error Handling ```javascript try { const response = await client.upload('./video.mp4', options); console.log('Upload successful:', response); } catch (error) { console.error('Upload failed:', error.message); // Machine-readable details: console.error(error.status); // HTTP status console.error(error.code); // `code` / `error_code` of the body, e.g. 'TEAM_SEAT_SUSPENDED' console.error(error.reason); // e.g. 'webhook_removed', 'webhook_subscriptions_disabled' console.error(error.errorType); // `error_type` of the body, where the API sends one console.error(error.retryAfter); // seconds, on rate limits console.error(error.response); // the full error body } ``` `unpublishPost()` cannot delete Instagram posts (Meta only allows it through Facebook Login, and Upload-Post connects Instagram with Instagram Login), TikTok posts (no delete API) or Reddit posts: they fail with a 400 that says so. Error bodies differ by area of the API (`error_code`, `reason`, `code` or `error_type`); the [error code catalogue](https://docs.upload-post.com) lists them. Methods marked *not generally available* answer HTTP 503 (for example `reason: 'webhook_subscriptions_disabled'` or `error_code: 'post_approvals_disabled'`) until the feature is switched on for your account. ## Development: methods generated from the OpenAPI spec `codegen/openapi.json` is a copy of the API's OpenAPI spec. Every operation in it either has a hand-written method (listed in `codegen/sdk-map.json` under `existing`), is left out on purpose (`excluded`, with the reason), or gets a generated method from `codegen/generate.py` (Python 3, standard library only): ```bash cp codegen/openapi.json # the API's openapi/openapi.json python3 codegen/generate.py # rewrites the generated parts of index.js, index.d.ts and this README python3 codegen/generate.py --check # fails if they are out of date npm test ``` `test/openapi-coverage.test.js` fails when an operation of the spec has no method, and calls every method to check it sends the HTTP method and path of its operation. `test/upload-fields.test.js` fails when an upload drops a form field the spec gives that endpoint. Generated code sits between `` markers: do not edit it by hand. ## Links - [Upload-Post Website](https://www.upload-post.com) - [API Documentation](https://docs.upload-post.com) - [Dashboard](https://app.upload-post.com) - [MCP Server](https://www.upload-post.com/mcp) — connect ChatGPT, Claude, Cursor and any AI agent ([source](https://github.com/Upload-Post/upload-post-mcp), [npm](https://www.npmjs.com/package/@upload-post/mcp)) ## License MIT