{"openapi":"3.1.0","info":{"title":"Reelspan API","version":"1.0.0","description":"Publish videos, photos and text to every network from one call.\n\nAuthenticate with `Authorization: Bearer <your key>` (`Apikey <your key>` works too). Create keys in the dashboard under **API keys**.\nEvery endpoint lives under `https://api.reelspan.com/v1`. Publishing takes multipart form fields (or JSON for text posts) and answers\nwith each network’s result, or a request_id to poll when it runs in the background."},"servers":[{"url":"https://api.reelspan.com","description":"Reelspan API"}],"tags":[{"name":"Publishing","description":"Post a video, photos or text to one or more networks, check each one’s result and retry what failed. Guide: https://reelspan.com/docs"},{"name":"Scheduling","description":"List, edit and cancel posts set for a later time."},{"name":"Queue","description":"The posting schedule “Add to queue” fills: days, times and the next free slot."},{"name":"Profiles","description":"Profiles are brands or clients, each with its own connected accounts."},{"name":"White-label","description":"Hosted connect links, so clients connect their own accounts to a profile without a Reelspan login."},{"name":"Webhooks","description":"Get each network’s result and account changes pushed to your server, signed with HMAC-SHA256. Guide: https://reelspan.com/docs/webhooks"},{"name":"Approvals","description":"Send scheduled posts to a client, who approves each one or asks for changes from a link, without an account."},{"name":"Media","description":"Upload files ahead of a post, and keep them in the media library to post again."},{"name":"Analytics","description":"Account and post numbers from each network."},{"name":"AI","description":"Captions written or adapted for each network."},{"name":"Lookups","description":"Pages, boards and other choices a network needs before posting."},{"name":"Account","description":"The API key’s workspace, plan and this month’s usage."}],"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","in":"header","name":"Authorization","description":"Send `Bearer <your key>`. `Apikey <your key>` works too, as Upload-Post clients send it."}},"schemas":{"Error":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"message":{"type":"string"},"error":{"type":"string"},"error_code":{"type":"string"}},"required":["success"]},"Me":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"message":{"type":"string","example":"Token is valid"},"email":{"type":["string","null"]},"plan":{"type":"string","example":"starter"},"preferences":{"type":"object","properties":{"weekStartDay":{"anyOf":[{"type":"number","enum":[0]},{"type":"number","enum":[1]}],"description":"0 = Sunday, 1 = Monday"},"timezone":{"type":["string","null"],"description":"IANA zone used for scheduled_date when a post sends no timezone (null: UTC)"}},"required":["weekStartDay","timezone"]},"api_usage":{"type":"object","properties":{"count":{"type":"integer"},"limit":{"type":["integer","null"]},"last_reset":{"type":"string"}},"required":["count","limit","last_reset"]}},"required":["success","message","email","plan","preferences","api_usage"]},"Profile":{"type":"object","properties":{"username":{"type":"string","example":"firestack"},"display_name":{"type":["string","null"]},"created_at":{"type":"string"},"social_accounts":{"type":"object","additionalProperties":{},"description":"One entry per network: account details when connected, \"\" when not"}},"required":["username","display_name","created_at","social_accounts"]},"Captions":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"ai_generated":{"type":"boolean","enum":[true]},"remaining_analyses":{"type":"number"}},"required":["success","ai_generated","remaining_analyses"],"additionalProperties":{},"description":"One object per platform, e.g. youtube: {title, description, tags}, instagram: {caption}, x: {text}"},"UploadPhotosForm":{"type":"object","properties":{"user":{"type":"string","description":"Profile username"},"platform[]":{"type":"array","items":{"type":"string"},"description":"instagram, facebook, x, threads, bluesky, linkedin, pinterest, tiktok"},"photo_cover_index":{"type":"string","description":"TikTok: the photo (0-based) shown as the cover"},"auto_add_music":{"type":"string","enum":["true","false"],"description":"TikTok: let TikTok add music to the photo post"},"tiktok_description":{"type":"string","description":"TikTok: the photo post’s description (up to 4000); its title is the first 90 characters of the caption"},"photos[]":{"type":"array","items":{"type":"string"},"description":"Photo files (binary) or public https URLs, in order; up to 35. Instagram and Threads also take videos here for a mixed carousel; the other networks get the photos only."},"photo_media_ids[]":{"type":"array","items":{"type":"string"},"description":"Photos (or, for a mixed carousel, videos) uploaded earlier with POST /v1/media/upload"},"<platform>_photos[]":{"type":"array","items":{"type":"string"},"description":"Public URLs a platform gets instead of photos[], e.g. pinterest_photos[] cropped to one shape"},"<platform>_photo_media_ids[]":{"type":"array","items":{"type":"string"},"description":"Uploaded photos a platform gets instead, e.g. instagram_photo_media_ids[]"},"title":{"type":"string","description":"Caption"},"facebook_media_type":{"type":"string","enum":["FEED","STORIES"],"description":"Facebook: STORIES shares each photo as its own Page Story"},"media_type":{"type":"string","enum":["FEED","STORIES"],"description":"Instagram: STORIES shares each photo as a Story"},"alt_text[]":{"type":"array","items":{"type":"string"},"description":"Alt text per photo, in order (or one alt_text for every photo, or a JSON array). `{platform}_alt_text` overrides it for one network. Sent to X, Instagram, Facebook, Threads, LinkedIn, Pinterest and Bluesky."},"async_upload":{"type":"string","enum":["true","false"]},"scheduled_date":{"type":"string"},"timezone":{"type":"string"},"repeat_every":{"type":"string","enum":["day","week","month"]},"repeat_times":{"type":"string"}},"required":["user","platform[]","title"],"additionalProperties":{},"description":"Pinterest carousels need every photo in one shape and Instagram 4:5 to 1.91:1; non-JPEG photos are converted for Instagram."},"UploadDocumentForm":{"type":"object","properties":{"user":{"type":"string","description":"Profile username"},"platform[]":{"type":"array","items":{"type":"string"},"description":"linkedin"},"document":{"type":"string","description":"The PDF, PowerPoint (PPTX, PPT) or Word (DOCX, DOC) file (binary) or a public https URL; up to 100 MB and 300 pages"},"document_media_id":{"type":"string","description":"A document uploaded earlier with POST /v1/media/upload?kind=document"},"title":{"type":"string","description":"The document’s title on LinkedIn (up to 400 characters)"},"description":{"type":"string","description":"The post text above the document"},"visibility":{"type":"string","enum":["PUBLIC","CONNECTIONS","LOGGED_IN","CONTAINER"]},"target_linkedin_page_id":{"type":"string","description":"Post as this Company Page"},"first_comment":{"type":"string"},"async_upload":{"type":"string","enum":["true","false"]},"scheduled_date":{"type":"string"},"timezone":{"type":"string"},"repeat_every":{"type":"string","enum":["day","week","month"]},"repeat_times":{"type":"string"}},"required":["user","platform[]","title"],"additionalProperties":{},"description":"LinkedIn shows the document (PDF, PowerPoint or Word) as a swipeable carousel under the post."},"UploadTextForm":{"type":"object","properties":{"user":{"type":"string","description":"Profile username"},"platform[]":{"type":"array","items":{"type":"string"},"description":"x, bluesky, threads, linkedin, facebook (YouTube Community posts, TikTok, Instagram and Pinterest have no text posts in their APIs)"},"title":{"type":"string","description":"The text of the post; long text becomes a thread on X and Bluesky"},"facebook_link":{"type":"string","description":"A link Facebook shows as a preview"},"poll_options":{"type":"array","items":{"type":"string"},"description":"X: a poll of 2 to 4 options (up to 25 characters each); also x_poll_options"},"poll_duration":{"type":"string","description":"X: minutes the poll stays open, 5 to 10080 (default 1440)"},"poll_reply_settings":{"type":"string","description":"X: who may reply to the poll"},"quote_tweet_id":{"type":"string","description":"X: quote this post"},"card_uri":{"type":"string","description":"X: a card"},"threads_poll_options":{"type":"array","items":{"type":"string"},"description":"Threads: a poll of 2 to 4 options"},"threads_link_attachment":{"type":"string","description":"Threads: a link shown as a preview"},"gbp_topic_type":{"type":"string","enum":["STANDARD","EVENT","OFFER"],"description":"Google Business: an update, an event or an offer"},"gbp_event_title":{"type":"string","description":"Google Business EVENT/OFFER: its title (default: the first line of title)"},"gbp_event_start":{"type":"string","description":"Google Business EVENT/OFFER: ISO-8601 date or date-time"},"gbp_event_end":{"type":"string"},"gbp_coupon_code":{"type":"string","description":"Google Business OFFER"},"gbp_redeem_url":{"type":"string","description":"Google Business OFFER"},"gbp_terms":{"type":"string","description":"Google Business OFFER"},"scheduled_date":{"type":"string"},"timezone":{"type":"string"},"repeat_every":{"type":"string","enum":["day","week","month"]},"repeat_times":{"type":"string"}},"required":["user","platform[]","title"],"additionalProperties":{}},"UploadVideoForm":{"type":"object","properties":{"user":{"type":"string","description":"Profile username"},"platform[]":{"type":"array","items":{"type":"string"},"description":"Networks to publish to, repeated: tiktok, youtube, instagram, facebook, x, threads, linkedin, pinterest, bluesky, telegram, discord, mastodon, wordpress, reddit, google_business, slack, nostr, lemmy, devto, hashnode, whop, listmonk."},"video":{"type":"string","description":"The video file (binary), or a public https URL"},"title":{"type":"string","description":"Default caption; required for YouTube"},"description":{"type":"string"},"async_upload":{"type":"string","enum":["true","false"],"description":"Return immediately with a request_id"},"scheduled_date":{"type":"string","description":"ISO-8601; returns 202 with a job_id"},"timezone":{"type":"string","description":"IANA zone for scheduled_date (default UTC)"},"repeat_every":{"type":"string","enum":["day","week","month"],"description":"Post the same thing again every day, week or month. Every post of the series is scheduled now, keeps the same local time in `timezone`, and can be edited or cancelled on its own; the response lists them under `repeat`."},"repeat_times":{"type":"string","description":"How many posts in the series, 2 to 30, the first included. Each counts as an upload."},"external_id":{"type":"string"},"request_id":{"type":"string","description":"Your own id, 8-100 characters, to poll even if the response is lost"},"first_comment_media[]":{"type":"array","items":{"type":"string"},"description":"Up to 4 images (files or public URLs) attached to the first comment on X, Bluesky, Mastodon, Telegram and Reddit"},"first_comment":{"type":"string","description":"Posted as the first comment (a reply on X, Bluesky and Threads) right after the post goes live. `{platform}_first_comment` overrides it for one platform. Where a platform has no comments API, or refuses it, the post still counts and its result carries `first_comment` and a warning."},"video_media_id":{"type":"string","description":"A video uploaded earlier with POST /v1/media/upload, instead of `video`"},"thumbnail_media_id":{"type":"string","description":"An image uploaded earlier with POST /v1/media/upload?kind=photo, used as the YouTube thumbnail (or send thumbnail_url)"},"cover_media_id":{"type":"string","description":"An image uploaded earlier, used as the TikTok cover (or send cover_url)"},"bluesky_compress":{"type":"string","enum":["true","false"],"description":"Compress a video over 100 MB so Bluesky takes it (only when set)"},"privacy_level":{"type":"string","description":"TikTok: PUBLIC_TO_EVERYONE, MUTUAL_FOLLOW_FRIENDS, FOLLOWER_OF_CREATOR or SELF_ONLY"},"post_mode":{"type":"string","enum":["DIRECT_POST","MEDIA_UPLOAD"],"description":"TikTok: MEDIA_UPLOAD sends it to the TikTok inbox to finish in the app"},"youtube_title":{"type":"string"},"youtube_description":{"type":"string"},"tags[]":{"type":"array","items":{"type":"string"}},"privacyStatus":{"type":"string","enum":["public","unlisted","private"]},"instagram_title":{"type":"string"},"facebook_title":{"type":"string"},"facebook_media_type":{"type":"string","enum":["REELS","VIDEO","STORIES"],"description":"Facebook: a Reel (default), a regular Page video (any shape, with a title) or a Page Story"},"media_type":{"type":"string","enum":["REELS","STORIES"],"description":"Instagram: a Reel (default) or a Story"},"x_title":{"type":"string"},"tiktok_title":{"type":"string"},"hasPaidProductPlacement":{"type":"string","enum":["true","false"],"description":"YouTube: the video has paid product placement"},"facebook_unpublished_content_type":{"type":"string","enum":["SCHEDULED","DRAFT","ADS_POST"],"description":"Facebook VIDEO: keep it off the Page as this kind"},"facebook_no_story":{"type":"string","enum":["true","false"],"description":"Facebook: post without a feed story"},"facebook_place_id":{"type":"string","description":"Facebook: tag a place (Page id of the place)"},"x_quote_tweet_id":{"type":"string","description":"X: quote this post (also quote_tweet_id)"},"tagged_user_ids":{"type":"string","description":"X: user ids tagged in the media, comma-separated (up to 10)"},"exclude_reply_user_ids":{"type":"string","description":"X: with reply_to_id, leave these user ids out of the reply"},"geo_place_id":{"type":"string","description":"X: a place id"},"for_super_followers_only":{"type":"string","enum":["true","false"],"description":"X: subscribers only"},"share_with_followers":{"type":"string","enum":["true","false"],"description":"X: with community_id, also show it to followers"},"threads_reply_to_id":{"type":"string","description":"Threads: reply to this post"},"threads_quote_post_id":{"type":"string","description":"Threads: quote this post"},"bluesky_labels":{"type":"string","description":"Bluesky: content warnings, comma-separated: sexual, nudity, porn, graphic-media"},"bluesky_threadgate":{"type":"string","description":"Bluesky: who may reply: nobody, or any of mention, following, followers (comma-separated)"},"bluesky_postgate":{"type":"string","enum":["no_quotes"],"description":"Bluesky: nobody may quote it"},"bluesky_quote_uri":{"type":"string","description":"Bluesky: quote this post (at:// URI)"},"bluesky_reply_to_id":{"type":"string","description":"Bluesky: reply to this post (at:// URI)"},"discord_thread_id":{"type":"string","description":"Discord: post into this thread"},"discord_thread_name":{"type":"string","description":"Discord: in a forum channel, start a post with this title"},"discord_flags":{"type":"string","description":"Discord: suppress_embeds and/or suppress_notifications, comma-separated"},"discord_max_file_mb":{"type":"string","description":"Discord: a boosted server’s file limit in MB (10 to 100, default 10)"},"telegram_parse_mode":{"type":"string","enum":["HTML","MarkdownV2","Markdown"],"description":"Telegram: how the text is formatted"},"telegram_has_spoiler":{"type":"string","enum":["true","false"],"description":"Telegram: blur the media until tapped"},"telegram_as_document":{"type":"string","enum":["true","false"],"description":"Telegram: send the file uncompressed, as a document"},"telegram_disable_notification":{"type":"string","enum":["true","false"],"description":"Telegram: post silently"},"telegram_protect_content":{"type":"string","enum":["true","false"],"description":"Telegram: no forwarding or saving"},"wordpress_excerpt":{"type":"string"},"wordpress_slug":{"type":"string"}},"required":["user","platform[]","video"],"additionalProperties":{},"description":"The common fields; every network also takes its own `{platform}_` fields, listed in the publishing guide."}},"parameters":{}},"paths":{"/v1/preferences":{"get":{"tags":["Account"],"summary":"Read the workspace preferences","security":[{"ApiKey":[]}],"responses":{"200":{"description":"Preferences","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"preferences":{"type":"object","properties":{"weekStartDay":{"anyOf":[{"type":"number","enum":[0]},{"type":"number","enum":[1]}],"description":"0 = Sunday, 1 = Monday"},"timezone":{"type":["string","null"],"description":"IANA zone used for scheduled_date when a post sends no timezone (null: UTC)"}},"required":["weekStartDay","timezone"]}},"required":["success","preferences"]}}}}}},"post":{"tags":["Account"],"summary":"Change the workspace preferences","description":"Send only what changes. `timezone` becomes the zone scheduled_date is read in when a post sends no timezone; null goes back to UTC.","security":[{"ApiKey":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"weekStartDay":{"anyOf":[{"type":"number","enum":[0]},{"type":"number","enum":[1]}],"description":"0 = Sunday, 1 = Monday"},"timezone":{"type":["string","null"],"description":"IANA zone used for scheduled_date when a post sends no timezone (null: UTC)"}}}}}},"responses":{"200":{"description":"Saved","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"preferences":{"type":"object","properties":{"weekStartDay":{"anyOf":[{"type":"number","enum":[0]},{"type":"number","enum":[1]}],"description":"0 = Sunday, 1 = Monday"},"timezone":{"type":["string","null"],"description":"IANA zone used for scheduled_date when a post sends no timezone (null: UTC)"}},"required":["weekStartDay","timezone"]}},"required":["success","preferences"]}}}},"400":{"description":"Invalid value","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/me":{"get":{"tags":["Account"],"summary":"Check the API key and read the account plan and usage","security":[{"ApiKey":[]}],"responses":{"200":{"description":"The key is valid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Me"}}}},"401":{"description":"Missing, invalid or expired key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/webhook":{"get":{"tags":["Webhooks"],"security":[{"ApiKey":[]}],"summary":"Read the account webhook settings","responses":{"200":{"description":"Settings","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"notifications":{"type":"object","additionalProperties":{}}},"required":["success","notifications"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Invalid key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Webhooks"],"security":[{"ApiKey":[]}],"summary":"Set the account webhook","description":"Events: upload_completed, social_account_connected, social_account_disconnected, social_account_reauth_required. Deliveries are signed: `X-Reelspan-Signature: sha256=HMAC_SHA256(secret, \"<X-Reelspan-Timestamp>.<raw body>\")`, and retried for up to 24 hours.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"channels":{"type":"object","properties":{"webhook":{"type":"boolean"}},"additionalProperties":{}},"webhook_url":{"type":"string"},"webhook_events":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"object","additionalProperties":{"type":"boolean"}}],"description":"Array of event names or an object of booleans"}}}}}},"responses":{"200":{"description":"Saved","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"notifications":{"type":"object","additionalProperties":{}}},"required":["success","notifications"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Invalid key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Webhooks"],"security":[{"ApiKey":[]}],"summary":"Remove the account webhook","responses":{"200":{"description":"Removed","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["success","message"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Invalid key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/webhook/secret":{"post":{"tags":["Webhooks"],"security":[{"ApiKey":[]}],"summary":"Rotate the account webhook signing secret","responses":{"200":{"description":"New secret","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"webhook_secret":{"type":"string"}},"required":["success","webhook_secret"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Invalid key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/webhook/test":{"post":{"tags":["Webhooks"],"security":[{"ApiKey":[]}],"summary":"Send a test event to the account webhook","responses":{"200":{"description":"Queued","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"delivery_id":{"type":"string"}},"required":["success","delivery_id"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Invalid key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/profile-webhook":{"get":{"tags":["Webhooks"],"security":[{"ApiKey":[]}],"summary":"Read a profile’s own webhook","parameters":[{"schema":{"type":"string"},"required":true,"name":"profile_username","in":"query"}],"responses":{"200":{"description":"Settings","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"webhook":{"type":"object","additionalProperties":{}}},"required":["success","webhook"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Invalid key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Webhooks"],"security":[{"ApiKey":[]}],"summary":"Set a profile’s own webhook (sent in addition to the account webhook)","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"profile_username":{"type":"string"},"webhook_url":{"type":"string"},"webhook_events":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"object","additionalProperties":{"type":"boolean"}}],"description":"Array of event names or an object of booleans"}},"required":["profile_username","webhook_url"]}}}},"responses":{"200":{"description":"Saved","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"webhook":{"type":"object","additionalProperties":{}}},"required":["success","webhook"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Invalid key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Webhooks"],"security":[{"ApiKey":[]}],"summary":"Remove a profile’s webhook","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"profile_username":{"type":"string"}},"required":["profile_username"]}}}},"responses":{"200":{"description":"Removed","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["success","message"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Invalid key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/webhook/deliveries":{"get":{"tags":["Webhooks"],"security":[{"ApiKey":[]}],"summary":"Recent webhook deliveries with their status","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"Deliveries","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"deliveries":{"type":"array","items":{"type":"object","additionalProperties":{}}}},"required":["success","deliveries"]}}}}}}},"/v1/webhook/deliveries/{id}/redeliver":{"post":{"tags":["Webhooks"],"security":[{"ApiKey":[]}],"summary":"Send a delivery again","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Queued","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]}},"required":["success"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Invalid key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/connect-links":{"post":{"security":[{"ApiKey":[]}],"tags":["White-label"],"summary":"Create a hosted connect link for a profile","description":"Returns a link (valid 48 hours) where your client connects their own accounts to the profile, without a Reelspan login. Logo, texts, labels and theme need a plan with white-label; the settings are remembered for the next link.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"redirect_url":{"type":"string","maxLength":2000,"format":"uri"},"logo_image":{"type":"string","maxLength":2000,"format":"uri"},"redirect_button_text":{"type":"string","maxLength":60},"connect_title":{"type":"string","maxLength":120},"connect_description":{"type":"string","maxLength":500},"platforms":{"type":"array","items":{"type":"string"},"maxItems":20},"show_calendar":{"type":"boolean"},"readonly_calendar":{"type":"boolean"},"language":{"type":"string","enum":["en","es","de","fr","pt","pl","tr"]},"ui_labels":{"type":["object","null"],"additionalProperties":{"type":"string","maxLength":300}},"connect_theme":{"type":"string","enum":["light","dark","auto"]},"username":{"type":"string"}},"required":["username"]}}}},"responses":{"200":{"description":"Link","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"access_url":{"type":"string"},"duration":{"type":"string"},"warnings":{"type":"array","items":{"type":"string"}}},"required":["success","access_url","duration"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Invalid key or token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Plan does not include white-label","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Profile not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/connect-links/validate":{"get":{"tags":["White-label"],"summary":"Check a connect token (send it as Bearer)","responses":{"200":{"description":"Valid","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"isValid":{"type":"boolean","enum":[true]},"profile":{"type":"object","additionalProperties":{}}},"required":["success","isValid","profile"]}}}},"401":{"description":"Invalid or expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/oauth/{platform}/start":{"post":{"tags":["White-label"],"summary":"Start an OAuth connection (Connect API)","description":"For your own connect page. Authenticate with a connect token (Bearer, from generate-jwt) or an API key plus `profile`. Send the user to `authorize_url`; they come back to `redirect_url` with `connect_status=success|cancelled|error`, `platform`, and on errors `error_code` and `error_description`.","parameters":[{"schema":{"type":"string"},"required":true,"name":"platform","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"profile":{"type":"string"},"redirect_url":{"type":"string","maxLength":2000,"format":"uri"}}}}}},"responses":{"200":{"description":"Started","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"platform":{"type":"string"},"authorize_url":{"type":"string"},"state":{"type":"string"},"expires_in":{"type":"number"}},"required":["success","platform","authorize_url","state","expires_in"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Invalid key or token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Plan does not include white-label","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Profile not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/profiles":{"post":{"tags":["Profiles"],"security":[{"ApiKey":[]}],"summary":"Create a profile","description":"A profile is the `user` you publish as. It can connect one account per network.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"username":{"type":"string","pattern":"^[A-Za-z0-9_@-]{1,64}$"},"display_name":{"type":"string","maxLength":100}},"required":["username"]}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"profile":{"$ref":"#/components/schemas/Profile"}},"required":["success","profile"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Plan limit or key scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Profile not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Username taken","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"tags":["Profiles"],"security":[{"ApiKey":[]}],"summary":"List profiles and their connected accounts","responses":{"200":{"description":"Profiles","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"limit":{"type":"number"},"plan":{"type":"string"},"profiles":{"type":"array","items":{"$ref":"#/components/schemas/Profile"}}},"required":["success","limit","plan","profiles"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Plan limit or key scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Profile not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Profiles"],"security":[{"ApiKey":[]}],"summary":"Delete a profile and disconnect all its accounts","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"username":{"type":"string"}},"required":["username"]}}}},"responses":{"200":{"description":"Deleted","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["success","message"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Plan limit or key scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Profile not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/profiles/{username}":{"get":{"tags":["Profiles"],"security":[{"ApiKey":[]}],"summary":"Get one profile","parameters":[{"schema":{"type":"string"},"required":true,"name":"username","in":"path"}],"responses":{"200":{"description":"Profile","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"profile":{"$ref":"#/components/schemas/Profile"}},"required":["success","profile"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Plan limit or key scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Profile not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["Profiles"],"security":[{"ApiKey":[]}],"summary":"Change a profile’s display name","parameters":[{"schema":{"type":"string"},"required":true,"name":"username","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"display_name":{"type":["string","null"],"maxLength":100}},"required":["display_name"],"additionalProperties":false}}}},"responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"profile":{"$ref":"#/components/schemas/Profile"}},"required":["success","profile"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Plan limit or key scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Profile not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/accounts/{platform}":{"post":{"tags":["Profiles"],"security":[{"ApiKey":[]}],"summary":"Connect a network with credentials","description":"For the networks that connect with a token, key or webhook instead of an OAuth sign-in. The credentials are checked with the network before they are saved, encrypted. Connecting again replaces the account on that profile.\n\nFields per network (Upload-Post’s names are accepted too, shown in brackets):\n- **bluesky**: `identifier` (handle or email), `app_password`\n- **telegram**: `bot_token`, `chat` [`chat_id`]\n- **discord**: `webhook_url`\n- **slack**: `webhook_url` and optionally `name`; or `bot_token` and `channel` to upload files\n- **mastodon**: `server` [`instance_url`], `access_token`\n- **wordpress**: `site` [`site_url`], `username`, `app_password` [`application_password`]\n- **devto**: `api_key`\n- **hashnode**: `token` [`pat`], `blog` [`publication_id`] (needed with more than one blog)\n- **lemmy**: `server` [`instance_url`], `username`, `password` (used once, not kept), `community`\n- **listmonk**: `server` [`instance_url`], `user` [`username`], `token` [`password`], `list` [`list_id`]\n- **whop**: `api_key`, `forum` [`experience_id`]; or `company_id` alone for the public forum\n- **nostr**: `nsec` [`private_key`], `relays` (optional, a list or space-separated)","parameters":[{"schema":{"type":"string","enum":["bluesky","telegram","discord","mastodon","wordpress","slack","devto","hashnode","lemmy","listmonk","whop","nostr"]},"required":true,"name":"platform","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"profile_username":{"type":"string"}},"required":["profile_username"],"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}}]},"example":{"profile_username":"brand","webhook_url":"https://discord.com/api/webhooks/123/abc"}}}}},"responses":{"200":{"description":"Connected","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"platform":{"type":"string"},"account":{"type":"string"},"reconnected":{"type":"boolean"}},"required":["success","platform","account","reconnected"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Plan limit or key scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Profile not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many attempts","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/accounts":{"delete":{"tags":["Profiles"],"security":[{"ApiKey":[]}],"summary":"Disconnect one network from a profile","description":"Idempotent: disconnecting a network that is not connected also returns 200.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"profile_username":{"type":"string"},"social_platform":{"type":"string"}},"required":["profile_username","social_platform"]}}}},"responses":{"200":{"description":"Disconnected","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"message":{"type":"string"}},"required":["success","message"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Plan limit or key scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Profile not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/posts/status":{"get":{"tags":["Publishing"],"summary":"Status of a publish request, per platform","description":"Poll every 5 seconds or more. Only platforms that have finished appear in `results`.","security":[{"ApiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":false,"name":"request_id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"job_id","in":"query"}],"responses":{"200":{"description":"Status","content":{"application/json":{"example":{"success":true,"request_id":"post_8fK2xQ","status":"in_progress","completed":1,"total":2,"results":[{"platform":"tiktok","success":true,"status":"completed","post_url":"https://www.tiktok.com/@brand/video/7430000000000000000","error_message":null,"error_code":null}]},"schema":{"type":"object","properties":{"request_id":{"type":"string"},"status":{"type":"string"},"completed":{"type":"number"},"total":{"type":"number"},"results":{"type":"array","items":{"type":"object","properties":{"platform":{"type":"string"},"success":{"type":"boolean"},"post_url":{"type":["string","null"]},"error_message":{"type":["string","null"]}},"required":["platform","success","post_url","error_message"],"additionalProperties":{}}}},"required":["request_id","status","completed","total","results"],"additionalProperties":{}}}}},"404":{"description":"Unknown request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/posts":{"get":{"tags":["Publishing"],"summary":"Upload history, one row per platform post","security":[{"ApiKey":[]}],"parameters":[{"schema":{"type":"integer","minimum":1,"default":1},"required":false,"name":"page","in":"query"},{"schema":{"type":"number","default":10},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"platform","in":"query"},{"schema":{"type":"string","enum":["success","failed"]},"required":false,"name":"status","in":"query"},{"schema":{"type":"string"},"required":false,"name":"profile_username","in":"query"},{"schema":{"type":"string"},"required":false,"name":"profile","in":"query"},{"schema":{"type":"string","maxLength":200},"required":false,"name":"request_id","in":"query"},{"schema":{"type":"string","maxLength":200},"required":false,"name":"job_id","in":"query"},{"schema":{"type":"string","maxLength":200},"required":false,"name":"external_id","in":"query"},{"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"string","format":"date"}]},"required":false,"name":"start","in":"query"},{"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"string","format":"date"}]},"required":false,"name":"end","in":"query"}],"responses":{"200":{"description":"History","content":{"application/json":{"schema":{"type":"object","properties":{"history":{"type":"array","items":{"type":"object","additionalProperties":{}}},"in_progress":{"type":"array","items":{"type":"object","additionalProperties":{}}},"total":{"type":"number"},"page":{"type":"number"},"limit":{"type":"number"}},"required":["history","in_progress","total","page","limit"]}}}},"400":{"description":"Invalid filters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/scheduled":{"get":{"security":[{"ApiKey":[]}],"tags":["Scheduling"],"summary":"List scheduled posts","parameters":[{"schema":{"type":"string"},"required":false,"name":"profile_username","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"from","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"to","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"required":false,"name":"limit","in":"query"},{"schema":{"type":["integer","null"],"minimum":0,"default":0},"required":false,"name":"offset","in":"query"}],"responses":{"200":{"description":"Scheduled posts","content":{"application/json":{"schema":{"type":"object","properties":{"scheduled_posts":{"type":"array","items":{"type":"object","additionalProperties":{}}},"total":{"type":"number"},"limit":{"type":"number"},"offset":{"type":"number"}},"required":["scheduled_posts","total","limit","offset"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Already publishing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/scheduled/{job_id}":{"get":{"security":[{"ApiKey":[]}],"tags":["Scheduling"],"summary":"Get a scheduled post","parameters":[{"schema":{"type":"string"},"required":true,"name":"job_id","in":"path"}],"responses":{"200":{"description":"Scheduled post","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Already publishing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"security":[{"ApiKey":[]}],"tags":["Scheduling"],"summary":"Reschedule or edit a scheduled post","description":"Change the time, the text (overall or per network with `platform_content`), any upload field, and the cover of a video post. The video or photos, profile and networks cannot change. Fails with 409 (`scheduled_post_in_progress`) once publishing has started or within a minute of the time.","parameters":[{"schema":{"type":"string"},"required":true,"name":"job_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"scheduled_date":{"type":"string"},"timezone":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"caption":{"type":"string","description":"Same as description (Upload-Post’s name)"},"platform_content":{"type":"object","additionalProperties":{"type":"object","properties":{"title":{"type":["string","null"]},"description":{"type":["string","null"]}}},"description":"Per network text: {\"tiktok\": {\"title\": \"…\"}} sets tiktok_title; null removes it"},"fields":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"null"}]},"description":"Any upload field; null removes it"},"cover_image_base64":{"type":"string","description":"A new cover (JPEG, PNG or WebP, base64, up to 20 MB) for a video post"},"cover_image_url":{"type":"string","format":"uri","description":"Or a public https URL of the new cover"},"cover_media_id":{"type":"string","description":"Or an image uploaded earlier with POST /v1/media/upload?kind=photo"},"remove_cover":{"type":"boolean","description":"Remove the cover: networks pick a frame themselves"}}}}}},"responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Already publishing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"security":[{"ApiKey":[]}],"tags":["Scheduling"],"summary":"Cancel a scheduled post and refund its upload credits","parameters":[{"schema":{"type":"string"},"required":true,"name":"job_id","in":"path"},{"schema":{"type":"string","enum":["rest"],"description":"`rest` also cancels the later posts of a repeating series"},"required":false,"description":"`rest` also cancels the later posts of a repeating series","name":"series","in":"query"}],"responses":{"200":{"description":"Cancelled","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"message":{"type":"string"},"credits_refunded":{"type":"number"},"cancelled":{"type":"number"}},"required":["success","message","credits_refunded"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Already publishing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/scheduled/{job_id}/thumbnail":{"get":{"security":[{"ApiKey":[]}],"tags":["Scheduling"],"summary":"A small image of a scheduled post","description":"A 480 px wide JPEG: a frame of the video, or the cover or first photo. Redirects (302) to a signed link valid for an hour; `?format=json` returns the link instead. The first request makes the image, so it can take a few seconds.","parameters":[{"schema":{"type":"string"},"required":true,"name":"job_id","in":"path"},{"schema":{"type":"string","enum":["image","json"],"default":"image"},"required":false,"name":"format","in":"query"}],"responses":{"200":{"description":"The link","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"thumbnail_url":{"type":"string"},"expires_in":{"type":"number"}},"required":["success","thumbnail_url","expires_in"]}}}},"302":{"description":"Redirect to the image"},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Already publishing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/scheduled/{job_id}/preview":{"get":{"security":[{"ApiKey":[]}],"tags":["Scheduling"],"summary":"Signed links to the media of a scheduled post","description":"Every file the post will publish (video, photos, cover, thumbnail, document), each with a link valid for an hour, so a calendar or review screen can play or show it.","parameters":[{"schema":{"type":"string"},"required":true,"name":"job_id","in":"path"}],"responses":{"200":{"description":"Media","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"job_id":{"type":"string"},"expires_in":{"type":"number"},"media":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string"},"media_id":{"type":"string"},"kind":{"type":"string"},"content_type":{"type":"string"},"size_bytes":{"type":"number"},"url":{"type":"string"}},"required":["role","media_id","kind","content_type","size_bytes","url"]}}},"required":["success","job_id","expires_in","media"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Already publishing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/queue/settings":{"get":{"security":[{"ApiKey":[]}],"tags":["Queue"],"summary":"Read a profile’s queue: posting slots, days and capacity","parameters":[{"schema":{"type":"string"},"required":true,"name":"profile_username","in":"query"}],"responses":{"200":{"description":"Settings","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"queue_settings":{"type":"object","additionalProperties":{}}},"required":["success","queue_settings"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Already publishing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"security":[{"ApiKey":[]}],"tags":["Queue"],"summary":"Set a profile’s queue","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"profile_username":{"type":"string"},"timezone":{"type":"string"},"slots":{"type":"array","items":{"type":"object","properties":{"hour":{"type":"integer","minimum":0,"maximum":23},"minute":{"type":"integer","minimum":0,"maximum":59}},"required":["hour","minute"]},"maxItems":24},"days_of_week":{"type":"array","items":{"type":"integer","minimum":0,"maximum":6},"description":"0 = Monday"},"max_posts_per_slot":{"type":"integer","minimum":1,"maximum":100}},"required":["profile_username"]}}}},"responses":{"200":{"description":"Saved","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"queue_settings":{"type":"object","additionalProperties":{}}},"required":["success","queue_settings"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Already publishing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/queue/preview":{"get":{"security":[{"ApiKey":[]}],"tags":["Queue"],"summary":"Upcoming queue slots and how full they are","parameters":[{"schema":{"type":"string"},"required":true,"name":"profile_username","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":50,"default":10},"required":false,"name":"count","in":"query"}],"responses":{"200":{"description":"Slots","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Already publishing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/queue/next-slot":{"get":{"security":[{"ApiKey":[]}],"tags":["Queue"],"summary":"The next slot with room","parameters":[{"schema":{"type":"string"},"required":true,"name":"profile_username","in":"query"}],"responses":{"200":{"description":"Next slot","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Already publishing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/queue/slot-full":{"post":{"security":[{"ApiKey":[]}],"tags":["Queue"],"summary":"Mark a slot as full","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"profile_username":{"type":"string"},"slot_datetime":{"type":"string","format":"date-time"}},"required":["profile_username","slot_datetime"]}}}},"responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Already publishing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"security":[{"ApiKey":[]}],"tags":["Queue"],"summary":"Open a slot that was marked full","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"profile_username":{"type":"string"},"slot_datetime":{"type":"string","format":"date-time"}},"required":["profile_username","slot_datetime"]}}}},"responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Already publishing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/permissions":{"get":{"security":[{"ApiKey":[]}],"tags":["Account"],"summary":"Features that wait for a network’s approval, and which are live","description":"Each feature built on a permission a network grants after review: what it unlocks, the approval it needs, and whether it is live. Live ones need accounts connected before the switch to reconnect.","responses":{"200":{"description":"Permissions","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"permissions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"platform":{"type":"string"},"unlocks":{"type":"string"},"approval":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"status":{"type":"string","enum":["live","pending"]}},"required":["id","platform","unlocks","approval","scopes","status"]}}},"required":["success","permissions"]}}}}}}},"/v1/facebook/page-info":{"patch":{"security":[{"ApiKey":[]}],"tags":["Lookups"],"summary":"Change a Facebook Page’s about, description, website, phone, emails or hours","description":"Needs pages_manage_metadata: 403 `permission_pending` until Meta approves it (GET /v1/permissions). `validate_only` works now.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"profile":{"type":"string"},"profile_username":{"type":"string"},"user":{"type":"string"},"page_id":{"type":"string","description":"Default: the chosen Page"},"validate_only":{"type":"boolean","description":"Report what would change without changing it"},"about":{"type":"string"},"description":{"type":"string"},"website":{"type":"string"},"phone":{"type":"string"},"emails":{"type":"array","items":{"type":"string"}},"hours":{"type":"object","additionalProperties":{"type":"string"},"description":"Graph hours, e.g. {\"mon_1_open\": \"09:00\", \"mon_1_close\": \"17:00\"}"}},"additionalProperties":{}}}}},"responses":{"200":{"description":"Updated, or what would change","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Waits for the permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such profile or account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The account must be reconnected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"The network refused","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"security":[{"ApiKey":[]}],"tags":["Lookups"],"summary":"A Facebook Page’s details: about, website, phone, hours, category, picture, cover","parameters":[{"schema":{"type":"string"},"required":false,"name":"profile","in":"query"},{"schema":{"type":"string"},"required":false,"name":"profile_username","in":"query"},{"schema":{"type":"string"},"required":false,"name":"user","in":"query"},{"schema":{"type":"string","description":"Default: the chosen Page"},"required":false,"description":"Default: the chosen Page","name":"page_id","in":"query"}],"responses":{"200":{"description":"Details","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"page_id":{"type":"string"},"page":{"type":"object","additionalProperties":{}}},"required":["success","page_id","page"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such profile or account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The account must be reconnected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"The network refused","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/linkedin/pages":{"get":{"security":[{"ApiKey":[]}],"tags":["Lookups"],"summary":"LinkedIn company pages a profile’s member administers","description":"Needs LinkedIn’s Community Management API: 403 `permission_pending` until approved (GET /v1/permissions).","parameters":[{"schema":{"type":"string"},"required":false,"name":"profile","in":"query"},{"schema":{"type":"string"},"required":false,"name":"profile_username","in":"query"},{"schema":{"type":"string"},"required":false,"name":"user","in":"query"}],"responses":{"200":{"description":"Pages","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"pages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"urn":{"type":"string"},"name":{"type":"string"},"vanity_name":{"type":["string","null"]},"picture":{"type":["string","null"]},"followers":{"type":["number","null"]},"selected":{"type":"boolean"}},"required":["id","urn","name","vanity_name","picture","followers","selected"]}},"selected_page_id":{"type":["string","null"]},"selected_page_name":{"type":["string","null"]}},"required":["success","pages","selected_page_id","selected_page_name"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Waits for the permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such profile or account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The account must be reconnected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"The network refused","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/linkedin/page":{"post":{"security":[{"ApiKey":[]}],"tags":["Lookups"],"summary":"Choose the LinkedIn company page posts go out as","description":"Posts with no target_linkedin_page_id go out as this page.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"profile":{"type":"string"},"profile_username":{"type":"string"},"user":{"type":"string"},"linkedin_page_id":{"type":"string","minLength":1}},"required":["linkedin_page_id"]}}}},"responses":{"200":{"description":"Chosen","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"linkedin_page_id":{"type":"string"},"linkedin_page_name":{"type":"string"}},"required":["success","linkedin_page_id","linkedin_page_name"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Waits for the permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such profile or account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The account must be reconnected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"The network refused","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"security":[{"ApiKey":[]}],"tags":["Lookups"],"summary":"Post as the member again, not a company page","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"profile":{"type":"string"},"profile_username":{"type":"string"},"user":{"type":"string"}}}}}},"responses":{"200":{"description":"Cleared","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]}},"required":["success"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such profile or account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The account must be reconnected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"The network refused","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/facebook/pages":{"get":{"security":[{"ApiKey":[]}],"tags":["Lookups"],"summary":"Facebook Pages connected to a profile, with followers and likes","parameters":[{"schema":{"type":"string"},"required":false,"name":"profile","in":"query"},{"schema":{"type":"string"},"required":false,"name":"profile_username","in":"query"},{"schema":{"type":"string"},"required":false,"name":"user","in":"query"}],"responses":{"200":{"description":"Pages","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"pages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"picture":{"type":["string","null"]},"account_id":{"type":"string"},"selected":{"type":"boolean"},"followers":{"type":["number","null"]},"likes":{"type":["number","null"]}},"required":["id","name","picture","account_id","selected","followers","likes"]}},"selected_page_id":{"type":["string","null"]},"selected_page_name":{"type":["string","null"]}},"required":["success","pages","selected_page_id","selected_page_name"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such profile or account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The account must be reconnected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"The network refused","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/facebook/page":{"post":{"security":[{"ApiKey":[]}],"tags":["Lookups"],"summary":"Choose the Facebook Page posts go to","description":"The chosen Page is used when a post sends no facebook_page_id.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"profile":{"type":"string"},"profile_username":{"type":"string"},"user":{"type":"string"},"facebook_page_id":{"type":"string","minLength":1}},"required":["facebook_page_id"]}}}},"responses":{"200":{"description":"Chosen","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"facebook_page_id":{"type":"string"},"facebook_page_name":{"type":"string"}},"required":["success","facebook_page_id","facebook_page_name"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such profile or account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The account must be reconnected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"The network refused","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"security":[{"ApiKey":[]}],"tags":["Lookups"],"summary":"Clear the chosen Facebook Page","description":"Then each post needs facebook_page_id, unless only one Page is connected.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"profile":{"type":"string"},"profile_username":{"type":"string"},"user":{"type":"string"}}}}}},"responses":{"200":{"description":"Cleared","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]}},"required":["success"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such profile or account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The account must be reconnected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"The network refused","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/google-business/locations":{"get":{"security":[{"ApiKey":[]}],"tags":["Lookups"],"summary":"Google Business locations of a profile’s account","description":"As saved when the account was connected; `refresh=true` reads them again from Google (and saves them). Use a location’s `id` as google_business_location_id on posts.","parameters":[{"schema":{"type":"string"},"required":false,"name":"profile","in":"query"},{"schema":{"type":"string"},"required":false,"name":"profile_username","in":"query"},{"schema":{"type":"string"},"required":false,"name":"user","in":"query"},{"schema":{"type":"string","enum":["true","false"]},"required":false,"name":"refresh","in":"query"}],"responses":{"200":{"description":"Locations","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"locations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"title":{"type":"string"},"account_id":{"type":"string"},"selected":{"type":"boolean"}},"required":["id","name","title","account_id","selected"]}},"selected_location_id":{"type":["string","null"]},"selected_location_name":{"type":["string","null"]}},"required":["success","locations","selected_location_id","selected_location_name"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such profile or account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The account must be reconnected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"The network refused","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/google-business/location":{"post":{"security":[{"ApiKey":[]}],"tags":["Lookups"],"summary":"Choose the Google Business location posts go to","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"profile":{"type":"string"},"profile_username":{"type":"string"},"user":{"type":"string"},"location_id":{"type":"string","minLength":1,"description":"accounts/…/locations/…, locations/…, or the bare id"}},"required":["location_id"]}}}},"responses":{"200":{"description":"Chosen","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"location_id":{"type":"string"},"location_name":{"type":"string"}},"required":["success","location_id","location_name"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such profile or account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The account must be reconnected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"The network refused","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"security":[{"ApiKey":[]}],"tags":["Lookups"],"summary":"Clear the chosen Google Business location","description":"Then each post needs google_business_location_id, unless the account has one location.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"profile":{"type":"string"},"profile_username":{"type":"string"},"user":{"type":"string"}}}}}},"responses":{"200":{"description":"Cleared","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]}},"required":["success"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such profile or account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The account must be reconnected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"The network refused","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/pinterest/boards/{board_id}/sections":{"get":{"security":[{"ApiKey":[]}],"tags":["Lookups"],"summary":"Sections of a Pinterest board","parameters":[{"schema":{"type":"string"},"required":true,"name":"board_id","in":"path"},{"schema":{"type":"string"},"required":false,"name":"profile","in":"query"},{"schema":{"type":"string"},"required":false,"name":"profile_username","in":"query"},{"schema":{"type":"string"},"required":false,"name":"user","in":"query"}],"responses":{"200":{"description":"Sections","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"board_id":{"type":"string"},"sections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]}}},"required":["success","board_id","sections"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such profile or account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The account must be reconnected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"The network refused","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"security":[{"ApiKey":[]}],"tags":["Lookups"],"summary":"Create a section on a Pinterest board","parameters":[{"schema":{"type":"string"},"required":true,"name":"board_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"profile":{"type":"string"},"profile_username":{"type":"string"},"user":{"type":"string"},"name":{"type":"string","minLength":1,"maxLength":180}},"required":["name"]}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"board_id":{"type":"string"},"section":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]}},"required":["success","board_id","section"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such profile or account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The account must be reconnected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"The network refused","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/posts/save":{"post":{"security":[{"ApiKey":[]}],"tags":["Publishing"],"summary":"Save (repin) a Pinterest Pin to a board","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"profile":{"type":"string"},"profile_username":{"type":"string"},"user":{"type":"string"},"platform":{"type":"string","enum":["pinterest"],"default":"pinterest"},"post_id":{"type":"string","minLength":1,"description":"The Pin id"},"pinterest_board_id":{"type":"string","minLength":1},"pinterest_board_section_id":{"type":"string"}},"required":["post_id","pinterest_board_id"]}}}},"responses":{"200":{"description":"Saved","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"post_id":{"type":"string"},"url":{"type":"string"},"board_id":{"type":"string"},"board_section_id":{"type":["string","null"]},"parent_pin_id":{"type":["string","null"]}},"required":["success","post_id","url","board_id","board_section_id","parent_pin_id"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such profile or account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The account must be reconnected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"The network refused","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/publishing-limits":{"get":{"security":[{"ApiKey":[]}],"tags":["Lookups"],"summary":"What a profile’s Instagram and Threads accounts may still post in the next 24 hours","description":"Read live from each network (Instagram: 50 posts a day, Threads: 250 posts and 1,000 replies), cached for a minute; `refresh=true` skips the cache. Networks not connected are left out.","parameters":[{"schema":{"type":"string"},"required":false,"name":"profile","in":"query"},{"schema":{"type":"string"},"required":false,"name":"profile_username","in":"query"},{"schema":{"type":"string"},"required":false,"name":"user","in":"query"},{"schema":{"type":"string","enum":["instagram","threads"]},"required":false,"name":"platform","in":"query"},{"schema":{"type":"string","enum":["true","false"]},"required":false,"name":"refresh","in":"query"}],"responses":{"200":{"description":"Limits","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"limits":{"type":"object","properties":{"instagram":{"type":"object","properties":{"posts":{"type":"object","properties":{"used":{"type":"number"},"limit":{"type":"number"},"remaining":{"type":"number"},"window_seconds":{"type":"number"}},"required":["used","limit","remaining","window_seconds"]},"limit_reached":{"type":"boolean"},"fetched_at":{"type":"string"},"cached":{"type":"boolean"}},"required":["posts","limit_reached","fetched_at","cached"]},"threads":{"type":"object","properties":{"posts":{"type":"object","properties":{"used":{"type":"number"},"limit":{"type":"number"},"remaining":{"type":"number"},"window_seconds":{"type":"number"}},"required":["used","limit","remaining","window_seconds"]},"replies":{"type":"object","properties":{"used":{"type":"number"},"limit":{"type":"number"},"remaining":{"type":"number"},"window_seconds":{"type":"number"}},"required":["used","limit","remaining","window_seconds"]},"limit_reached":{"type":"boolean"},"fetched_at":{"type":"string"},"cached":{"type":"boolean"}},"required":["posts","replies","limit_reached","fetched_at","cached"]}}},"errors":{"type":"object","additionalProperties":{"type":"object","properties":{"error":{"type":"string"},"error_code":{"type":"string"}},"required":["error","error_code"]}}},"required":["success","limits"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such profile or account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The account must be reconnected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"The network refused","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/reddit/posts":{"get":{"security":[{"ApiKey":[]}],"tags":["Analytics"],"summary":"Reddit posts of a profile’s account, with score, comments, views and media","description":"The account’s own submissions when Reddit lets the app list them; otherwise the posts Reelspan published for the profile (`source` says which). Page with `after`.","parameters":[{"schema":{"type":"string"},"required":false,"name":"profile","in":"query"},{"schema":{"type":"string"},"required":false,"name":"profile_username","in":"query"},{"schema":{"type":"string"},"required":false,"name":"user","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"after","in":"query"}],"responses":{"200":{"description":"Posts","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"source":{"type":"string","enum":["account","reelspan"]},"posts":{"type":"array","items":{"type":"object","additionalProperties":{}}},"after":{"type":["string","null"]}},"required":["success","source","posts","after"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such profile or account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The account must be reconnected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"The network refused","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/posts/retry":{"post":{"security":[{"ApiKey":[]}],"tags":["Publishing"],"summary":"Retry the platforms that failed","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"request_id":{"type":"string"},"job_id":{"type":"string"},"platforms":{"type":"array","items":{"type":"string"},"description":"Retry only these platforms"},"fields":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"description":"Settings to change before retrying (same names as the upload fields); an empty string removes one"},"scheduled_date":{"type":"string","description":"Retry later instead of now (ISO-8601, within 365 days): the post becomes a scheduled post with a job_id"},"timezone":{"type":"string","description":"IANA zone for scheduled_date (default UTC)"}}}}}},"responses":{"200":{"description":"Re-queued","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"request_id":{"type":"string"},"message":{"type":"string"},"platforms":{"type":"array","items":{"type":"string"}},"job_id":{"type":["string","null"]},"scheduled_date":{"type":"string"}},"required":["success","request_id","message","platforms"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Nothing to do","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/pinterest/boards":{"get":{"security":[{"ApiKey":[]}],"tags":["Lookups"],"summary":"Pinterest boards of a profile’s account","parameters":[{"schema":{"type":"string"},"required":false,"name":"profile","in":"query"},{"schema":{"type":"string"},"required":false,"name":"profile_username","in":"query"},{"schema":{"type":"string"},"required":false,"name":"user","in":"query"}],"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Nothing to do","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"security":[{"ApiKey":[]}],"tags":["Lookups"],"summary":"Create a Pinterest board on a profile’s account","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"profile":{"type":"string"},"profile_username":{"type":"string"},"user":{"type":"string"},"name":{"type":"string","minLength":1,"maxLength":50},"description":{"type":"string","maxLength":500},"privacy":{"type":"string","enum":["PUBLIC","PROTECTED"],"description":"PROTECTED boards are hidden from others but can still be posted to (SECRET ones can’t)"}},"required":["name"]}}}},"responses":{"200":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"board":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]}},"required":["success","board"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Nothing to do","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/tiktok/creator-info":{"get":{"security":[{"ApiKey":[]}],"tags":["Lookups"],"summary":"What a TikTok account may post: privacy levels, interactions and its longest video","parameters":[{"schema":{"type":"string"},"required":false,"name":"profile","in":"query"},{"schema":{"type":"string"},"required":false,"name":"profile_username","in":"query"},{"schema":{"type":"string"},"required":false,"name":"user","in":"query"}],"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Nothing to do","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/posts/unpublish":{"post":{"security":[{"ApiKey":[]}],"tags":["Publishing"],"summary":"Delete a live post from the network","description":"Deletes the post on the network itself. Works on youtube, x, bluesky, facebook, pinterest, linkedin, threads, telegram, discord, mastodon, wordpress, google_business. YouTube and Threads answer 403 `permission_pending` until their permissions are approved (GET /v1/permissions). Instagram and TikTok have no delete in their APIs. Name the post with request_id (a post Reelspan published), or with platform, user and post_id. WordPress posts go to the site's trash; Telegram lets bots delete messages for 48 hours.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"request_id":{"type":"string","description":"The Reelspan request that published the post; with `platform` when it went to several networks"},"platform":{"type":"string","description":"The network; required with `post_id`"},"user":{"type":"string","description":"Profile username, with `post_id` (also `profile_username`)"},"profile_username":{"type":"string"},"post_id":{"type":"string","description":"The network’s own post id (an at:// URI or bsky.app link on Bluesky, the local post name on Google Business), for posts made outside Reelspan"}}}}}},"responses":{"200":{"description":"Deleted","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"platform":{"type":"string"},"post_id":{"type":"string"},"message":{"type":"string"}},"required":["success","platform","post_id","message"]}}}},"400":{"description":"Invalid input, or the network can’t do this (`platform_not_supported`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Waits for a network permission Reelspan has applied for (`permission_pending`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such request, profile, account or post","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The account must be reconnected (`reauth_required`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"The network refused; `error_code` says why","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/posts/edit":{"post":{"security":[{"ApiKey":[]}],"tags":["Publishing"],"summary":"Edit a live post","description":"Changes a published post where the network allows it: youtube, x, facebook, pinterest, linkedin, telegram, discord, mastodon, wordpress, google_business. X edits need X Premium and make a new post id (returned, with `edit_history_post_ids`); the stored post follows it. LinkedIn changes only the commentary. Links stay off X unless `fields.x_keep_links` is true, as when posting.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"request_id":{"type":"string","description":"The Reelspan request that published the post; with `platform` when it went to several networks"},"platform":{"type":"string","description":"The network; required with `post_id`"},"user":{"type":"string","description":"Profile username, with `post_id` (also `profile_username`)"},"profile_username":{"type":"string"},"post_id":{"type":"string","description":"The network’s own post id (an at:// URI or bsky.app link on Bluesky, the local post name on Google Business), for posts made outside Reelspan"},"text":{"type":"string","description":"The new text: caption, message or commentary (also `message`, `commentary`)"},"message":{"type":"string"},"commentary":{"type":"string"},"title":{"type":"string","description":"A new title where the network has one (Facebook video, Pinterest, WordPress)"},"description":{"type":"string","description":"A new description (Pinterest, Facebook video, WordPress body)"},"fields":{"type":"object","additionalProperties":{"type":"string"},"description":"Network settings to change, by upload field name: x_keep_links, pinterest_link, pinterest_board_id, wordpress_status, wordpress_excerpt, mastodon_spoiler_text, telegram_parse_mode, google_business_cta_url…"}}}}}},"responses":{"200":{"description":"Edited","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"platform":{"type":"string"},"post_id":{"type":"string"},"url":{"type":["string","null"]},"previous_post_id":{"type":"string"},"warnings":{"type":"array","items":{"type":"string"}}},"required":["success","platform","post_id","url"],"additionalProperties":{}}}}},"400":{"description":"Invalid input, or the network can’t do this (`platform_not_supported`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Waits for a network permission Reelspan has applied for (`permission_pending`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such request, profile, account or post","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The account must be reconnected (`reauth_required`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"The network refused; `error_code` says why","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/posts/repost":{"post":{"security":[{"ApiKey":[]}],"tags":["Publishing"],"summary":"Repost (reshare, boost) a post from the same account","description":"Shares a post again from the profile’s account: x, bluesky, linkedin, threads, mastodon. Any public post works with platform, user and post_id, not only your own. X counts reposts against the account’s daily write limit.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"request_id":{"type":"string","description":"The Reelspan request that published the post; with `platform` when it went to several networks"},"platform":{"type":"string","description":"The network; required with `post_id`"},"user":{"type":"string","description":"Profile username, with `post_id` (also `profile_username`)"},"profile_username":{"type":"string"},"post_id":{"type":"string","description":"The network’s own post id (an at:// URI or bsky.app link on Bluesky, the local post name on Google Business), for posts made outside Reelspan"},"commentary":{"type":"string","description":"LinkedIn: text above the reshare"},"target_linkedin_page_id":{"type":"string","description":"LinkedIn: reshare as this company page (default: the chosen page, else the member)"}}}}}},"responses":{"200":{"description":"Reposted","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"platform":{"type":"string"},"post_id":{"type":"string"},"repost_id":{"type":["string","null"]},"url":{"type":["string","null"]}},"required":["success","platform","post_id","repost_id","url"],"additionalProperties":{}}}}},"400":{"description":"Invalid input, or the network can’t do this (`platform_not_supported`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Waits for a network permission Reelspan has applied for (`permission_pending`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such request, profile, account or post","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The account must be reconnected (`reauth_required`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"The network refused; `error_code` says why","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/ai/adapt-captions":{"post":{"tags":["AI"],"summary":"Write captions for each network from whatever the post has","description":"Give any of: your caption (`text`, kept as the facts and adapted per network), a video as `frames` plus its `audio` (the speech is transcribed first), or `images`. Uses one AI credit.","security":[{"ApiKey":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"platforms":{"type":"array","items":{"type":"string"}},"text":{"type":"string","maxLength":5000,"description":"Your caption: kept as the facts and adapted per network"},"notes":{"type":"string","maxLength":4000,"description":"Hints for the AI (facts, names, the angle) without writing the caption yourself"},"frames":{"type":"array","items":{"type":"string","maxLength":3000000,"pattern":"^data:image\\/(jpeg|png|webp);base64,[A-Za-z0-9+/=]+$"},"maxItems":8,"description":"Frames from the video, in order"},"images":{"type":"array","items":{"type":"string","maxLength":3000000,"pattern":"^data:image\\/(jpeg|png|webp);base64,[A-Za-z0-9+/=]+$"},"maxItems":10,"description":"The post’s photos"},"audio":{"type":"object","properties":{"data":{"type":"string","maxLength":16000000,"pattern":"^[A-Za-z0-9+/=]+$"},"format":{"type":"string","enum":["wav","mp3"]}},"required":["data","format"],"description":"The video’s audio, base64 (16 kHz mono WAV is plenty)"},"duration":{"type":"number","minimum":0,"description":"Video length in seconds"},"media_id":{"type":"string","maxLength":64,"description":"A video uploaded with POST /v1/media/upload: frames and sound are taken from it on the server"},"photo_media_ids":{"type":"array","items":{"type":"string","maxLength":64},"maxItems":10,"description":"Photos uploaded with POST /v1/media/upload"},"kind":{"type":"string","enum":["video","photo","text"]},"language":{"type":"string","maxLength":40}}}}}},"responses":{"200":{"description":"Captions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Captions"}}}},"400":{"description":"Nothing to write from","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"No credits left","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/ai/rewrite-captions":{"post":{"tags":["AI"],"summary":"Adapt existing captions to each network","description":"Keeps the facts, changes style, length and hashtags per network. Uses one AI credit.","security":[{"ApiKey":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"object","additionalProperties":{},"description":"Your current captions, e.g. {\"youtube\": {\"title\": \"...\"}}"},"platforms":{"type":"array","items":{"type":"string","maxLength":40},"maxItems":20},"language":{"type":"string","maxLength":40},"instructions":{"type":"string","maxLength":1000}},"required":["content"]}}}},"responses":{"200":{"description":"Captions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Captions"}}}},"429":{"description":"No credits left","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/library":{"get":{"security":[{"ApiKey":[]}],"tags":["Media"],"summary":"The media library, newest first","parameters":[{"schema":{"type":"string","enum":["video","photo","document"]},"required":false,"name":"kind","in":"query"},{"schema":{"type":"string","description":"1 to 100, default 48"},"required":false,"description":"1 to 100, default 48","name":"limit","in":"query"},{"schema":{"type":"string","description":"next_before from the previous page"},"required":false,"description":"next_before from the previous page","name":"before","in":"query"}],"responses":{"200":{"description":"Library","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"usage":{"type":"object","properties":{"used_bytes":{"type":"number"},"limit_bytes":{"type":"number"},"items":{"type":"number"}},"required":["used_bytes","limit_bytes","items"]},"items":{"type":"array","items":{"type":"object","properties":{"media_id":{"type":"string"},"kind":{"type":"string","enum":["video","photo","document"]},"title":{"type":["string","null"]},"filename":{"type":["string","null"]},"content_type":{"type":"string"},"size_bytes":{"type":"number"},"duration_seconds":{"type":["number","null"]},"width":{"type":["number","null"]},"height":{"type":["number","null"]},"saved_at":{"type":"string"},"url":{"type":"string","description":"A link to the file, valid for an hour"}},"required":["media_id","kind","title","filename","content_type","size_bytes","duration_seconds","width","height","saved_at","url"]}},"next_before":{"type":["string","null"]}},"required":["success","usage","items","next_before"]}}}}}},"post":{"security":[{"ApiKey":[]}],"tags":["Media"],"summary":"Keep uploaded media in the library","description":"Kept media is never deleted by retention and counts against the plan’s library space.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"media_ids":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":50},"title":{"type":"string","maxLength":200}},"required":["media_ids"]}}}},"responses":{"200":{"description":"Saved","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"items":{"type":"array","items":{"type":"object","properties":{"media_id":{"type":"string"},"kind":{"type":"string","enum":["video","photo","document"]},"title":{"type":["string","null"]},"filename":{"type":["string","null"]},"content_type":{"type":"string"},"size_bytes":{"type":"number"},"duration_seconds":{"type":["number","null"]},"width":{"type":["number","null"]},"height":{"type":["number","null"]},"saved_at":{"type":"string"},"url":{"type":"string","description":"A link to the file, valid for an hour"}},"required":["media_id","kind","title","filename","content_type","size_bytes","duration_seconds","width","height","saved_at","url"]}},"usage":{"type":"object","properties":{"used_bytes":{"type":"number"},"limit_bytes":{"type":"number"},"items":{"type":"number"}},"required":["used_bytes","limit_bytes","items"]}},"required":["success","items","usage"]}}}},"404":{"description":"Unknown media","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Library full","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/library/import":{"post":{"security":[{"ApiKey":[]}],"tags":["Media"],"summary":"Import a file into the library from a link","description":"A Google Drive or Dropbox share link (shared as “anyone with the link”), or any public https link to a video, photo or PDF. The file is copied in and kept.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","maxLength":2000,"format":"uri"},"title":{"type":"string","maxLength":200}},"required":["url"]}}}},"responses":{"200":{"description":"Imported","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"item":{"type":"object","properties":{"media_id":{"type":"string"},"kind":{"type":"string","enum":["video","photo","document"]},"title":{"type":["string","null"]},"filename":{"type":["string","null"]},"content_type":{"type":"string"},"size_bytes":{"type":"number"},"duration_seconds":{"type":["number","null"]},"width":{"type":["number","null"]},"height":{"type":["number","null"]},"saved_at":{"type":"string"},"url":{"type":"string","description":"A link to the file, valid for an hour"}},"required":["media_id","kind","title","filename","content_type","size_bytes","duration_seconds","width","height","saved_at","url"]},"usage":{"type":"object","properties":{"used_bytes":{"type":"number"},"limit_bytes":{"type":"number"},"items":{"type":"number"}},"required":["used_bytes","limit_bytes","items"]}},"required":["success","item","usage"]}}}},"400":{"description":"Could not fetch","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Too large or library full","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/library/{media_id}":{"delete":{"security":[{"ApiKey":[]}],"tags":["Media"],"summary":"Take media out of the library","description":"The file is deleted once no post waiting to go out uses it.","parameters":[{"schema":{"type":"string"},"required":true,"name":"media_id","in":"path"}],"responses":{"200":{"description":"Removed","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"media_id":{"type":"string"}},"required":["success","media_id"]}}}},"404":{"description":"Not in the library","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/library/{media_id}/file":{"get":{"security":[{"ApiKey":[]}],"tags":["Media"],"summary":"Download a library file (redirects to a short-lived link)","parameters":[{"schema":{"type":"string"},"required":true,"name":"media_id","in":"path"}],"responses":{"302":{"description":"To the file"},"404":{"description":"Not in the library","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/approval-links":{"post":{"security":[{"ApiKey":[]}],"tags":["Approvals"],"summary":"Send scheduled posts to a client for approval","description":"Each post waits for the client’s approval before it publishes; approving one whose time has passed publishes it at once. Editing a post sends it back for approval. A post leaves any link it was in before.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"profile_username":{"type":"string"},"job_ids":{"type":"array","items":{"type":"string"},"maxItems":100,"description":"Scheduled posts, by job_id"},"request_ids":{"type":"array","items":{"type":"string"},"maxItems":100,"description":"Or by request_id"},"title":{"type":"string","maxLength":120},"note":{"type":"string","maxLength":1000,"description":"Shown to the client above the posts"},"expires_in_days":{"type":"integer","minimum":1,"maximum":60,"description":"Default 14"}},"required":["profile_username"]}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"approval_link":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"note":{"type":["string","null"]},"url":{"type":"string","description":"Send this to the client; it works without an account until expires_at"},"expires_at":{"type":"string"},"created_at":{"type":"string"},"posts":{"type":"object","properties":{"pending":{"type":"number"},"approved":{"type":"number"},"changes":{"type":"number"}},"required":["pending","approved","changes"]}},"required":["id","title","note","url","expires_at","created_at","posts"]}},"required":["success","approval_link"]}}}},"400":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Profile not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"security":[{"ApiKey":[]}],"tags":["Approvals"],"summary":"Approval links, newest first, with how many posts are approved","parameters":[{"schema":{"type":"string"},"required":false,"name":"profile_username","in":"query"}],"responses":{"200":{"description":"Links","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"approval_links":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"note":{"type":["string","null"]},"url":{"type":"string","description":"Send this to the client; it works without an account until expires_at"},"expires_at":{"type":"string"},"created_at":{"type":"string"},"posts":{"type":"object","properties":{"pending":{"type":"number"},"approved":{"type":"number"},"changes":{"type":"number"}},"required":["pending","approved","changes"]}},"required":["id","title","note","url","expires_at","created_at","posts"]}}},"required":["success","approval_links"]}}}}}}},"/v1/approval-links/{id}":{"delete":{"security":[{"ApiKey":[]}],"tags":["Approvals"],"summary":"Delete a link: its posts stop waiting and publish as scheduled","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Deleted","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]}},"required":["success"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/analytics/{profile_username}/impressions":{"get":{"security":[{"ApiKey":[]}],"tags":["Analytics"],"summary":"Impressions and views added up over a period, per network and per day","description":"Over the posts the profile published in the period, from the readings Reelspan keeps (each post is read about two days after it goes out, so the last two days fill in later). `metrics` picks other post numbers to add up (likes, comments, shares…).","parameters":[{"schema":{"type":"string"},"required":true,"name":"profile_username","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":365,"description":"The last N days (default 30)"},"required":false,"description":"The last N days (default 30)","name":"days","in":"query"},{"schema":{"type":"string","format":"date","description":"Or a range: YYYY-MM-DD, with end_date"},"required":false,"description":"Or a range: YYYY-MM-DD, with end_date","name":"start_date","in":"query"},{"schema":{"type":"string","format":"date","description":"Inclusive"},"required":false,"description":"Inclusive","name":"end_date","in":"query"},{"schema":{"type":"string","description":"Comma-separated"},"required":false,"description":"Comma-separated","name":"platforms","in":"query"},{"schema":{"type":"string","description":"Comma-separated, default impressions,views"},"required":false,"description":"Comma-separated, default impressions,views","name":"metrics","in":"query"}],"responses":{"200":{"description":"Totals","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"profile_username":{"type":"string"},"from":{"type":"string"},"to":{"type":"string"},"posts":{"type":"number"},"posts_with_stats":{"type":"number"},"total":{"type":"object","additionalProperties":{"type":"number"}},"by_platform":{"type":"object","additionalProperties":{"type":"object","additionalProperties":{"type":"number"}}},"by_day":{"type":"array","items":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}}},"required":["success","profile_username","from","to","posts","posts_with_stats","total","by_platform","by_day"]}}}},"400":{"description":"Invalid range","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Profile not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/post-analytics":{"get":{"security":[{"ApiKey":[]}],"tags":["Analytics"],"summary":"Stats for any post of a profile’s account, by the network’s post id","description":"For posts made outside Reelspan too. Cached for 10 minutes.","parameters":[{"schema":{"type":"string"},"required":true,"name":"platform","in":"query"},{"schema":{"type":"string"},"required":true,"name":"platform_post_id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"user","in":"query"},{"schema":{"type":"string"},"required":false,"name":"profile_username","in":"query"}],"responses":{"200":{"description":"Stats","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"platform":{"type":"string"},"platform_post_id":{"type":"string"},"metrics":{"type":"object","additionalProperties":{}}},"required":["success","platform","platform_post_id","metrics"]}}}},"400":{"description":"Not available","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such profile or account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/reports/{profile_username}":{"get":{"security":[{"ApiKey":[]}],"tags":["Analytics"],"summary":"A period’s report: posts, interactions, follower growth and top posts","description":"Interactions add up likes, comments, replies, reposts, shares, quotes and saves of posts with numbers (read about two days after each post goes out). Followers come from the daily account readings.","parameters":[{"schema":{"type":"string"},"required":true,"name":"profile_username","in":"path"},{"schema":{"type":"string","description":"1 to 365, default 30"},"required":false,"description":"1 to 365, default 30","name":"days","in":"query"}],"responses":{"200":{"description":"Report","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"profile_username":{"type":"string"},"report":{"type":"object","additionalProperties":{}}},"required":["success","profile_username","report"]}}}},"404":{"description":"Profile not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/best-times/{profile_username}":{"get":{"security":[{"ApiKey":[]}],"tags":["Analytics"],"summary":"Best hours and weekdays to post, from your own results","description":"Each post’s numbers are read about two days after it goes out. Per network, the hours (0-23) and weekdays (0 = Monday) whose posts did better than the profile’s usual post are returned, best first, in `timezone`. A network needs 8 posts with numbers first; until then `needed` says how many more.","parameters":[{"schema":{"type":"string"},"required":true,"name":"profile_username","in":"path"},{"schema":{"type":"string","description":"IANA zone, default UTC"},"required":false,"description":"IANA zone, default UTC","name":"timezone","in":"query"},{"schema":{"type":"string","description":"Comma-separated"},"required":false,"description":"Comma-separated","name":"platforms","in":"query"}],"responses":{"200":{"description":"Best times","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"profile_username":{"type":"string"},"timezone":{"type":"string"},"best_times":{"type":"object","additionalProperties":{"type":"object","properties":{"posts":{"type":"number"},"needed":{"type":"number"},"hours":{"type":"array","items":{"type":"object","properties":{"lift":{"type":"number","description":"How posts at this time did against your usual post on the network: 1.6 = 60% better"},"posts":{"type":"number"},"hour":{"type":"number"}},"required":["lift","posts","hour"]}},"days":{"type":"array","items":{"type":"object","properties":{"lift":{"type":"number","description":"How posts at this time did against your usual post on the network: 1.6 = 60% better"},"posts":{"type":"number"},"day":{"type":"number"}},"required":["lift","posts","day"]}}},"required":["posts","needed","hours","days"]}}},"required":["success","profile_username","timezone","best_times"]}}}},"400":{"description":"Unknown time zone","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Profile not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/analytics/{profile_username}":{"get":{"security":[{"ApiKey":[]}],"tags":["Analytics"],"summary":"Account totals per network (followers, views, posts…)","description":"Keyed by platform. Networks whose stats are unavailable return `{ error, error_code }`. Cached for 10 minutes. With `days`, each network also gets `change`: how much each number moved over those days, from the daily readings.","parameters":[{"schema":{"type":"string"},"required":true,"name":"profile_username","in":"path"},{"schema":{"type":"string","description":"Comma-separated; default all connected"},"required":false,"description":"Comma-separated; default all connected","name":"platforms","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":365,"description":"Also report the change over this many days"},"required":false,"description":"Also report the change over this many days","name":"days","in":"query"}],"responses":{"200":{"description":"Stats","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"404":{"description":"Profile not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/analytics/{profile_username}/history":{"get":{"security":[{"ApiKey":[]}],"tags":["Analytics"],"summary":"Account numbers per day (followers, views…)","description":"One row per account per UTC day, oldest first: the last reading of that day. Kept from the day an account’s stats were first read. `format=csv` returns a spreadsheet.","parameters":[{"schema":{"type":"string"},"required":true,"name":"profile_username","in":"path"},{"schema":{"type":"string","description":"1 to 365, default 30"},"required":false,"description":"1 to 365, default 30","name":"days","in":"query"},{"schema":{"type":"string","description":"Comma-separated"},"required":false,"description":"Comma-separated","name":"platforms","in":"query"},{"schema":{"type":"string","enum":["json","csv"]},"required":false,"name":"format","in":"query"}],"responses":{"200":{"description":"History","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"profile_username":{"type":"string"},"days":{"type":"number"},"history":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"platform":{"type":"string"}},"required":["date","platform"],"additionalProperties":{"type":"number"}}}},"required":["success","profile_username","days","history"]}},"text/csv":{"schema":{"type":"string"}}}},"404":{"description":"Profile not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/post-analytics/{request_id}":{"get":{"security":[{"ApiKey":[]}],"tags":["Analytics"],"summary":"Stats for the posts of one publish request","parameters":[{"schema":{"type":"string"},"required":true,"name":"request_id","in":"path"},{"schema":{"type":"string"},"required":false,"name":"platform","in":"query"}],"responses":{"200":{"description":"Stats","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"request_id":{"type":"string"},"results":{"type":"object","additionalProperties":{}}},"required":["success","request_id","results"]}}}},"404":{"description":"Request not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/ai/video-captions":{"post":{"tags":["AI"],"summary":"Write captions for each network from a video","description":"Samples frames from the video (up to 100 MB, 5 minutes) and writes a title/caption per network within its limits. Uses one AI credit. Platforms: youtube, instagram, tiktok, facebook, x, threads, bluesky, linkedin, pinterest.","security":[{"ApiKey":[]}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"video":{"type":"string","description":"Video file or public https URL"},"platforms":{"type":"string","description":"Comma-separated; default youtube,instagram,tiktok"},"language":{"type":"string","description":"e.g. English, Urdu, es; detected when omitted"},"context":{"type":"string","description":"Your notes about the video: facts, names, the angle you want"}},"required":["video"]}}}},"responses":{"200":{"description":"Captions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Captions"}}}},"429":{"description":"No credits left","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"AI not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/posts/photos":{"post":{"tags":["Publishing"],"summary":"Publish one photo or a carousel","security":[{"ApiKey":[]}],"parameters":[{"schema":{"type":"string","description":"Makes retries safe: the same key within 24 hours returns the first answer (`X-Idempotency-Key` works too)"},"required":false,"description":"Makes retries safe: the same key within 24 hours returns the first answer (`X-Idempotency-Key` works too)","name":"Idempotency-Key","in":"header"},{"schema":{"type":"string","description":"Your own request_id (8-100 letters, digits, _ or -), and the idempotency key when none is sent"},"required":false,"description":"Your own request_id (8-100 letters, digits, _ or -), and the idempotency key when none is sent","name":"X-Request-Id","in":"header"},{"schema":{"type":"string","description":"Same as the external_id field, for your own reference"},"required":false,"description":"Same as the external_id field, for your own reference","name":"X-External-Id","in":"header"}],"requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/UploadPhotosForm"}}}},"responses":{"200":{"description":"Per-platform results, or a request_id when it runs in the background","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"request_id":{"type":"string"}},"required":["success","request_id"],"additionalProperties":{}}}}},"202":{"description":"Scheduled","content":{"application/json":{"example":{"success":true,"job_id":"sched_3Jd9aQ","request_id":"post_8fK2xQ","scheduled_date":"2026-11-08T14:00:00.000Z"},"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"job_id":{"type":"string"},"request_id":{"type":"string"},"scheduled_date":{"type":"string"}},"required":["success","job_id","request_id","scheduled_date"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Monthly quota or rate limit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/posts/document":{"post":{"tags":["Publishing"],"summary":"Publish a document (PDF, PowerPoint, Word) to LinkedIn","security":[{"ApiKey":[]}],"parameters":[{"schema":{"type":"string","description":"Makes retries safe: the same key within 24 hours returns the first answer (`X-Idempotency-Key` works too)"},"required":false,"description":"Makes retries safe: the same key within 24 hours returns the first answer (`X-Idempotency-Key` works too)","name":"Idempotency-Key","in":"header"},{"schema":{"type":"string","description":"Your own request_id (8-100 letters, digits, _ or -), and the idempotency key when none is sent"},"required":false,"description":"Your own request_id (8-100 letters, digits, _ or -), and the idempotency key when none is sent","name":"X-Request-Id","in":"header"},{"schema":{"type":"string","description":"Same as the external_id field, for your own reference"},"required":false,"description":"Same as the external_id field, for your own reference","name":"X-External-Id","in":"header"}],"requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/UploadDocumentForm"}}}},"responses":{"200":{"description":"Per-platform results, or a request_id when it runs in the background","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"request_id":{"type":"string"}},"required":["success","request_id"],"additionalProperties":{}}}}},"202":{"description":"Scheduled","content":{"application/json":{"example":{"success":true,"job_id":"sched_3Jd9aQ","request_id":"post_8fK2xQ","scheduled_date":"2026-11-08T14:00:00.000Z"},"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"job_id":{"type":"string"},"request_id":{"type":"string"},"scheduled_date":{"type":"string"}},"required":["success","job_id","request_id","scheduled_date"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Monthly quota or rate limit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/posts/text":{"post":{"tags":["Publishing"],"summary":"Publish a text-only post","description":"JSON or multipart.","security":[{"ApiKey":[]}],"parameters":[{"schema":{"type":"string","description":"Makes retries safe: the same key within 24 hours returns the first answer (`X-Idempotency-Key` works too)"},"required":false,"description":"Makes retries safe: the same key within 24 hours returns the first answer (`X-Idempotency-Key` works too)","name":"Idempotency-Key","in":"header"},{"schema":{"type":"string","description":"Your own request_id (8-100 letters, digits, _ or -), and the idempotency key when none is sent"},"required":false,"description":"Your own request_id (8-100 letters, digits, _ or -), and the idempotency key when none is sent","name":"X-Request-Id","in":"header"},{"schema":{"type":"string","description":"Same as the external_id field, for your own reference"},"required":false,"description":"Same as the external_id field, for your own reference","name":"X-External-Id","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadTextForm"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/UploadTextForm"}}}},"responses":{"200":{"description":"Per-platform results, or a request_id when it runs in the background","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"request_id":{"type":"string"}},"required":["success","request_id"],"additionalProperties":{}}}}},"202":{"description":"Scheduled","content":{"application/json":{"example":{"success":true,"job_id":"sched_3Jd9aQ","request_id":"post_8fK2xQ","scheduled_date":"2026-11-08T14:00:00.000Z"},"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"job_id":{"type":"string"},"request_id":{"type":"string"},"scheduled_date":{"type":"string"}},"required":["success","job_id","request_id","scheduled_date"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Monthly quota or rate limit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/media/uploads":{"post":{"tags":["Publishing"],"summary":"Start a large upload straight to storage (files over 100 MB)","description":"Returns one signed PUT URL per part. PUT each part (bytes from (part_number - 1) × part_size) to its URL, keep the ETag header of each response, then POST /media/uploads/{media_id}/complete with {parts: [{part_number, etag}]}. The returned media_id works as video_media_id or photo_media_ids[]. Requests through app.reelspan.com are limited to 100 MB each, so use this for anything bigger.","security":[{"ApiKey":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["video","photo","document"]},"size_bytes":{"type":"integer","exclusiveMinimum":0},"filename":{"type":"string"}},"required":["kind","size_bytes"]}}}},"responses":{"200":{"description":"Part URLs","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"media_id":{"type":"string"},"part_size":{"type":"number"},"parts":{"type":"array","items":{"type":"object","properties":{"part_number":{"type":"number"},"url":{"type":"string"}},"required":["part_number","url"]}},"expires_in":{"type":"number"}},"required":["success","media_id","part_size","parts","expires_in"]}}}},"413":{"description":"Larger than the plan allows","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/media/uploads/{media_id}/complete":{"post":{"tags":["Publishing"],"summary":"Finish a large upload; the stored file is checked (size, type) before it can be used","security":[{"ApiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"media_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"parts":{"type":"array","items":{"type":"object","properties":{"part_number":{"type":"integer"},"etag":{"type":"string"}},"required":["part_number","etag"]}}},"required":["parts"]}}}},"responses":{"200":{"description":"Stored","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"media_id":{"type":"string"},"kind":{"type":"string","enum":["video","photo","document"]},"content_type":{"type":"string"},"size_bytes":{"type":"number"},"duration_seconds":{"type":["number","null"]}},"required":["success","media_id","kind","content_type","size_bytes","duration_seconds"]}}}},"400":{"description":"Not the expected kind of file, or unsupported","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown or expired upload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/media/upload":{"post":{"tags":["Publishing"],"summary":"Upload a video or photo once, to publish or write captions from later","description":"Multipart field `file`. Use the returned media_id as video_media_id, photo_media_ids[] or <platform>_photo_media_ids[], or with adapt-captions.","security":[{"ApiKey":[]}],"parameters":[{"schema":{"type":"string","enum":["video","photo","document"],"default":"video"},"required":false,"name":"kind","in":"query"}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","description":"The file (binary)"}},"required":["file"]}}}},"responses":{"200":{"description":"Stored","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"media_id":{"type":"string"},"kind":{"type":"string","enum":["video","photo","document"]},"content_type":{"type":"string"},"size_bytes":{"type":"number"},"duration_seconds":{"type":["number","null"]}},"required":["success","media_id","kind","content_type","size_bytes","duration_seconds"]}}}},"400":{"description":"Not a supported file","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Too large for the plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/posts/video":{"post":{"tags":["Publishing"],"summary":"Publish a video to one or more networks","description":"Multipart upload. Waits up to 59 s for the result, then switches to background processing. Send `Idempotency-Key` to make retries safe.","security":[{"ApiKey":[]}],"parameters":[{"schema":{"type":"string","description":"Makes retries safe: the same key within 24 hours returns the first answer (`X-Idempotency-Key` works too)"},"required":false,"description":"Makes retries safe: the same key within 24 hours returns the first answer (`X-Idempotency-Key` works too)","name":"Idempotency-Key","in":"header"},{"schema":{"type":"string","description":"Your own request_id (8-100 letters, digits, _ or -), and the idempotency key when none is sent"},"required":false,"description":"Your own request_id (8-100 letters, digits, _ or -), and the idempotency key when none is sent","name":"X-Request-Id","in":"header"},{"schema":{"type":"string","description":"Same as the external_id field, for your own reference"},"required":false,"description":"Same as the external_id field, for your own reference","name":"X-External-Id","in":"header"}],"requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/UploadVideoForm"}}}},"responses":{"200":{"description":"Finished (per-platform results) or moved to the background (request_id)","content":{"application/json":{"example":{"success":true,"request_id":"post_8fK2xQ","results":{"tiktok":{"success":true,"url":"https://www.tiktok.com/@brand/video/7430000000000000000","post_id":"7430000000000000000"},"youtube":{"success":true,"url":"https://youtube.com/shorts/dQw4w9WgXcQ","post_id":"dQw4w9WgXcQ"},"instagram":{"success":false,"error":"Instagram is still processing the video","error_code":"instagram_processing_timeout"}},"usage":{"count":3,"limit":null,"last_reset":"2026-11-01T00:00:00.000Z"}},"schema":{"anyOf":[{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"request_id":{"type":"string"},"results":{"type":"object","additionalProperties":{"type":"object","properties":{"success":{"type":"boolean"},"url":{"type":["string","null"]},"error":{"type":"string"}},"required":["success"],"additionalProperties":{}}},"usage":{"type":"object","properties":{"count":{"type":"number"},"limit":{"type":["number","null"]},"last_reset":{"type":"string"}},"required":["count","limit","last_reset"]}},"required":["success","request_id","results","usage"]},{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"message":{"type":"string"},"request_id":{"type":"string"},"total_platforms":{"type":"number"}},"required":["success","message","request_id","total_platforms"]}]}}}},"202":{"description":"Scheduled","content":{"application/json":{"example":{"success":true,"job_id":"sched_3Jd9aQ","request_id":"post_8fK2xQ","scheduled_date":"2026-11-08T14:00:00.000Z"},"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"job_id":{"type":"string"},"request_id":{"type":"string"},"scheduled_date":{"type":"string"}},"required":["success","job_id","request_id","scheduled_date"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Same Idempotency-Key still running","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"File too large for the plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Monthly quota or rate limit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/youtube/thumbnail":{"post":{"tags":["Publishing"],"summary":"Set a new thumbnail on a published YouTube video","description":"JPEG, PNG, GIF or BMP up to 2 MB, as a multipart `thumbnail` file, a `thumbnail_url` or a `thumbnail_media_id`. Custom thumbnails need a verified channel (youtube.com/verify); YouTube answers 403 otherwise. Shorts don’t show custom thumbnails.","security":[{"ApiKey":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"user":{"type":"string","description":"Profile username, with video_id"},"video_id":{"type":"string","description":"The YouTube video id"},"request_id":{"type":"string","description":"Or the Reelspan request that published the video"},"thumbnail_url":{"type":"string","description":"A public https URL of the image"},"thumbnail_media_id":{"type":"string","description":"An image uploaded earlier with POST /v1/media/upload?kind=photo"}}}},"multipart/form-data":{"schema":{"type":"object","properties":{"user":{"type":"string","description":"Profile username, with video_id"},"video_id":{"type":"string","description":"The YouTube video id"},"request_id":{"type":"string","description":"Or the Reelspan request that published the video"},"thumbnail_url":{"type":"string","description":"A public https URL of the image"},"thumbnail_media_id":{"type":"string","description":"An image uploaded earlier with POST /v1/media/upload?kind=photo"},"thumbnail":{"type":"string","description":"The image file (binary)"}}}}}},"responses":{"200":{"description":"Set","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"video_id":{"type":"string"},"width":{"type":["number","null"]},"height":{"type":["number","null"]},"thumbnails":{"type":"object","additionalProperties":{}}},"required":["success","video_id","width","height","thumbnails"]}}}},"400":{"description":"Invalid input, or the network can’t do this (`platform_not_supported`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Waits for a network permission Reelspan has applied for (`permission_pending`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such request, profile, account or post","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The account must be reconnected (`reauth_required`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Larger than 2 MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"The network refused; `error_code` says why","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"webhooks":{}}