{"openapi":"3.0.0","info":{"title":"ContentStudio API v1","description":"ContentStudio API for managing content, social media, and workspace operations","contact":{"name":"ContentStudio Support","url":"https:\/\/docs.contentstudio.io","email":"support@contentstudio.io"},"license":{"name":"ContentStudio API License","url":"https:\/\/contentstudio.io\/terms-and-conditions"},"version":"1.0.0"},"paths":{"\/api\/v1\/workspaces\/{workspace_id}\/accounts":{"get":{"tags":["\ud83d\udcf1 Social Accounts"],"summary":"Get social media accounts for a workspace","description":"Retrieve paginated list of social media accounts for a specific workspace with optional platform filtering","operationId":"1d4389fe8abb916ea97842ea8030f595","parameters":[{"name":"workspace_id","in":"path","description":"Workspace ID","required":true,"schema":{"type":"string","example":"610a1e660cb41530ca40d372"}},{"name":"platform","in":"query","description":"Filter by platform(s). Use comma-separated values for multiple platforms","required":false,"schema":{"type":"string","enum":["facebook","twitter","linkedin","pinterest","instagram","gmb","youtube","tiktok","tumblr","threads","bluesky","telegram"],"example":"facebook,instagram,telegram"}},{"name":"search","in":"query","description":"Search term to filter accounts by name (e.g. 'BloomVille', 'Hello Support')","required":false,"schema":{"type":"string","example":"BloomVille"}},{"name":"page","in":"query","description":"Page number for pagination","required":false,"schema":{"type":"integer","minimum":1,"example":1}},{"name":"per_page","in":"query","description":"Number of items per page (max: 100)","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"example":10}}],"responses":{"200":{"description":"Accounts retrieved successfully","content":{"application\/json":{"schema":{"properties":{"status":{"type":"boolean","example":true},"message":{"type":"string","example":"Accounts retrieved successfully"},"current_page":{"type":"integer","example":1},"per_page":{"type":"integer","example":10},"total":{"type":"integer","example":25},"last_page":{"type":"integer","example":3},"from":{"type":"integer","example":1},"to":{"type":"integer","example":10},"data":{"type":"array","items":{"properties":{"_id":{"description":"Platform-specific account identifier","type":"string","example":"123456789"},"platform":{"type":"string","enum":["facebook","twitter","linkedin","pinterest","instagram","gmb","youtube","tiktok","tumblr","threads","bluesky","telegram"],"example":"telegram"},"account_name":{"type":"string","example":"My Business Page"},"profile_picture":{"type":"string","example":"https:\/\/example.com\/profile.jpg"},"status":{"type":"string","example":"active"},"connected_at":{"type":"string","format":"date-time","example":"2024-01-15T10:30:00.000Z"},"expires_at":{"type":"string","format":"date-time","example":"2024-03-15T10:30:00.000Z"}},"type":"object"}}},"type":"object"}}}},"404":{"description":"Workspace not found or access denied","content":{"application\/json":{"schema":{"properties":{"status":{"type":"boolean","example":false},"message":{"type":"string","example":"Workspace not found or access denied"}},"type":"object"}}}},"429":{"description":"Too Many Requests - Rate limit exceeded","content":{"application\/json":{"schema":{"properties":{"status":{"type":"boolean","example":false},"message":{"type":"string","example":"Too Many Requests. Rate limit exceeded."},"error_code":{"type":"string","example":"RATE_LIMIT_EXCEEDED"},"retry_after":{"type":"integer","example":60}},"type":"object"}}}},"401":{"description":"Unauthorized - Invalid or missing API key","content":{"application\/json":{"schema":{"properties":{"status":{"type":"boolean","example":false},"message":{"type":"string","example":"Invalid or revoked API key"}},"type":"object"}}}}},"security":[{"ApiKeyHeader":[]}]}},"\/api\/v1\/workspaces\/{workspace_id}\/add\/bluesky":{"post":{"tags":["\ud83d\udd17 Account Connection"],"summary":"Connect a Bluesky account with credentials","description":"Connects a Bluesky profile using a handle and app password. No browser step is required.","operationId":"addBlueskyAccount","parameters":[{"name":"workspace_id","in":"path","description":"Workspace ID","required":true,"schema":{"type":"string","example":"610a1e660cb41530ca40d372"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["handle","app_password"],"properties":{"handle":{"type":"string","maxLength":255,"example":"yourname.bsky.social"},"app_password":{"type":"string","example":"xxxx-xxxx-xxxx-xxxx"}},"type":"object"}}}},"responses":{"200":{"description":"Bluesky account connected successfully","content":{"application\/json":{"schema":{"properties":{"status":{"type":"boolean","example":true},"message":{"type":"string","example":"Bluesky account 'yourname.bsky.social' connected successfully."},"data":{"properties":{"account_id":{"type":"string","example":"610a1e660cb41530ca40d372"},"platform":{"type":"string","example":"bluesky"},"account_name":{"type":"string","example":"Your Display Name"},"handle":{"type":"string","example":"yourname.bsky.social"},"profile_picture":{"type":"string","example":"https:\/\/cdn.bsky.social\/...","nullable":true},"status":{"type":"string","example":"active"},"connected_at":{"type":"string","format":"date-time","example":"2026-04-16T12:00:00Z"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Invalid Bluesky credentials","content":{"application\/json":{"schema":{"properties":{"status":{"type":"boolean","example":false},"message":{"type":"string","example":"Unable to authenticate with Bluesky. Please verify your handle and app password."},"error_code":{"type":"string","example":"INVALID_CREDENTIALS"},"help":{"properties":{"handle_format":{"type":"string","example":"Your handle looks like yourname.bsky.social or a custom domain."},"app_password_steps":{"type":"array","items":{"type":"string","example":"Go to https:\/\/bsky.app\/settings\/app-passwords"}}},"type":"object"}},"type":"object"}}}},"403":{"description":"Forbidden or account limit reached","content":{"application\/json":{"schema":{"properties":{"status":{"type":"boolean","example":false},"message":{"type":"string","example":"Your workspace has reached the maximum number of connected social accounts. Upgrade your plan to add more."},"error_code":{"type":"string","example":"ACCOUNT_LIMIT_REACHED"}},"type":"object"}}}},"409":{"description":"Duplicate account","content":{"application\/json":{"schema":{"properties":{"status":{"type":"boolean","example":false},"message":{"type":"string","example":"Bluesky account 'yourname.bsky.social' is already connected to this workspace."},"error_code":{"type":"string","example":"DUPLICATE_ACCOUNT"}},"type":"object"}}}},"422":{"description":"Validation error","content":{"application\/json":{"schema":{"properties":{"status":{"type":"boolean","example":false},"message":{"type":"string","example":"The handle field is required."},"error_code":{"type":"string","example":"VALIDATION_ERROR"}},"type":"object"}}}}},"security":[{"ApiKeyHeader":[]}]}},"\/api\/v1\/workspaces\/{workspace_id}\/add\/facebook-group":{"post":{"tags":["\ud83d\udd17 Account Connection"],"summary":"Add a Facebook Group manually","description":"Adds a Facebook Group connection using its name and an optional image URL. No browser step is required.","operationId":"addFacebookGroupAccount","parameters":[{"name":"workspace_id","in":"path","description":"Workspace ID","required":true,"schema":{"type":"string","example":"610a1e660cb41530ca40d372"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["name"],"properties":{"name":{"type":"string","maxLength":255,"minLength":3,"example":"My Facebook Group"},"image":{"type":"string","format":"uri","example":"https:\/\/example.com\/group.jpg","nullable":true}},"type":"object"}}}},"responses":{"200":{"description":"Facebook Group added successfully","content":{"application\/json":{"schema":{"properties":{"status":{"type":"boolean","example":true},"message":{"type":"string","example":"Facebook Group 'My Facebook Group' added successfully."},"data":{"properties":{"account_id":{"type":"string","example":"610a1e660cb41530ca40d372"},"platform":{"type":"string","example":"facebook"},"account_type":{"type":"string","example":"group"},"account_name":{"type":"string","example":"My Facebook Group"},"profile_picture":{"type":"string","example":"https:\/\/example.com\/group.jpg","nullable":true},"status":{"type":"string","example":"active"},"connected_at":{"type":"string","format":"date-time","example":"2026-04-16T12:00:00Z"}},"type":"object"}},"type":"object"}}}},"403":{"description":"Forbidden or account limit reached","content":{"application\/json":{"schema":{"properties":{"status":{"type":"boolean","example":false},"message":{"type":"string","example":"You do not have permission to connect social accounts to this workspace."},"error_code":{"type":"string","example":"INSUFFICIENT_PERMISSIONS"}},"type":"object"}}}},"409":{"description":"Duplicate Facebook Group","content":{"application\/json":{"schema":{"properties":{"status":{"type":"boolean","example":false},"message":{"type":"string","example":"A Facebook Group with the name 'My Facebook Group' already exists in this workspace."},"error_code":{"type":"string","example":"DUPLICATE_ACCOUNT"}},"type":"object"}}}},"422":{"description":"Validation error","content":{"application\/json":{"schema":{"properties":{"status":{"type":"boolean","example":false},"message":{"type":"string","example":"The name field is required."},"error_code":{"type":"string","example":"VALIDATION_ERROR"}},"type":"object"}}}}},"security":[{"ApiKeyHeader":[]}]}},"\/api\/v1\/workspaces\/{workspace_id}\/campaigns":{"get":{"tags":["\ud83d\udcc2 Campaigns"],"summary":"Get campaigns for a workspace","description":"Retrieve paginated list of campaigns (folders) for a specific workspace, sorted alphabetically by name.","operationId":"fetchCampaigns","parameters":[{"name":"workspace_id","in":"path","description":"Workspace ID","required":true,"schema":{"type":"string","example":"610a1e660cb41530ca40d372"}},{"name":"page","in":"query","description":"Page number for pagination","required":false,"schema":{"type":"integer","minimum":1,"example":1}},{"name":"per_page","in":"query","description":"Number of items per page (max: 100)","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"example":10}},{"name":"search","in":"query","description":"Search term to filter campaigns by name (case-insensitive partial match)","required":false,"schema":{"type":"string","example":"marketing"}}],"responses":{"200":{"description":"Campaigns retrieved successfully","content":{"application\/json":{"schema":{"properties":{"status":{"type":"boolean","example":true},"message":{"type":"string","example":"Campaigns retrieved successfully"},"current_page":{"type":"integer","example":1},"per_page":{"type":"integer","example":10},"total":{"type":"integer","example":25},"last_page":{"type":"integer","example":3},"from":{"type":"integer","example":1},"to":{"type":"integer","example":10},"data":{"type":"array","items":{"properties":{"_id":{"type":"string","example":"625d06734ceb636c2f5e7743"},"name":{"type":"string","example":"Q1 Marketing"},"color":{"type":"string","example":"color_9"}},"type":"object"}}},"type":"object"}}}},"401":{"description":"Unauthorized - Invalid or missing API key","content":{"application\/json":{"schema":{"properties":{"status":{"type":"boolean","example":false},"message":{"type":"string","example":"Invalid or revoked API key"}},"type":"object"}}}},"429":{"description":"Too Many Requests - Rate limit exceeded","content":{"application\/json":{"schema":{"properties":{"status":{"type":"boolean","example":false},"message":{"type":"string","example":"Too Many Requests. Rate limit exceeded."},"error_code":{"type":"string","example":"RATE_LIMIT_EXCEEDED"},"retry_after":{"type":"integer","example":60}},"type":"object"}}}}},"security":[{"ApiKeyHeader":[]}]}},"\/api\/v1\/workspaces\/{workspace_id}\/posts\/{post_id}\/comments":{"get":{"tags":["\ud83d\udcac Comments"],"summary":"Fetch post comments","description":"Retrieve a paginated list of comments for a specific post","operationId":"fetchComments","parameters":[{"name":"workspace_id","in":"path","description":"Workspace ID","required":true,"schema":{"type":"string","example":"610a1e660cb41530ca40d372"}},{"name":"post_id","in":"path","description":"Post\/Plan ID","required":true,"schema":{"type":"string","example":"66a1f2e4c8b9a1234567890a"}},{"name":"page","in":"query","description":"Page number for pagination","schema":{"type":"integer","default":1,"minimum":1,"example":1}},{"name":"per_page","in":"query","description":"Number of items per page","schema":{"type":"integer","default":20,"maximum":100,"minimum":1,"example":20}}],"responses":{"200":{"description":"Comments retrieved successfully","content":{"application\/json":{"schema":{"properties":{"status":{"type":"boolean","example":true},"message":{"type":"string","example":"Comments fetched successfully"},"current_page":{"type":"integer","example":1},"per_page":{"type":"integer","example":20},"total":{"type":"integer","example":45},"last_page":{"type":"integer","example":3},"from":{"type":"integer","example":1},"to":{"type":"integer","example":20},"data":{"type":"array","items":{"properties":{"_id":{"type":"string","example":"66a1f2e4c8b9a1234567890a"},"comment":{"type":"string","example":"Great post!"},"is_note":{"type":"boolean","example":false},"mentioned_users":{"type":"array","items":{"properties":{"_id":{"type":"string","example":"627a078300a7d866600e7d02"},"name":{"type":"string","example":"John Doe"}},"type":"object"}},"author":{"properties":{"_id":{"type":"string","example":"627a078300a7d866600e7d02"},"name":{"type":"string","example":"Jane Smith"},"profile_picture":{"type":"string","example":"https:\/\/example.com\/avatar.jpg","nullable":true}},"type":"object","nullable":true},"created_at":{"type":"string","format":"date-time","example":"2026-01-15T10:30:00.000000Z"},"updated_at":{"type":"string","format":"date-time","example":"2026-01-15T10:30:00.000000Z"}},"type":"object"}}},"type":"object"}}}},"401":{"description":"Unauthorized - API key missing or invalid"},"404":{"description":"Post not found"},"429":{"description":"Too many requests"}},"security":[{"ApiKeyHeader":[]}]},"post":{"tags":["\ud83d\udcac Comments"],"summary":"Add a comment to a post","description":"Create a new comment or internal note on a post","operationId":"addComment","parameters":[{"name":"workspace_id","in":"path","description":"Workspace ID","required":true,"schema":{"type":"string","example":"610a1e660cb41530ca40d372"}},{"name":"post_id","in":"path","description":"Post\/Plan ID","required":true,"schema":{"type":"string","example":"66a1f2e4c8b9a1234567890a"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["comment"],"properties":{"comment":{"type":"string","example":"This looks great, ready to publish!"},"is_note":{"description":"True for internal note","type":"boolean","example":false},"mentioned_users":{"description":"User IDs to mention","type":"array","items":{"type":"string"},"example":["user456"]}},"type":"object"}}}},"responses":{"201":{"description":"Comment created successfully","content":{"application\/json":{"schema":{"properties":{"status":{"type":"boolean","example":true},"message":{"type":"string","example":"Comment created successfully"},"data":{"properties":{"_id":{"type":"string","example":"66a1f2e4c8b9a1234567890a"},"comment":{"type":"string","example":"Great post!"},"is_note":{"type":"boolean","example":false},"mentioned_users":{"type":"array","items":{"properties":{"_id":{"type":"string","example":"627a078300a7d866600e7d02"},"name":{"type":"string","example":"John Doe"}},"type":"object"}},"author":{"properties":{"_id":{"type":"string","example":"627a078300a7d866600e7d02"},"name":{"type":"string","example":"Jane Smith"},"profile_picture":{"type":"string","example":"https:\/\/example.com\/avatar.jpg","nullable":true}},"type":"object","nullable":true},"created_at":{"type":"string","format":"date-time","example":"2026-01-15T10:30:00.000000Z"},"updated_at":{"type":"string","format":"date-time","example":"2026-01-15T10:30:00.000000Z"}},"type":"object"}},"type":"object"}}}},"400":{"description":"Bad request or validation error"},"401":{"description":"Unauthorized - API key missing or invalid"},"404":{"description":"Post not found"},"429":{"description":"Too many requests"}},"security":[{"ApiKeyHeader":[]}]}},"\/api\/v1\/platforms":{"get":{"tags":["\ud83d\udd17 Account Connection"],"summary":"List platforms available for account connection","description":"Returns supported platforms, their connection method, required fields, and the endpoint to use for each connection flow.","operationId":"listConnectPlatforms","responses":{"200":{"description":"Platforms retrieved successfully","content":{"application\/json":{"schema":{"properties":{"status":{"type":"boolean","example":true},"message":{"type":"string","example":"Platforms available for connection via the API."},"data":{"type":"array","items":{"properties":{"platform":{"type":"string","example":"facebook"},"display_name":{"type":"string","example":"Facebook"},"connection_method":{"type":"string","enum":["oauth","credentials","manual"],"example":"oauth"},"endpoint":{"type":"string","example":"POST \/api\/v1\/workspaces\/{workspace_id}\/connect\/facebook"},"has_account_selection":{"type":"boolean","example":true},"account_types":{"type":"array","items":{"type":"string","example":"page"}},"description":{"type":"string","example":"Connect Facebook pages and profiles. Requires browser-based authorization."},"required_fields":{"type":"object","nullable":true,"additionalProperties":{"type":"string","example":"Your Bluesky handle (e.g. yourname.bsky.social)"}}},"type":"object"}}},"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application\/json":{"schema":{"properties":{"status":{"type":"boolean","example":false},"message":{"type":"string","example":"Unauthorized"}},"type":"object"}}}},"429":{"description":"Too Many Requests","content":{"application\/json":{"schema":{"properties":{"status":{"type":"boolean","example":false},"message":{"type":"string","example":"Too Many Requests. Rate limit exceeded."},"error_code":{"type":"string","example":"RATE_LIMIT_EXCEEDED"},"retry_after":{"type":"integer","example":60}},"type":"object"}}}}},"security":[{"ApiKeyHeader":[]}]}},"\/api\/v1\/workspaces\/{workspace_id}\/connect\/{platform}":{"post":{"tags":["\ud83d\udd17 Account Connection"],"summary":"Initiate an OAuth account connection or reconnection flow","description":"Generates a one-time authorization URL for OAuth-based social account connection. Use process=connect for new accounts and process=reconnect (with account_id) to refresh an expired or invalid account.","operationId":"connectAccount","parameters":[{"name":"workspace_id","in":"path","description":"Workspace ID","required":true,"schema":{"type":"string","example":"610a1e660cb41530ca40d372"}},{"name":"platform","in":"path","description":"OAuth platform key","required":true,"schema":{"type":"string","enum":["facebook","facebook-profile","instagram","instagram-via-facebook","twitter","linkedin","pinterest","tiktok","youtube","threads","gmb","tumblr"],"example":"facebook"}},{"name":"process","in":"query","description":"`connect` to add a new account, `reconnect` to refresh an expired\/invalid account","required":true,"schema":{"type":"string","enum":["connect","reconnect"],"example":"connect"}},{"name":"account_id","in":"query","description":"Required only when process=reconnect \u2014 the account ID to refresh","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Authorization URL generated","content":{"application\/json":{"schema":{"properties":{"status":{"type":"boolean","example":true},"message":{"type":"string","example":"Authorization URL generated. Open this URL in a browser to connect your Facebook account."},"data":{"properties":{"authorization_url":{"type":"string","format":"uri","example":"https:\/\/www.facebook.com\/v18.0\/dialog\/oauth?client_id=...&state=..."},"session_id":{"type":"string","example":"cs_sess_abc123def456"},"platform":{"type":"string","example":"facebook"},"process":{"type":"string","example":"connect"},"account_name":{"description":"Present only when process=reconnect","type":"string","example":"My Business Page"},"expires_at":{"type":"string","format":"date-time","example":"2026-04-16T17:30:00Z"},"next_steps":{"type":"array","items":{"type":"string","example":"Open the authorization_url in a web browser."}},"security":{"properties":{"expires_in_minutes":{"type":"integer","example":30},"single_use":{"type":"boolean","example":true},"warning":{"type":"string","example":"Do not share this URL. It grants one-time access to connect an account to your workspace."}},"type":"object"}},"type":"object"}},"type":"object"}}}},"404":{"description":"Account not found (reconnect only)","content":{"application\/json":{"schema":{"properties":{"status":{"type":"boolean","example":false},"message":{"type":"string","example":"Account '610a1e660cb41530ca40d372' not found in this workspace, or it does not belong to the 'facebook' platform."},"error_code":{"type":"string","example":"ACCOUNT_NOT_FOUND"}},"type":"object"}}}},"422":{"description":"Validation error, invalid platform, wrong endpoint, or account already active","content":{"application\/json":{"schema":{"properties":{"status":{"type":"boolean","example":false},"message":{"type":"string","example":"The process field is required."},"error_code":{"type":"string","example":"VALIDATION_ERROR"}},"type":"object"}}}}},"security":[{"ApiKeyHeader":[]}]}},"\/api\/v1\/workspaces\/{workspace_id}\/content-categories":{"get":{"tags":["\ud83d\udcc1 Content Categories"],"summary":"Get content categories for a workspace","description":"Retrieve list of content categories for a specific workspace with resolved social account information. Global categories are excluded.","operationId":"fetchContentCategories","parameters":[{"name":"workspace_id","in":"path","description":"Workspace ID","required":true,"schema":{"type":"string","example":"610a1e660cb41530ca40d372"}},{"name":"page","in":"query","description":"Page number for pagination","required":false,"schema":{"type":"integer","minimum":1,"example":1}},{"name":"per_page","in":"query","description":"Number of items per page (max: 100)","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"example":10}},{"name":"search","in":"query","description":"Search term(s) to filter categories by name. Comma-separated for multiple terms (e.g., 'marketing,sales')","required":false,"schema":{"type":"string","example":"marketing"}}],"responses":{"200":{"description":"Content categories retrieved successfully","content":{"application\/json":{"schema":{"properties":{"status":{"type":"boolean","example":true},"message":{"type":"string","example":"Content categories retrieved successfully."},"current_page":{"type":"integer","example":1},"per_page":{"type":"integer","example":10},"total":{"type":"integer","example":25},"last_page":{"type":"integer","example":3},"from":{"type":"integer","example":1},"to":{"type":"integer","example":10},"data":{"type":"array","items":{"properties":{"_id":{"type":"string","example":"625d06734ceb636c2f5e7743"},"name":{"type":"string","example":"My Category"},"color":{"type":"string","example":"color_15"},"state":{"type":"string","example":"active"},"accounts":{"type":"array","items":{"properties":{"_id":{"type":"string","example":"106939092115395"},"platform":{"type":"string","example":"facebook"},"name":{"type":"string","example":"My Facebook Page"}},"type":"object"}},"slots_count":{"type":"integer","example":5},"posts_count":{"type":"integer","example":10},"color_code":{"type":"string","example":"#544c72"}},"type":"object"}}},"type":"object"}}}},"404":{"description":"Workspace not found or access denied","content":{"application\/json":{"schema":{"properties":{"status":{"type":"boolean","example":false},"message":{"type":"string","example":"Workspace not found or access denied"}},"type":"object"}}}},"429":{"description":"Too Many Requests - Rate limit exceeded","content":{"application\/json":{"schema":{"properties":{"status":{"type":"boolean","example":false},"message":{"type":"string","example":"Too Many Requests. Rate limit exceeded."},"error_code":{"type":"string","example":"RATE_LIMIT_EXCEEDED"},"retry_after":{"type":"integer","example":60}},"type":"object"}}}},"401":{"description":"Unauthorized - Invalid or missing API key","content":{"application\/json":{"schema":{"properties":{"status":{"type":"boolean","example":false},"message":{"type":"string","example":"Invalid or revoked API key"}},"type":"object"}}}}},"security":[{"ApiKeyHeader":[]}]}},"\/api\/v1\/facebook\/text-backgrounds":{"get":{"tags":["\ud83d\udcd8 Facebook"],"summary":"List Facebook text-post background presets","description":"Returns the full list of Facebook colored-background preset IDs accepted by `facebook_options.facebook_background_id` on POST \/api\/v1\/workspaces\/{workspace_id}\/posts. Backgrounds only apply to plain text posts (no media, no link).","operationId":"listFacebookTextBackgrounds","responses":{"200":{"description":"Text backgrounds retrieved successfully","content":{"application\/json":{"schema":{"properties":{"status":{"type":"boolean","example":true},"message":{"type":"string","example":"Facebook text backgrounds retrieved successfully."},"data":{"type":"array","items":{"properties":{"id":{"description":"Preset ID to pass as facebook_options.facebook_background_id","type":"string","example":"106018623298955"},"type":{"type":"string","enum":["solid","gradient","image"],"example":"solid"},"background_color":{"description":"CSS background value. Empty string for image-type presets.","type":"string","example":"rgb(198, 0, 255)"},"color":{"description":"Text color that pairs with the background.","type":"string","example":"#ffffff"},"description":{"type":"string","example":"Solid purple"},"category":{"type":"string","enum":["ranked","popular","new","more"],"example":"popular"}},"type":"object"}}},"type":"object"}}}},"401":{"description":"Unauthorized - Invalid API key","content":{"application\/json":{"schema":{"properties":{"status":{"type":"boolean","example":false},"message":{"type":"string","example":"Unauthorized"}},"type":"object"}}}},"429":{"description":"Too many requests","content":{"application\/json":{"schema":{"properties":{"status":{"type":"boolean","example":false},"message":{"type":"string","example":"Too many requests"}},"type":"object"}}}}},"security":[{"ApiKeyHeader":[]}]}},"\/api\/v1\/workspaces\/{workspace_id}\/labels":{"get":{"tags":["\ud83c\udff7\ufe0f Labels"],"summary":"Get labels for a workspace","description":"Retrieve paginated list of labels for a specific workspace, sorted alphabetically by name.","operationId":"fetchLabels","parameters":[{"name":"workspace_id","in":"path","description":"Workspace ID","required":true,"schema":{"type":"string","example":"610a1e660cb41530ca40d372"}},{"name":"page","in":"query","description":"Page number for pagination","required":false,"schema":{"type":"integer","minimum":1,"example":1}},{"name":"per_page","in":"query","description":"Number of items per page (max: 100)","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"example":10}},{"name":"search","in":"query","description":"Search term to filter labels by name (case-insensitive partial match)","required":false,"schema":{"type":"string","example":"marketing"}}],"responses":{"200":{"description":"Labels retrieved successfully","content":{"application\/json":{"schema":{"properties":{"status":{"type":"boolean","example":true},"message":{"type":"string","example":"Labels retrieved successfully"},"current_page":{"type":"integer","example":1},"per_page":{"type":"integer","example":10},"total":{"type":"integer","example":25},"last_page":{"type":"integer","example":3},"from":{"type":"integer","example":1},"to":{"type":"integer","example":10},"data":{"type":"array","items":{"properties":{"_id":{"type":"string","example":"625d06734ceb636c2f5e7743"},"name":{"type":"string","example":"Urgent"},"color":{"type":"string","example":"color_1"}},"type":"object"}}},"type":"object"}}}},"401":{"description":"Unauthorized - Invalid or missing API key","content":{"application\/json":{"schema":{"properties":{"status":{"type":"boolean","example":false},"message":{"type":"string","example":"Invalid or revoked API key"}},"type":"object"}}}},"429":{"description":"Too Many Requests - Rate limit exceeded","content":{"application\/json":{"schema":{"properties":{"status":{"type":"boolean","example":false},"message":{"type":"string","example":"Too Many Requests. Rate limit exceeded."},"error_code":{"type":"string","example":"RATE_LIMIT_EXCEEDED"},"retry_after":{"type":"integer","example":60}},"type":"object"}}}}},"security":[{"ApiKeyHeader":[]}]}},"\/api\/v1\/workspaces\/{workspace_id}\/media":{"get":{"tags":["\ud83d\udcc1 Media Library"],"summary":"List media assets","description":"Retrieve a paginated list of media assets for a workspace with filtering, search, and sort options.","operationId":"listMedia","parameters":[{"name":"workspace_id","in":"path","description":"Workspace ID","required":true,"schema":{"type":"string","example":"610a1e660cb41530ca40d372"}},{"name":"page","in":"query","description":"Page number for pagination","schema":{"type":"integer","default":1,"minimum":1,"example":1}},{"name":"per_page","in":"query","description":"Number of items per page (max: 100)","schema":{"type":"integer","default":20,"maximum":100,"minimum":1,"example":20}},{"name":"type","in":"query","description":"Filter by media type","schema":{"type":"string","enum":["images","videos"],"example":"images"}},{"name":"search","in":"query","description":"Search media by name (case-insensitive partial match)","schema":{"type":"string","maxLength":255,"example":"banner"}},{"name":"sort","in":"query","description":"Sort order","schema":{"type":"string","default":"recent","enum":["recent","oldest","size","a2z","z2a"]}}],"responses":{"200":{"description":"Media retrieved successfully","content":{"application\/json":{"schema":{"properties":{"status":{"type":"boolean","example":true},"message":{"type":"string","example":"Media retrieved successfully."},"current_page":{"type":"integer","example":1},"per_page":{"type":"integer","example":20},"total":{"type":"integer","example":150},"last_page":{"type":"integer","example":8},"from":{"type":"integer","example":1},"to":{"type":"integer","example":20},"data":{"type":"array","items":{"properties":{"_id":{"type":"string","example":"625d06734ceb636c2f5e7743"},"name":{"type":"string","example":"banner.jpg"},"url":{"type":"string","example":"https:\/\/storage.googleapis.com\/...\/banner.jpg"},"mime_type":{"type":"string","example":"image\/jpeg"},"extension":{"type":"string","example":"jpg"},"size":{"type":"integer","example":245760},"type":{"type":"string","enum":["image","video","gif"],"example":"image"},"folder_id":{"type":"string","nullable":true},"is_processing":{"type":"boolean","example":false},"created_at":{"type":"string","format":"date-time"},"dimensions":{"properties":{"width":{"type":"integer","example":1920,"nullable":true},"height":{"type":"integer","example":1080,"nullable":true}},"type":"object"}},"type":"object"}}},"type":"object"}}}},"400":{"description":"Validation error"},"401":{"description":"Unauthorized - API key missing or invalid"},"429":{"description":"Too many requests"}},"security":[{"ApiKeyHeader":[]}]},"post":{"tags":["\ud83d\udcc1 Media Library"],"summary":"Upload media","description":"Upload a media file or import from URL into the workspace media library. Provide either a file or a URL, not both.","operationId":"uploadMedia","parameters":[{"name":"workspace_id","in":"path","description":"Workspace ID","required":true,"schema":{"type":"string","example":"610a1e660cb41530ca40d372"}}],"requestBody":{"required":true,"content":{"multipart\/form-data":{"schema":{"properties":{"file":{"description":"Media file to upload (mutually exclusive with url)","type":"string","format":"binary"},"url":{"description":"URL to import media from (mutually exclusive with file)","type":"string","format":"url","example":"https:\/\/example.com\/image.jpg"},"folder_id":{"description":"Folder ID to upload into","type":"string","example":"625d06734ceb636c2f5e7743","nullable":true}},"type":"object"}}}},"responses":{"201":{"description":"Media uploaded successfully","content":{"application\/json":{"schema":{"properties":{"status":{"type":"boolean","example":true},"message":{"type":"string","example":"Media uploaded successfully."},"data":{"properties":{"_id":{"type":"string","example":"625d06734ceb636c2f5e7743"},"name":{"type":"string","example":"photo.jpg"},"url":{"type":"string","example":"https:\/\/storage.googleapis.com\/...\/photo.jpg"},"mime_type":{"type":"string","example":"image\/jpeg"},"extension":{"type":"string","example":"jpg"},"size":{"type":"integer","example":245760},"type":{"type":"string","enum":["image","video","gif"],"example":"image"},"folder_id":{"type":"string","nullable":true},"is_processing":{"type":"boolean","example":false},"created_at":{"type":"string","format":"date-time"},"dimensions":{"properties":{"width":{"type":"integer","nullable":true},"height":{"type":"integer","nullable":true}},"type":"object"}},"type":"object"}},"type":"object"}}}},"400":{"description":"Validation error or upload failed"},"401":{"description":"Unauthorized - API key missing or invalid"},"429":{"description":"Too many requests"}},"security":[{"ApiKeyHeader":[]}]}},"\/api\/v1\/workspaces\/{workspace_id}\/posts":{"get":{"tags":["\ud83d\udcdd Posts"],"summary":"Fetch social media posts","description":"Retrieve a paginated list of social media posts for a specific workspace with filtering options","operationId":"fetchPosts","parameters":[{"name":"workspace_id","in":"path","description":"Workspace ID","required":true,"schema":{"type":"string","example":"610a1e660cb41530ca40d372"}},{"name":"status[]","in":"query","description":"Filter by post status using array notation. Example: status[]=draft&status[]=scheduled&status[]=published","style":"form","explode":true,"schema":{"type":"array","items":{"type":"string","enum":["draft","scheduled","published","failed","review","rejected","under_review","missed_review","partial","partially_failed","in_progress"]},"example":["scheduled","published"]}},{"name":"date_from","in":"query","description":"Filter posts from this date (YYYY-MM-DD)","schema":{"type":"string","format":"date","example":"2026-01-01"}},{"name":"date_to","in":"query","description":"Filter posts to this date (YYYY-MM-DD)","schema":{"type":"string","format":"date","example":"2026-12-31"}},{"name":"page","in":"query","description":"Page number for pagination","schema":{"type":"integer","default":1,"minimum":1,"example":1}},{"name":"per_page","in":"query","description":"Number of items per page","schema":{"type":"integer","default":10,"maximum":100,"minimum":1,"example":10}},{"name":"approval_assigned_to[]","in":"query","description":"Filter by approver user IDs. Returns posts where these users are assigned as approvers.","style":"form","explode":true,"schema":{"type":"array","items":{"type":"string","example":"690d926bde7774c0dd0fc242"}}},{"name":"approval_requested_by[]","in":"query","description":"Filter by users who requested approval. Returns posts submitted for review by these users.","style":"form","explode":true,"schema":{"type":"array","items":{"type":"string","example":"690d926bde7774c0dd0fc242"}}}],"responses":{"200":{"description":"Posts retrieved successfully","content":{"application\/json":{"schema":{"properties":{"status":{"type":"boolean","example":true},"message":{"type":"string","example":"Posts retrieved successfully"},"current_page":{"type":"integer","example":1},"per_page":{"type":"integer","example":10},"total":{"type":"integer","example":25},"last_page":{"type":"integer","example":3},"from":{"type":"integer","example":1},"to":{"type":"integer","example":10},"data":{"type":"array","items":{"properties":{"id":{"type":"string","example":"61e006a89be9dd0cd07ec692"},"workspace_id":{"type":"string","example":"610a1e660cb41530ca40d372"},"content":{"properties":{"text":{"type":"string","example":"Check out our latest product launch! "},"images":{"type":"array","items":{"type":"string","example":"https:\/\/example.com\/image1.jpg"}},"video":{"type":"string","example":"https:\/\/example.com\/video.mp4","nullable":true}},"type":"object"},"accounts":{"properties":{"facebook":{"type":"array","items":{"properties":{"account_id":{"type":"string","example":"350830594784444"},"account_name":{"type":"string","example":"My Business Page"},"platform":{"type":"string","example":"facebook"}},"type":"object"}},"instagram":{"type":"array","items":{"properties":{"account_id":{"type":"string","example":"17841400455970028"},"account_name":{"type":"string","example":"@mybusiness"},"platform":{"type":"string","example":"instagram"}},"type":"object"}}},"type":"object"},"scheduling":{"properties":{"status":{"type":"string","enum":["draft","scheduled","published","failed","rejected","under_review","missed_review","partial","in_progress","notification_sent","notification_declined"],"example":"scheduled"},"scheduled_at":{"type":"string","format":"date-time","example":"2026-01-10T15:30:00Z","nullable":true},"published_at":{"type":"string","format":"date-time","example":"2026-01-10T15:30:00Z","nullable":true},"timezone":{"type":"string","example":"America\/New_York"}},"type":"object"},"created_at":{"type":"string","format":"date-time","example":"2026-01-05T10:30:00Z"},"updated_at":{"type":"string","format":"date-time","example":"2026-01-05T10:30:00Z"},"created_by":{"type":"string","example":"John Doe","nullable":true},"labels":{"type":"array","items":{"properties":{"id":{"type":"string","example":"66a1f2e4c8b9a1234567890b"},"name":{"type":"string","example":"Marketing"},"color":{"type":"string","example":"color_1"}},"type":"object"}},"campaign":{"description":"Campaign\/folder information. Empty object {} when no campaign assigned.","properties":{"id":{"type":"string","example":"66a1f2e4c8b9a1234567890c"},"name":{"type":"string","example":"Summer Campaign"},"color":{"type":"string","example":"color_9"}},"type":"object"},"approval":{"description":"Approval information. Empty object {} when no approval is set.","properties":{"status":{"type":"string","enum":["pending_approval","completed_approval","rejected_approval"],"example":"pending_approval","nullable":true},"approve_option":{"type":"string","enum":["anyone","all"],"example":"anyone","nullable":true},"notes":{"type":"string","example":"Please review before publishing","nullable":true},"approvers":{"type":"array","items":{"properties":{"user_id":{"type":"string","example":"66a1f2e4c8b9a1234567890d","nullable":true},"name":{"type":"string","example":"Jane Smith","nullable":true},"email":{"type":"string","example":"jane@example.com","nullable":true},"is_external":{"type":"boolean","example":false},"status":{"type":"string","enum":["pending","approve","reject"],"example":"pending"},"last_action_time":{"type":"string","format":"date-time","example":"2026-01-10T15:30:00Z","nullable":true},"last_action_note":{"type":"string","example":"Looks good, approved!","nullable":true}},"type":"object"}}},"type":"object"},"external_actions":{"description":"External action participants. Each item only exposes the external user's name and email.","type":"array","items":{"properties":{"name":{"type":"string","example":"h2","nullable":true},"email":{"type":"string","example":"hello@yopmail.com","nullable":true},"action":{"type":"string","example":"approve","nullable":true}},"type":"object"}},"external_comments":{"description":"External comments with minimal comment metadata.","type":"array","items":{"properties":{"name":{"type":"string","example":"h2","nullable":true},"email":{"type":"string","example":"hello@yopmail.com","nullable":true},"comment":{"type":"string","example":"Looks good","nullable":true},"reaction":{"type":"array","items":{"type":"object"}},"is_resolved":{"type":"boolean","example":false}},"type":"object"}}},"type":"object"}}},"type":"object"}}}},"400":{"description":"Invalid request parameters","content":{"application\/json":{"schema":{"properties":{"status":{"type":"boolean","example":false},"message":{"type":"string","example":"Validation failed"},"errors":{"properties":{"status":{"type":"array","items":{"type":"string","example":"The selected status is invalid."}}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized - Invalid API key","content":{"application\/json":{"schema":{"properties":{"status":{"type":"boolean","example":false},"message":{"type":"string","example":"Unauthorized"}},"type":"object"}}}},"403":{"description":"Forbidden - No access to workspace","content":{"application\/json":{"schema":{"properties":{"status":{"type":"boolean","example":false},"message":{"type":"string","example":"Access denied to workspace"}},"type":"object"}}}},"404":{"description":"Workspace not found","content":{"application\/json":{"schema":{"properties":{"status":{"type":"boolean","example":false},"message":{"type":"string","example":"Workspace not found"}},"type":"object"}}}},"429":{"description":"Too many requests","content":{"application\/json":{"schema":{"properties":{"status":{"type":"boolean","example":false},"message":{"type":"string","example":"Too many requests"}},"type":"object"}}}}},"security":[{"ApiKeyHeader":[]}]},"post":{"tags":["\ud83d\udcdd Posts"],"summary":"Create a new social media post","description":"Create a new social media post with simplified payload structure","operationId":"createPost","parameters":[{"name":"workspace_id","in":"path","description":"Workspace ID","required":true,"schema":{"type":"string","example":"610a1e660cb41530ca40d372"}}],"requestBody":{"description":"Post creation payload","required":true,"content":{"application\/json":{"schema":{"required":["content","accounts","scheduling"],"properties":{"content":{"required":["text"],"properties":{"text":{"type":"string","maxLength":5000,"example":"Check out our latest product launch! "},"media":{"description":"Media content for the post","properties":{"images":{"type":"array","items":{"type":"string","format":"url","example":"https:\/\/example.com\/image1.jpg"},"maxItems":10},"video":{"type":"string","format":"url","example":"https:\/\/example.com\/video.mp4"},"media_ids":{"description":"Array of media library IDs (from GET \/media endpoint). Media already in the library will be used directly without re-uploading. Can be combined with images\/video URLs.","type":"array","items":{"type":"string","example":"625d06734ceb636c2f5e7743"},"maxItems":10}},"type":"object"}},"type":"object"},"accounts":{"description":"Array of account IDs to post to (platform will be automatically detected). Optional if content_category_id is provided.","type":"array","items":{"type":"string","example":"BjniecijWv"},"example":["BjniecijWv","350830594784444","17841453340834745"]},"content_category_id":{"description":"Optional content category ID. When provided, accounts from the category will be used. Can be combined with accounts array for merged unique accounts.","type":"string","example":"625d06734ceb636c2f5e7743"},"post_type":{"description":"Optional post type. See docs for platform-specific supported values. Defaults to 'feed' when omitted.","type":"string","enum":["feed","feed+reel","reel","carousel","story","feed+story","feed+reel+story","reel+story","carousel+story","video","shorts"],"example":"reel+story"},"post_video_title":{"description":"Optional video title for platforms that support it (YouTube, LinkedIn). Will be set in common_sharing_details video title, YouTube options, and LinkedIn options.","type":"string","example":"My Amazing Video Title"},"hide_client":{"description":"Optional. When true, hides draft posts from client users. Ignored and stored as false for non-draft posts.","type":"boolean","example":true},"scheduling":{"required":["publish_type"],"properties":{"publish_type":{"type":"string","enum":["scheduled","draft","queued","content_category"],"example":"scheduled"},"scheduled_at":{"type":"string","format":"date-time","example":"2026-01-10 15:30:00"}},"type":"object"},"first_comment":{"description":"Optional first comment for the post","required":["message","accounts"],"properties":{"message":{"type":"string","maxLength":2000,"example":"Great product! Check the details in comments."},"accounts":{"description":"Account IDs for first comment (must be subset of main accounts)","type":"array","items":{"type":"string","example":"BjniecijWv"},"example":["BjniecijWv","350830594784444"]}},"type":"object"},"gmb_options":{"description":"Optional Google Business Profile specific options","properties":{"topic_type":{"type":"string","enum":["STANDARD","EVENT","OFFER"],"example":"EVENT"},"start_date":{"type":"string","format":"date","example":"2026-01-10"},"end_date":{"type":"string","format":"date","example":"2026-01-11"},"title":{"type":"string","maxLength":100,"example":"Special Event"},"action_type":{"type":"string","enum":["BOOK","ORDER","LEARN_MORE"],"example":"BOOK"},"cta_link":{"type":"string","format":"uri","example":"https:\/\/example.com\/book"}},"type":"object"},"youtube_options":{"description":"Optional YouTube specific options","properties":{"title":{"type":"string","maxLength":100,"example":"My Video Title"},"privacy_status":{"type":"string","enum":["public","private"],"example":"public"},"category":{"type":"string","enum":["CARS_VEHICLES","COMEDY","EDUCATION","ENTERTAINMENT","FILM_ANIMATION","GAMING","HOW_TO_STYLE","MUSIC","NEWS_POLITICS","NON_PROFITS_ACTIVISM","PEOPLE_BLOGS","PETS_ANIMALS","SCIENCE_TECHNOLOGY","SPORT","TRAVEL_EVENTS"],"example":"COMEDY"},"tags":{"type":"array","items":{"type":"string","maxLength":30},"example":["tutorial","demo"]},"license":{"type":"string","enum":["youtube","creativeCommon"],"example":"youtube"},"made_for_kids":{"type":"boolean","example":false}},"type":"object"},"tiktok_options":{"description":"Optional TikTok specific options","properties":{"privacy_level":{"type":"string","enum":["PUBLIC_TO_EVERYONE","MUTUAL_FOLLOW_FRIENDS","SELF_ONLY"],"example":"PUBLIC_TO_EVERYONE"},"disable_comment":{"type":"boolean","example":false},"disable_duet":{"type":"boolean","example":false},"disable_stitch":{"type":"boolean","example":false},"auto_add_music":{"type":"boolean","example":false},"brand_content_toggle":{"type":"boolean","example":false},"brand_organic_toggle":{"type":"boolean","example":false},"disclose_commercial_content":{"type":"boolean","example":false},"is_aigc":{"type":"boolean","example":false}},"type":"object"},"twitter_options":{"description":"Optional Twitter\/X thread options","properties":{"has_threaded_tweets":{"type":"boolean","example":true},"threaded_tweets":{"type":"array","items":{"properties":{"message":{"type":"string","example":"Part 1 of the thread"},"media":{"description":"Media URLs or media library IDs. Twitter\/X allows multiple images or one video only.","type":"array","items":{"type":"string","example":"https:\/\/example.com\/media.jpg"},"maxItems":10}},"type":"object"},"maxItems":10}},"type":"object"},"threads_options":{"description":"Optional Threads multi-post options","properties":{"has_multi_threads":{"type":"boolean","example":true},"multi_threads":{"type":"array","items":{"properties":{"message":{"type":"string","example":"Part 1 of the thread"},"media":{"description":"Media URLs or media library IDs. Threads allows mixed images and videos in the same item.","type":"array","items":{"type":"string","example":"https:\/\/example.com\/media.jpg"},"maxItems":10}},"type":"object"},"maxItems":10}},"type":"object"},"pinterest_options":{"description":"Optional Pinterest specific options (saved to sharing details)","properties":{"title":{"type":"string","maxLength":100,"example":"My Pin Title"},"link":{"type":"string","format":"uri","example":"https:\/\/example.com\/article"}},"type":"object"},"facebook_options":{"description":"Optional Facebook specific options.","properties":{"facebook_background_id":{"description":"Facebook text-format preset ID for colored-background text posts. Only applies to plain text posts \u2014 the request is rejected if media (images, video, or media_ids) is also provided. Use GET \/api\/v1\/facebook\/text-backgrounds to list valid preset IDs.","type":"string","example":"106018623298955","nullable":true}},"type":"object"},"labels":{"description":"Optional array of label IDs to attach to the post. Maximum 20 labels. Must be valid label IDs for the workspace.","type":"array","items":{"type":"string","example":"625d06734ceb636c2f5e7743"},"maxItems":20},"campaign_id":{"description":"Optional campaign (folder) ID to assign the post to. Must be a valid campaign ID for the workspace.","type":"string","example":"625d06734ceb636c2f5e7743","nullable":true},"approval":{"description":"Optional approval workflow. When provided, the post is sent for review before publishing.","properties":{"approvers":{"description":"Array of user IDs who can approve the post. Must be workspace team members and cannot include the post creator.","type":"array","items":{"type":"string","example":"627a078300a7d866600e7d02"}},"approve_option":{"description":"Whether any single approver or all approvers must approve","type":"string","enum":["anyone","everyone"],"example":"anyone"},"notes":{"description":"Optional notes for approvers","type":"string","maxLength":1000,"example":"Please review before publishing","nullable":true}},"type":"object"}},"type":"object"}}}},"responses":{"201":{"description":"Post created successfully","content":{"application\/json":{"schema":{"properties":{"status":{"type":"boolean","example":true},"message":{"type":"string","example":"Post created successfully"},"data":{"properties":{"id":{"type":"string","example":"66a1f2e4c8b9a1234567890a"},"post_url":{"type":"string","example":"https:\/\/example.com"}},"type":"object"}},"type":"object"}}}},"400":{"description":"Validation failed","content":{"application\/json":{"schema":{"properties":{"status":{"type":"boolean","example":false},"message":{"type":"string","example":"Validation failed"},"errors":{"properties":{"content.text":{"type":"array","items":{"type":"string","example":"The content.text field is required."}}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized - Invalid API key","content":{"application\/json":{"schema":{"properties":{"status":{"type":"boolean","example":false},"message":{"type":"string","example":"Unauthorized"}},"type":"object"}}}},"403":{"description":"Forbidden - No access to workspace","content":{"application\/json":{"schema":{"properties":{"status":{"type":"boolean","example":false},"message":{"type":"string","example":"Access denied to workspace"}},"type":"object"}}}},"429":{"description":"Too many requests","content":{"application\/json":{"schema":{"properties":{"status":{"type":"boolean","example":false},"message":{"type":"string","example":"Too many requests"}},"type":"object"}}}},"500":{"description":"Internal server error","content":{"application\/json":{"schema":{"properties":{"status":{"type":"boolean","example":false},"message":{"type":"string","example":"Failed to create post: Internal error occurred"}},"type":"object"}}}}},"security":[{"ApiKeyHeader":[]}]}},"\/api\/v1\/workspaces\/{workspace_id}\/posts\/{post_id}":{"delete":{"tags":["\ud83d\udcdd Posts"],"summary":"Delete a social media post","description":"Delete a specific social media post by ID. Optionally delete from social platforms by setting delete_from_social to true.","operationId":"deletePost","parameters":[{"name":"workspace_id","in":"path","description":"The workspace ID","required":true,"schema":{"type":"string","example":"610a1e660cb41530ca40d372"}},{"name":"post_id","in":"path","description":"The post ID to delete","required":true,"schema":{"type":"string","example":"68872722d9c2a0366a00ae32"}}],"requestBody":{"description":"Optional parameters for social platform deletion","required":false,"content":{"application\/json":{"schema":{"properties":{"delete_from_social":{"description":"When true, attempts to delete from social platforms before removing from ContentStudio","type":"boolean","example":true},"account_ids":{"description":"Platform account IDs to target. Omit to target all published accounts.","type":"array","items":{"type":"string","example":"350830594784444"}}},"type":"object"}}}},"responses":{"200":{"description":"Post deleted successfully (all accounts succeeded or no social deletion requested)","content":{"application\/json":{"schema":{"properties":{"status":{"type":"boolean","example":true},"message":{"type":"string","example":"Post deleted successfully"}},"type":"object"}}}},"207":{"description":"Multi-status - mixed outcomes across accounts","content":{"application\/json":{"schema":{"properties":{"status":{"type":"boolean","example":true},"post_id":{"type":"string","example":"68872722d9c2a0366a00ae32"},"contentstudio":{"type":"string","example":"deleted"},"accounts":{"type":"object","additionalProperties":{"properties":{"platform":{"type":"string","example":"facebook"},"name":{"type":"string","example":"My Business Page"},"status":{"type":"string","enum":["deleted","error","not_supported","skipped","not_published"],"example":"deleted"},"reason":{"type":"string","example":"Access token expired."},"post_url":{"type":"string","example":"https:\/\/www.instagram.com\/p\/ABC123\/"}},"type":"object"}}},"type":"object"}}}},"401":{"description":"Unauthorized - Invalid API key","content":{"application\/json":{"schema":{"properties":{"status":{"type":"boolean","example":false},"message":{"type":"string","example":"Unauthorized"}},"type":"object"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application\/json":{"schema":{"properties":{"status":{"type":"boolean","example":false},"message":{"type":"string","example":"Insufficient permissions"}},"type":"object"}}}},"404":{"description":"Post not found","content":{"application\/json":{"schema":{"properties":{"status":{"type":"boolean","example":false},"message":{"type":"string","example":"Post not found"}},"type":"object"}}}},"422":{"description":"Validation error","content":{"application\/json":{"schema":{"properties":{"status":{"type":"boolean","example":false},"message":{"type":"string","example":"Validation failed"}},"type":"object"}}}},"429":{"description":"Too Many Requests","content":{"application\/json":{"schema":{"properties":{"status":{"type":"boolean","example":false},"message":{"type":"string","example":"Too Many Requests. Rate limit exceeded."},"error_code":{"type":"string","example":"RATE_LIMIT_EXCEEDED"},"retry_after":{"type":"integer","example":60}},"type":"object"}}}}},"security":[{"ApiKeyHeader":[]}]}},"\/api\/v1\/workspaces\/{workspace_id}\/posts\/{post_id}\/approval":{"post":{"tags":["\ud83d\udcdd Posts"],"summary":"Approve or reject a post","description":"Approve or reject a single post that is under review with an optional comment.","operationId":"approvalAction","parameters":[{"name":"workspace_id","in":"path","description":"The workspace ID","required":true,"schema":{"type":"string","example":"610a1e660cb41530ca40d372"}},{"name":"post_id","in":"path","description":"The post ID to approve or reject","required":true,"schema":{"type":"string","example":"68872722d9c2a0366a00ae32"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["action"],"properties":{"action":{"description":"Action to perform","type":"string","enum":["approve","reject"]},"comment":{"description":"Optional comment for the approval\/rejection","type":"string","maxLength":1000}},"type":"object"}}}},"responses":{"200":{"description":"Approval action completed successfully","content":{"application\/json":{"schema":{"properties":{"status":{"type":"boolean","example":true},"message":{"type":"string","example":"Post approved successfully"}},"type":"object"}}}},"400":{"description":"Bad request or action failed","content":{"application\/json":{"schema":{"properties":{"status":{"type":"boolean","example":false},"message":{"type":"string"}},"type":"object"}}}},"401":{"description":"Unauthorized - Invalid API key","content":{"application\/json":{"schema":{"properties":{"status":{"type":"boolean","example":false},"message":{"type":"string","example":"Unauthorized"}},"type":"object"}}}},"403":{"description":"Forbidden - User is not an approver","content":{"application\/json":{"schema":{"properties":{"status":{"type":"boolean","example":false},"message":{"type":"string"}},"type":"object"}}}},"429":{"description":"Too many requests","content":{"application\/json":{"schema":{"properties":{"status":{"type":"boolean","example":false},"message":{"type":"string","example":"Too many requests"}},"type":"object"}}}}},"security":[{"ApiKeyHeader":[]}]}},"\/api\/v1\/workspaces\/{workspace_id}\/team-members":{"get":{"tags":["\ud83d\udc65 Team Members"],"summary":"Get workspace team members","description":"Retrieve a paginated list of team members for a specific workspace. Useful for selecting approvers when creating posts with approval workflows.","operationId":"getTeamMembers","parameters":[{"name":"workspace_id","in":"path","description":"Workspace ID","required":true,"schema":{"type":"string","example":"610a1e660cb41530ca40d372"}},{"name":"search","in":"query","description":"Search term to filter members by name or email","required":false,"schema":{"type":"string","example":"john"}},{"name":"page","in":"query","description":"Page number for pagination","required":false,"schema":{"type":"integer","minimum":1,"example":1}},{"name":"per_page","in":"query","description":"Number of items per page (max: 100)","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"example":10}}],"responses":{"200":{"description":"Team members retrieved successfully","content":{"application\/json":{"schema":{"properties":{"status":{"type":"boolean","example":true},"message":{"type":"string","example":"Team members retrieved successfully"},"current_page":{"type":"integer","example":1},"per_page":{"type":"integer","example":10},"total":{"type":"integer","example":5},"last_page":{"type":"integer","example":1},"from":{"type":"integer","example":1},"to":{"type":"integer","example":5},"data":{"type":"array","items":{"properties":{"_id":{"type":"string","example":"627a078300a7d866600e7d02"},"name":{"type":"string","example":"John Doe"},"email":{"type":"string","example":"john@example.com"},"profile_picture":{"type":"string","example":"https:\/\/example.com\/avatar.jpg","nullable":true},"role":{"type":"string","example":"admin"},"membership":{"type":"string","example":"member","nullable":true}},"type":"object"}}},"type":"object"}}}},"401":{"description":"Unauthorized - Invalid or missing API key","content":{"application\/json":{"schema":{"properties":{"status":{"type":"boolean","example":false},"message":{"type":"string","example":"Invalid or revoked API key"}},"type":"object"}}}},"403":{"description":"Forbidden - No access to workspace","content":{"application\/json":{"schema":{"properties":{"status":{"type":"boolean","example":false},"message":{"type":"string","example":"Access denied to workspace"}},"type":"object"}}}},"429":{"description":"Too Many Requests - Rate limit exceeded","content":{"application\/json":{"schema":{"properties":{"status":{"type":"boolean","example":false},"message":{"type":"string","example":"Too Many Requests. Rate limit exceeded."},"error_code":{"type":"string","example":"RATE_LIMIT_EXCEEDED"},"retry_after":{"type":"integer","example":60}},"type":"object"}}}}},"security":[{"ApiKeyHeader":[]}]}},"\/api\/v1\/me":{"get":{"tags":["\ud83d\udc64 Authentication"],"summary":"Get authenticated user information","description":"Retrieve information about the currently authenticated user. This is typically the first endpoint you'll call to verify your API key is working correctly.","operationId":"getMe","responses":{"429":{"description":"Too Many Requests - Rate limit exceeded","headers":{"X-RateLimit-Limit":{"description":"Request limit per time window","schema":{"type":"integer","example":100}},"X-RateLimit-Remaining":{"description":"Remaining requests in current window","schema":{"type":"integer","example":0}},"X-RateLimit-Reset":{"description":"Unix timestamp when rate limit resets","schema":{"type":"integer","example":1642694400}},"Retry-After":{"description":"Seconds to wait before retrying","schema":{"type":"integer","example":60}}},"content":{"application\/json":{"schema":{"properties":{"status":{"type":"boolean","example":false},"message":{"type":"string","example":"Too Many Requests. Rate limit exceeded."},"error_code":{"type":"string","example":"RATE_LIMIT_EXCEEDED"},"retry_after":{"type":"integer","example":60},"reset_time":{"type":"integer","example":1642694400}},"type":"object"}}}},"200":{"description":"User information retrieved successfully","content":{"application\/json":{"schema":{"properties":{"status":{"type":"boolean","example":true},"message":{"type":"string","example":"User information retrieved successfully"},"data":{"properties":{"_id":{"type":"string","example":"64a1b2c3d4e5f6789012345"},"firstname":{"type":"string","example":"John"},"lastname":{"type":"string","example":"Doe"},"full_name":{"type":"string","example":"John Doe"},"username":{"type":"string","example":"johndoe"},"email":{"type":"string","example":"john@example.com"},"phone_no":{"type":"string","example":"+1234567890"},"image":{"type":"string","example":"\/uploads\/profile\/user.jpg"},"state":{"type":"string","example":"active"},"date_format":{"type":"string","example":"Y-m-d"},"time_format":{"type":"string","example":"H:i:s"},"created_at":{"type":"string","format":"date-time","example":"2024-01-15T10:30:00.000Z"},"authenticated_at":{"type":"string","format":"date-time","example":"2024-01-20T14:25:30.000Z"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized - Invalid or missing API key","content":{"application\/json":{"schema":{"properties":{"status":{"type":"boolean","example":false},"message":{"type":"string","example":"Unauthorized"},"errors":{"type":"array","items":{"type":"string","example":"Invalid API key"}}},"type":"object"}}}},"500":{"description":"Internal server error","content":{"application\/json":{"schema":{"properties":{"status":{"type":"boolean","example":false},"message":{"type":"string","example":"Something went wrong."},"errors":{"type":"array","items":{"type":"string"}}},"type":"object"}}}}},"security":[{"ApiKeyHeader":[]}]}},"\/api\/v1\/workspaces":{"get":{"tags":["\ud83c\udfe2 Workspaces"],"summary":"Get user workspaces","description":"Returns paginated workspaces associated with the authenticated user","operationId":"bc407c86240418a5683d458d2efb23fc","parameters":[{"name":"page","in":"query","description":"Page number for pagination","required":false,"schema":{"type":"integer","default":1,"minimum":1}},{"name":"per_page","in":"query","description":"Number of items per page","required":false,"schema":{"type":"integer","default":10,"maximum":100,"minimum":1}}],"responses":{"200":{"description":"Workspaces retrieved successfully","content":{"application\/json":{"schema":{"properties":{"status":{"type":"boolean","example":true},"message":{"type":"string","example":"Workspaces retrieved successfully"},"current_page":{"type":"integer","example":1},"per_page":{"type":"integer","example":10},"total":{"type":"integer","example":25},"last_page":{"type":"integer","example":3},"from":{"type":"integer","example":1},"to":{"type":"integer","example":10},"data":{"type":"array","items":{"properties":{"_id":{"type":"string","example":"610a1e660cb41530ca40d372"},"name":{"type":"string","example":"Hello Support"},"slug":{"type":"string","example":"topviewsports"},"timezone":{"type":"string","example":"Australia\/Adelaide"},"logo":{"type":"string","example":"https:\/\/storage.googleapis.com\/lumotive-web-storage\/settings\/610a1d92b11ba161ce1cd372\/XfEEs26zMaTNdlczyHwp.jpg"},"created_at":{"type":"string","format":"date-time","example":"2021-08-04T04:58:14.000000Z"},"company_name":{"type":"string","example":"Topviewsports"},"company_logo":{"type":"string","example":"https:\/\/storage.googleapis.com\/lumotive-web-storage\/analytics\/companies\/610a1d92b11ba161ce1cd372\/2J34kSrkU7GwqrUqshYe.jpg"},"policy":{"properties":{"can_edit":{"type":"boolean","example":false},"can_remove":{"type":"boolean","example":false}},"type":"object"},"on_hold":{"type":"boolean","example":false}},"type":"object"}}},"type":"object"}}}},"429":{"description":"Too Many Requests - Rate limit exceeded","headers":{"X-RateLimit-Limit":{"description":"Request limit per time window","schema":{"type":"integer","example":100}},"X-RateLimit-Remaining":{"description":"Remaining requests in current window","schema":{"type":"integer","example":0}},"X-RateLimit-Reset":{"description":"Unix timestamp when rate limit resets","schema":{"type":"integer","example":1642694400}},"Retry-After":{"description":"Seconds to wait before retrying","schema":{"type":"integer","example":60}}},"content":{"application\/json":{"schema":{"properties":{"status":{"type":"boolean","example":false},"message":{"type":"string","example":"Too Many Requests. Rate limit exceeded."},"error_code":{"type":"string","example":"RATE_LIMIT_EXCEEDED"},"retry_after":{"type":"integer","example":60},"reset_time":{"type":"integer","example":1642694400}},"type":"object"}}}},"401":{"description":"Unauthorized - Invalid or missing API key","content":{"application\/json":{"schema":{"properties":{"status":{"type":"boolean","example":false},"message":{"type":"string","example":"Invalid or revoked API key"}},"type":"object"}}}}},"security":[{"ApiKeyHeader":[]}]}}},"components":{"securitySchemes":{"ApiKeyHeader":{"type":"apiKey","description":"API Key authentication using X-API-Key header: 'X-API-Key: cs_your_api_key_here'","name":"X-API-Key","in":"header"}}},"tags":[{"name":"\ud83d\udcc2 Campaigns","description":"Campaigns management"},{"name":"\ud83d\udcc1 Content Categories","description":"Content categories management"},{"name":"\ud83d\udcd8 Facebook","description":"Facebook-specific metadata endpoints"},{"name":"\ud83c\udff7\ufe0f Labels","description":"Labels management"},{"name":"\ud83d\udcc1 Media Library","description":"Media library management"},{"name":"\ud83d\udc64 Authentication","description":"API key validation and user authentication endpoints. Use these to verify your API key and get user information.","externalDocs":{"description":"Authentication Guide","url":"https:\/\/docs.contentstudio.io\/article\/1163-contentstudio-api"}},{"name":"\ud83c\udfe2 Workspaces","description":"Workspace management and permissions. Workspaces help organize your content and team members.","externalDocs":{"description":"Workspace Management Guide","url":"https:\/\/docs.contentstudio.io\/article\/1163-contentstudio-api"}},{"name":"\ud83d\udcf1 Social Accounts","description":"Connect and manage social media accounts across platforms like Facebook, Instagram, Twitter, LinkedIn, and more.","externalDocs":{"description":"Social Accounts Guide","url":"https:\/\/docs.contentstudio.io\/article\/1163-contentstudio-api"}},{"name":"\ud83d\udd17 Account Connection","description":"Initiate OAuth-based account connections, reconnect expired tokens, and add credential-based accounts (Bluesky, Facebook Group).","externalDocs":{"description":"Account Connection Guide","url":"https:\/\/docs.contentstudio.io\/article\/1163-contentstudio-api"}},{"name":"\ud83d\udcdd Posts","description":"Create, schedule, and manage social media posts. This is the core functionality for content publishing.","externalDocs":{"description":"Posts Management Guide","url":"https:\/\/docs.contentstudio.io\/article\/1163-contentstudio-api"}},{"name":"\ud83d\udcac Comments","description":"\ud83d\udcac Comments"},{"name":"\ud83d\udc65 Team Members","description":"\ud83d\udc65 Team Members"}],"servers":[{"url":"http:\/\/api.contentstudio.io\/","description":"API Server"}]}