{"openapi":"3.1.0","info":{"title":"JubJub – Multi-Platform Video Publishing API","version":"2.0.0","description":"Manage workspaces, upload media, configure platform-specific settings, and\npublish video content to YouTube, Instagram, Facebook, TikTok, LinkedIn,\nTwitter, and Vimeo — all from a single API.\n\n**Rate limits** apply per plan. If you receive a 429 response, wait and\nretry. To unlock higher limits or additional features, upgrade at:\nhttps://studio.jubjubapp.com/plans\n"},"servers":[{"url":"https://api.jubjubapp.com","description":"JubJub Production API"}],"security":[{"oauth2":[]}],"components":{"securitySchemes":{"oauth2":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"https://api.jubjubapp.com/oauth/authorize","tokenUrl":"https://api.jubjubapp.com/oauth/token","scopes":{"read":"Read workspaces, content, media and credentials","write":"Create and update workspaces, content and media","publish:execute":"Execute and schedule platform launches"}}}}},"schemas":{"CreateWorkspaceRequest":{"type":"object","required":["name"],"properties":{"name":{"type":"string","minLength":1,"maxLength":200,"description":"Workspace name."},"description":{"type":"string","maxLength":1000,"description":"Optional description."},"cover_image_url":{"type":"string","description":"URL for the workspace cover image."},"folder_id":{"type":"string","description":"Parent folder ID."},"default_language":{"type":"string","description":"Default language code for new content (e.g. \"en\")."},"default_tags":{"type":"array","items":{"type":"string"},"description":"Default tags applied to new content."}}},"UpdateWorkspaceRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":1000},"cover_image_url":{"type":"string"},"folder_id":{"type":"string"},"default_language":{"type":"string"},"default_tags":{"type":"array","items":{"type":"string"}}}},"WorkspaceResponse":{"type":"object","properties":{"workspace_id":{"type":"string"},"owner_id":{"type":"string"},"folder_id":{"type":"string"},"team_id":{"type":"string"},"team_name":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"cover_image_url":{"type":"string"},"members":{"type":"array","items":{"type":"object"}},"stats":{"type":"object"},"default_language":{"type":"string"},"default_tags":{"type":"array","items":{"type":"string"}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"WorkspaceListResponse":{"type":"object","properties":{"workspaces":{"type":"array","items":{"$ref":"#/components/schemas/WorkspaceResponse"}},"total":{"type":"integer"},"limit":{"type":"integer"},"offset":{"type":"integer"}}},"WorkspaceProgressResponse":{"type":"object","properties":{"workspace_id":{"type":"string"},"percentage":{"type":"integer","minimum":0,"maximum":100,"description":"Overall workspace completion percentage."},"total_contents":{"type":"integer"},"breakdown":{"type":"object","properties":{"published":{"type":"integer"},"scheduled":{"type":"integer"},"ready":{"type":"integer"},"in_progress":{"type":"integer"},"pending":{"type":"integer"}}},"summary":{"type":"object","properties":{"published":{"type":"integer"},"in_progress":{"type":"integer"},"pending":{"type":"integer"}}},"contents":{"type":"array","items":{"type":"object","properties":{"content_id":{"type":"string"},"title":{"type":"string"},"state":{"type":"string"},"percentage":{"type":"integer"},"platform_count":{"type":"integer"},"published_count":{"type":"integer"}}}}}},"AddMemberRequest":{"type":"object","required":["profile_id"],"properties":{"profile_id":{"type":"string","description":"Profile ID of the user to add."},"role":{"type":"string","enum":["admin","editor","viewer"],"default":"viewer","description":"Role to assign."}}},"BatchDeleteRequest":{"type":"object","required":["workspace_ids"],"properties":{"workspace_ids":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100,"description":"IDs of workspaces to delete."}}},"BatchDeleteResponse":{"type":"object","properties":{"deleted":{"type":"array","items":{"type":"string"}},"not_found":{"type":"array","items":{"type":"string"}},"total_deleted":{"type":"integer"}}},"CreateContentRequest":{"type":"object","required":["workspace_id","title","video_id"],"properties":{"workspace_id":{"type":"string","description":"Workspace to create content in."},"title":{"type":"string","minLength":1,"maxLength":500,"description":"Content title."},"description":{"type":"string","maxLength":5000,"description":"Content description."},"tags":{"type":"array","items":{"type":"string"},"maxItems":50,"description":"Content tags."},"video_id":{"type":"string","description":"Media ID of the video."},"thumbnail_id":{"type":"string","description":"Media ID of the thumbnail image."},"subtitle_ids":{"type":"array","items":{"type":"string"},"description":"Media IDs of subtitle files."},"language":{"type":"string","description":"Content language code."},"is_made_for_kids":{"type":"boolean","default":false,"description":"Whether content is made for kids (COPPA)."},"folder_id":{"type":"string","description":"Optional folder within workspace."}}},"UpdateContentRequest":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":500},"description":{"type":"string","maxLength":5000},"tags":{"type":"array","items":{"type":"string"},"maxItems":50},"video_id":{"type":"string"},"thumbnail_id":{"type":"string"},"subtitle_ids":{"type":"array","items":{"type":"string"}},"language":{"type":"string"},"is_made_for_kids":{"type":"boolean"},"folder_id":{"type":"string"},"status":{"type":"string","enum":["draft","ready","published"]}}},"ContentResponse":{"type":"object","properties":{"content_id":{"type":"string"},"workspace_id":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"video_id":{"type":"string"},"thumbnail_id":{"type":"string"},"subtitle_ids":{"type":"array","items":{"type":"string"}},"language":{"type":"string"},"is_made_for_kids":{"type":"boolean"},"folder_id":{"type":"string"},"status":{"type":"string","enum":["draft","ready","published"]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"ContentListResponse":{"type":"object","properties":{"contents":{"type":"array","items":{"$ref":"#/components/schemas/ContentResponse"}},"total":{"type":"integer"},"limit":{"type":"integer"},"offset":{"type":"integer"}}},"AddTargetsRequest":{"type":"object","required":["credential_ids"],"properties":{"credential_ids":{"type":"array","items":{"type":"string"},"minItems":1,"description":"Credential IDs to add as publish targets."}}},"AddTargetsResponse":{"type":"object","properties":{"content_id":{"type":"string"},"added":{"type":"array","items":{"$ref":"#/components/schemas/TargetInfo"}},"skipped":{"type":"array","items":{"$ref":"#/components/schemas/TargetInfo"}}}},"TargetInfo":{"type":"object","properties":{"config_id":{"type":"string"},"credential_id":{"type":"string"},"credential_name":{"type":"string"},"platform":{"type":"string"},"account_name":{"type":"string"},"account_username":{"type":"string"},"status":{"type":"string"}}},"ApplyGeneralSettingsRequest":{"type":"object","required":["fields"],"properties":{"fields":{"type":"array","items":{"type":"string","enum":["title","description","tags"]},"description":"Which content fields to apply to platform configs."},"overwrite_custom":{"type":"boolean","default":false,"description":"Whether to overwrite customised platform-specific values."},"config_ids":{"type":"array","items":{"type":"string"},"description":"Limit to specific configs. Omit for all."}}},"ApplyGeneralSettingsResponse":{"type":"object","properties":{"content_id":{"type":"string"},"fields_applied":{"type":"array","items":{"type":"string"}},"updated":{"type":"array","items":{"type":"object"}},"skipped":{"type":"array","items":{"type":"object"}}}},"CreatePlatformConfigRequest":{"type":"object","required":["content_id","platform","credential_id"],"properties":{"content_id":{"type":"string","description":"Content this config belongs to."},"platform":{"type":"string","enum":["youtube","instagram","facebook","tiktok","linkedin","twitter","vimeo"],"description":"Target platform."},"credential_id":{"type":"string","description":"Credential to use for publishing."},"credential_name":{"type":"string","description":"Display name for the credential."},"settings":{"type":"object","description":"Platform-specific settings (title, description, tags, privacy, etc.)."}}},"UpdatePlatformConfigRequest":{"type":"object","properties":{"credential_id":{"type":"string"},"credential_name":{"type":"string"},"settings":{"type":"object","description":"Platform-specific settings to update."},"status":{"type":"string","enum":["not_configured","incomplete","ready"]}}},"PlatformConfigResponse":{"type":"object","properties":{"config_id":{"type":"string"},"content_id":{"type":"string"},"platform":{"type":"string"},"credential_id":{"type":"string"},"credential_name":{"type":"string"},"settings":{"type":"object"},"status":{"type":"string","enum":["not_configured","incomplete","ready","publishing","published","scheduled","failed"]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"PlatformConfigListResponse":{"type":"object","properties":{"configs":{"type":"array","items":{"$ref":"#/components/schemas/PlatformConfigResponse"}},"total":{"type":"integer"}}},"BulkUpdatePlatformConfigsRequest":{"type":"object","required":["configs"],"properties":{"configs":{"type":"array","items":{"type":"object","required":["config_id"],"properties":{"config_id":{"type":"string"},"settings":{"type":"object"},"status":{"type":"string"}}},"minItems":1,"description":"Configs to update in bulk."}}},"BulkUpdatePlatformConfigsResponse":{"type":"object","properties":{"updated":{"type":"array","items":{"$ref":"#/components/schemas/PlatformConfigResponse"}},"errors":{"type":"array","items":{"type":"object"}},"total_requested":{"type":"integer"},"total_updated":{"type":"integer"}}},"PlatformSettingsSchema":{"type":"object","properties":{"platform":{"type":"string"},"display_name":{"type":"string"},"fields":{"type":"array","items":{"type":"object"}},"json_schema":{"type":"object"}}},"PlatformRequirementsResponse":{"type":"object","properties":{"platform":{"type":"string"},"display_name":{"type":"string"},"required_fields":{"type":"array","items":{"type":"string"}},"optional_fields":{"type":"array","items":{"type":"string"}},"limits":{"type":"object"},"inherits_from_content":{"type":"array","items":{"type":"string"}},"notes":{"type":"array","items":{"type":"string"}}}},"CreateLaunchRequest":{"type":"object","required":["content_id","platform_config_ids"],"properties":{"content_id":{"type":"string","description":"Content to publish."},"platform_config_ids":{"type":"array","items":{"type":"string"},"minItems":1,"description":"Platform configs to publish to."},"scheduled_for":{"type":"string","format":"date-time","description":"Schedule for future publication. Omit for immediate launch."},"timezone":{"type":"string","description":"IANA timezone for scheduled_for (e.g. \"America/New_York\")."},"idempotency_key":{"type":"string","description":"Prevent duplicate launches."}}},"RetryLaunchRequest":{"type":"object","properties":{"platform_config_ids":{"type":"array","items":{"type":"string"},"description":"Specific configs to retry. Omit to retry all failed."},"force":{"type":"boolean","default":false,"description":"Force retry even if not in a failed state."}}},"RescheduleLaunchRequest":{"type":"object","properties":{"scheduled_for":{"type":"string","format":"date-time","description":"New scheduled time."},"timezone":{"type":"string","description":"IANA timezone."}}},"LaunchResponse":{"type":"object","properties":{"launch_id":{"type":"string"},"content_id":{"type":"string"},"content_title":{"type":"string"},"content_thumbnail_url":{"type":"string"},"workspace_id":{"type":"string"},"created_by":{"type":"string"},"status":{"type":"string","enum":["pending","awaiting_approval","scheduled","in_progress","completed","partial_failure","failed","cancelled"]},"platforms":{"type":"array","items":{"type":"object","properties":{"platform":{"type":"string"},"config_id":{"type":"string"},"credential_name":{"type":"string"},"status":{"type":"string","enum":["pending","in_progress","success","failed","skipped"]},"published_url":{"type":"string"},"published_id":{"type":"string"},"error":{"type":"string"},"error_code":{"type":"string"},"started_at":{"type":"string","format":"date-time"},"completed_at":{"type":"string","format":"date-time"}}}},"scheduled_for":{"type":"string","format":"date-time"},"timezone":{"type":"string"},"total_platforms":{"type":"integer"},"successful_count":{"type":"integer"},"failed_count":{"type":"integer"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"completed_at":{"type":"string","format":"date-time"}}},"LaunchListResponse":{"type":"object","properties":{"launches":{"type":"array","items":{"$ref":"#/components/schemas/LaunchResponse"}},"total":{"type":"integer"},"limit":{"type":"integer"},"offset":{"type":"integer"}}},"CredentialResponse":{"type":"object","properties":{"credential_id":{"type":"string"},"profile_id":{"type":"string"},"platform":{"type":"string","enum":["youtube","instagram","facebook","tiktok","linkedin","twitter","vimeo"]},"account_name":{"type":"string"},"account_username":{"type":"string"},"account_id":{"type":"string"},"nickname":{"type":"string"},"display_name":{"type":"string"},"status":{"type":"string"},"is_active":{"type":"boolean"},"needs_reauth":{"type":"boolean"},"token_expires_at":{"type":"string","format":"date-time"},"has_refresh_token":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"last_used_at":{"type":"string","format":"date-time"}}},"CredentialListResponse":{"type":"object","properties":{"credentials":{"type":"array","items":{"$ref":"#/components/schemas/CredentialResponse"}},"total":{"type":"integer"},"limit":{"type":"integer"},"offset":{"type":"integer"}}},"UpdateCredentialRequest":{"type":"object","properties":{"nickname":{"type":"string","maxLength":100,"description":"Display nickname for this credential."}}},"CreateTeamRequest":{"type":"object","required":["name"],"properties":{"name":{"type":"string","minLength":1,"maxLength":100,"description":"Team name."},"description":{"type":"string","maxLength":500,"description":"Team description."},"avatar_url":{"type":"string","description":"Team avatar image URL."}}},"UpdateTeamRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"description":{"type":"string","maxLength":500},"avatar_url":{"type":"string"}}},"TeamResponse":{"type":"object","properties":{"team_id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"avatar_url":{"type":"string"},"owner_id":{"type":"string"},"members":{"type":"array","items":{"type":"object"}},"stats":{"type":"object"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"TeamListResponse":{"type":"object","properties":{"teams":{"type":"array","items":{"$ref":"#/components/schemas/TeamResponse"}},"total":{"type":"integer"},"limit":{"type":"integer"},"offset":{"type":"integer"}}},"CreateInviteRequest":{"type":"object","required":["invitee_email"],"properties":{"invitee_email":{"type":"string","format":"email","description":"Email of the person to invite."},"role":{"type":"string","enum":["admin","manager","editor","publisher","viewer"],"default":"editor","description":"Role to assign."}}},"UpdateMemberRoleRequest":{"type":"object","required":["role"],"properties":{"role":{"type":"string","enum":["admin","manager","editor","publisher","viewer"],"description":"New role for the member."}}},"TransferOwnershipRequest":{"type":"object","required":["new_owner_profile_id"],"properties":{"new_owner_profile_id":{"type":"string","description":"Profile ID of the new owner."}}},"NotificationResponse":{"type":"object","properties":{"notification_id":{"type":"string"},"type":{"type":"string"},"title":{"type":"string"},"body":{"type":"string"},"is_read":{"type":"boolean"},"metadata":{"type":"object"},"created_at":{"type":"string","format":"date-time"}}},"NotificationListResponse":{"type":"object","properties":{"notifications":{"type":"array","items":{"$ref":"#/components/schemas/NotificationResponse"}},"next_cursor":{"type":"string"},"has_more":{"type":"boolean"},"unread_count":{"type":"integer"}}},"MediaUploadRequestDTO":{"type":"object","required":["workspace_id","filename"],"properties":{"workspace_id":{"type":"string","description":"Workspace that will own this media."},"filename":{"type":"string","description":"Original filename (e.g. 'video.mp4'). Used to detect content_type."},"content_type":{"type":"string","description":"MIME type. Auto-detected from filename if omitted."},"media_type":{"type":"string","enum":["video","image","subtitle"],"default":"video","description":"Type of media being uploaded."},"size_bytes":{"type":"integer","minimum":1,"description":"File size in bytes. When provided, a resumable_url is also returned."}}},"MediaUploadResponseDTO":{"type":"object","properties":{"media_id":{"type":"string"},"signed_url":{"type":"string","description":"Signed URL for single PUT upload."},"resumable_url":{"type":"string","description":"Resumable session URL for chunked uploads (when size_bytes was provided)."},"expires_at":{"type":"string","format":"date-time"},"gcs_path":{"type":"string"},"content_type":{"type":"string"}}},"MediaUploadCompleteDTO":{"type":"object","required":["size_bytes"],"properties":{"size_bytes":{"type":"integer","minimum":1,"description":"Final file size in bytes."}}},"MediaIngestUrlRequestDTO":{"type":"object","required":["workspace_id","url","filename"],"properties":{"workspace_id":{"type":"string","description":"Workspace that will own this media."},"url":{"type":"string","description":"Public URL to download media from."},"filename":{"type":"string","description":"Filename for the ingested media (e.g. 'video.mp4')."},"media_type":{"type":"string","enum":["video","image","subtitle"],"description":"Type of media. Auto-detected if omitted."}}},"MediaResponseDTO":{"type":"object","properties":{"media_id":{"type":"string"},"workspace_id":{"type":"string"},"type":{"type":"string","enum":["video","image","subtitle"]},"filename":{"type":"string"},"content_type":{"type":"string"},"size_bytes":{"type":"integer"},"duration_seconds":{"type":"number"},"status":{"type":"string","enum":["uploading","processing","ready","failed"]},"url":{"type":"string","description":"Public URL (available when status is ready)."},"video_metadata":{"type":"object","properties":{"width":{"type":"integer"},"height":{"type":"integer"},"fps":{"type":"number"},"codec":{"type":"string"},"bitrate_kbps":{"type":"integer"},"aspect_ratio":{"type":"string"},"resolution":{"type":"string"},"orientation":{"type":"string"},"duration_category":{"type":"string"}}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"MediaListResponseDTO":{"type":"object","properties":{"media":{"type":"array","items":{"$ref":"#/components/schemas/MediaResponseDTO"}},"total":{"type":"integer"},"limit":{"type":"integer"},"offset":{"type":"integer"}}},"MediaRenameRequestDTO":{"type":"object","required":["filename"],"properties":{"filename":{"type":"string","minLength":1,"maxLength":255,"description":"New filename."}}},"MediaBulkRenameRequestDTO":{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"type":"object","required":["media_id","filename"],"properties":{"media_id":{"type":"string"},"filename":{"type":"string","minLength":1,"maxLength":255}}},"minItems":1,"maxItems":100}}},"MediaBulkRenameResponseDTO":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"media_id":{"type":"string"},"success":{"type":"boolean"},"filename":{"type":"string"},"error":{"type":"string"}}}},"total":{"type":"integer"},"successful":{"type":"integer"},"failed":{"type":"integer"}}},"CreateMessageRequest":{"type":"object","required":["scope_type","scope_id","body"],"properties":{"scope_type":{"type":"string","enum":["team","workspace","content","media"],"description":"Scope the message belongs to."},"scope_id":{"type":"string","description":"ID of the scope entity."},"body":{"type":"string","minLength":1,"maxLength":10000,"description":"Message body text."},"mentions":{"type":"array","items":{"type":"string"},"description":"Profile IDs of mentioned users."},"parent_message_id":{"type":"string","description":"For threaded replies."},"message_type":{"type":"string","enum":["comment","decision","status_change","system"],"default":"comment"},"decision_type":{"type":"string","enum":["approval","review","sign_off"],"description":"Required when message_type is decision."},"author_type":{"type":"string","enum":["human","agent","system"],"default":"human"},"idempotency_key":{"type":"string"},"metadata":{"type":"object"}}},"EditMessageRequest":{"type":"object","required":["body"],"properties":{"body":{"type":"string","minLength":1,"maxLength":10000},"mentions":{"type":"array","items":{"type":"string"}},"metadata":{"type":"object"}}},"ResolveDecisionRequest":{"type":"object","required":["decision_status"],"properties":{"decision_status":{"type":"string","enum":["approved","rejected","withdrawn"]},"resolution":{"type":"string","maxLength":2000,"description":"Optional resolution note."}}},"MessageResponse":{"type":"object","properties":{"message_id":{"type":"string"},"scope_type":{"type":"string"},"scope_id":{"type":"string"},"body":{"type":"string"},"author_id":{"type":"string"},"author_type":{"type":"string"},"message_type":{"type":"string"},"decision_type":{"type":"string"},"decision_status":{"type":"string"},"parent_message_id":{"type":"string"},"mentions":{"type":"array","items":{"type":"string"}},"metadata":{"type":"object"},"is_edited":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"MessageListResponse":{"type":"object","properties":{"messages":{"type":"array","items":{"$ref":"#/components/schemas/MessageResponse"}},"next_cursor":{"type":"string"},"has_more":{"type":"boolean"}}},"CreateUploadLinkRequest":{"type":"object","required":["workspace_id","origin_surface"],"properties":{"workspace_id":{"type":"string","description":"Workspace to upload into."},"origin_surface":{"type":"string","enum":["chatgpt","claude","telegram","other"],"description":"Where the upload was initiated from."}}},"CreateUploadLinkResponse":{"type":"object","properties":{"upload_session_id":{"type":"string"},"upload_url":{"type":"string","description":"URL to send the user so they can upload files via browser."},"expires_at":{"type":"string","format":"date-time"},"workspace_id":{"type":"string"}}},"UploadSessionStatusResponse":{"type":"object","properties":{"upload_session_id":{"type":"string"},"workspace_id":{"type":"string"},"status":{"type":"string"},"expires_at":{"type":"string","format":"date-time"},"assets":{"type":"array","items":{"type":"object","properties":{"media_id":{"type":"string"},"filename":{"type":"string"},"content_type":{"type":"string"},"media_type":{"type":"string"},"size_bytes":{"type":"integer"},"status":{"type":"string"},"created_at":{"type":"string","format":"date-time"}}}},"groupings":{"type":"array","items":{"type":"object","properties":{"grouping_id":{"type":"string"},"video_media_id":{"type":"string"},"thumbnail_media_id":{"type":"string"},"title":{"type":"string"},"status":{"type":"string"},"confidence":{"type":"number"},"notes":{"type":"string"}}}},"clarification":{"type":"object","properties":{"required":{"type":"boolean"},"message":{"type":"string"},"options":{"type":"array","items":{"type":"object"}}}}}},"ConfirmGroupingsRequest":{"type":"object","required":["groupings"],"properties":{"groupings":{"type":"array","items":{"type":"object","required":["grouping_id","video_media_id"],"properties":{"grouping_id":{"type":"string"},"video_media_id":{"type":"string"},"thumbnail_media_id":{"type":"string"},"title":{"type":"string"}}},"minItems":1,"description":"Confirmed groupings of uploaded assets into content items."}}},"ConfirmGroupingsResponse":{"type":"object","properties":{"upload_session_id":{"type":"string"},"status":{"type":"string"},"groupings_confirmed_count":{"type":"integer"}}},"ErrorResponse":{"type":"object","properties":{"detail":{"type":"string","description":"Human-readable error message."}}}}},"paths":{"/v2/workspaces":{"get":{"operationId":"listWorkspaces","summary":"List workspaces","description":"Returns workspaces the current user owns or is a member of.","tags":["Workspaces"],"parameters":[{"name":"role","in":"query","schema":{"type":"string","enum":["owner","member"]},"description":"Filter by role. Omit for all."},{"name":"folder_id","in":"query","schema":{"type":"string"},"description":"Filter by folder."},{"name":"include_progress","in":"query","schema":{"type":"boolean","default":true},"description":"Include progress data."},{"name":"limit","in":"query","schema":{"type":"integer","default":50}},{"name":"offset","in":"query","schema":{"type":"integer","default":0}}],"responses":{"200":{"description":"List of workspaces.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceListResponse"}}}}}},"post":{"operationId":"createWorkspace","summary":"Create a new workspace","description":"Creates a workspace to organise content for publishing.","tags":["Workspaces"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWorkspaceRequest"}}}},"responses":{"201":{"description":"Workspace created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceResponse"}}}},"400":{"description":"Validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v2/workspaces/{workspace_id}":{"get":{"operationId":"getWorkspace","summary":"Get workspace details","description":"Returns a single workspace by ID.","tags":["Workspaces"],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Workspace details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceResponse"}}}},"404":{"description":"Workspace not found."}}}},"/v2/workspaces/{workspace_id}/members":{"post":{"operationId":"addWorkspaceMember","summary":"Add member to workspace","description":"Adds a user to the workspace with the specified role.","tags":["Workspaces"],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddMemberRequest"}}}},"responses":{"200":{"description":"Updated workspace with new member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceResponse"}}}}}}},"/v2/contents":{"get":{"operationId":"listContents","summary":"List contents in workspace","description":"Returns contents filtered by workspace, status, or folder.","tags":["Contents"],"parameters":[{"name":"workspace_id","in":"query","required":true,"schema":{"type":"string"}},{"name":"status","in":"query","schema":{"type":"string","enum":["draft","ready","published"]}},{"name":"folder_id","in":"query","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","default":50}},{"name":"offset","in":"query","schema":{"type":"integer","default":0}}],"responses":{"200":{"description":"List of contents.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentListResponse"}}}}}},"post":{"operationId":"createContent","summary":"Create content","description":"Creates a content item with video, optional thumbnail, and metadata.","tags":["Contents"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateContentRequest"}}}},"responses":{"201":{"description":"Content created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentResponse"}}}}}}},"/v2/contents/{content_id}":{"get":{"operationId":"getContent","summary":"Get content details","description":"Returns a single content item by ID.","tags":["Contents"],"parameters":[{"name":"content_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Content details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentResponse"}}}}}},"patch":{"operationId":"updateContent","summary":"Update content","description":"Updates content title, description, tags, video, thumbnail, or status.","tags":["Contents"],"parameters":[{"name":"content_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateContentRequest"}}}},"responses":{"200":{"description":"Updated content.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentResponse"}}}}}}},"/v2/contents/{content_id}/full":{"get":{"operationId":"getContentFull","summary":"Get content with all configs","description":"Returns content with all platform configs and optionally expanded media.","tags":["Contents"],"parameters":[{"name":"content_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"expand","in":"query","schema":{"type":"string"},"description":"Comma-separated expansions (e.g. 'media')."}],"responses":{"200":{"description":"Content with configs.","content":{"application/json":{"schema":{"type":"object","properties":{"content_id":{"type":"string"},"workspace_id":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"status":{"type":"string"},"platforms":{"type":"array","items":{"type":"object"}},"media":{"type":"array","items":{"type":"object"}},"created_at":{"type":"string"},"updated_at":{"type":"string"}}}}}}}}},"/v2/contents/{content_id}/targets":{"post":{"operationId":"addTargets","summary":"Add platform targets to content","description":"Links one or more credentials to a content item, creating a platform config for each. This is the bridge between content and platform configs — launches require targets to be added first.","tags":["Contents"],"parameters":[{"name":"content_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddTargetsRequest"}}}},"responses":{"200":{"description":"Targets added.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddTargetsResponse"}}}},"400":{"description":"Validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v2/contents/{content_id}/apply-general-settings":{"post":{"operationId":"applyGeneralSettings","summary":"Push content settings to platform configs","description":"Copies the content title, description, and/or tags to all (or selected) platform configs and recalculates their readiness status. Call this after creating targets to move configs from INCOMPLETE to READY.","tags":["Contents"],"parameters":[{"name":"content_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplyGeneralSettingsRequest"}}}},"responses":{"200":{"description":"Settings applied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplyGeneralSettingsResponse"}}}}}}},"/v2/launches":{"post":{"operationId":"createLaunch","summary":"Launch content to platforms","description":"Publishes content to one or more platforms immediately or at a scheduled time.","tags":["Launches"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateLaunchRequest"}}}},"responses":{"201":{"description":"Launch created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LaunchResponse"}}}}}},"get":{"operationId":"listLaunches","summary":"List launches","description":"Returns launches for a workspace, optionally filtered by content or status.","tags":["Launches"],"parameters":[{"name":"workspace_id","in":"query","required":true,"schema":{"type":"string"}},{"name":"content_id","in":"query","schema":{"type":"string"}},{"name":"status","in":"query","schema":{"type":"string","enum":["pending","awaiting_approval","scheduled","in_progress","completed","partial_failure","failed","cancelled"]}},{"name":"limit","in":"query","schema":{"type":"integer","default":50}},{"name":"offset","in":"query","schema":{"type":"integer","default":0}}],"responses":{"200":{"description":"List of launches.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LaunchListResponse"}}}}}}},"/v2/launches/validate":{"post":{"operationId":"validateLaunch","summary":"Validate before launch","description":"Checks that content and platform configs are ready for publishing.","tags":["Launches"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["content_id"],"properties":{"content_id":{"type":"string"},"platforms":{"type":"array","items":{"type":"string"},"description":"Specific platforms to validate. Omit for all."}}}}}},"responses":{"200":{"description":"Validation results.","content":{"application/json":{"schema":{"type":"object","properties":{"content_id":{"type":"string"},"all_valid":{"type":"boolean"},"can_launch":{"type":"boolean"},"results":{"type":"array","items":{"type":"object"}}}}}}}}}},"/v2/launches/{launch_id}":{"get":{"operationId":"getLaunch","summary":"Get launch details","description":"Returns launch status with per-platform results and history.","tags":["Launches"],"parameters":[{"name":"launch_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Launch details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LaunchResponse"}}}}}}},"/v2/media":{"get":{"operationId":"listMedia","summary":"List media in workspace","description":"Returns media files filtered by workspace, type, or status.","tags":["Media"],"parameters":[{"name":"workspace_id","in":"query","required":true,"schema":{"type":"string"}},{"name":"media_type","in":"query","schema":{"type":"string","enum":["video","image","subtitle"]}},{"name":"status_filter","in":"query","schema":{"type":"string","enum":["uploading","processing","ready","failed"]}},{"name":"limit","in":"query","schema":{"type":"integer","default":50}},{"name":"offset","in":"query","schema":{"type":"integer","default":0}}],"responses":{"200":{"description":"List of media.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaListResponseDTO"}}}}}}},"/v2/media/{media_id}":{"get":{"operationId":"getMedia","summary":"Get media details","description":"Returns details of a media file including video metadata.","tags":["Media"],"parameters":[{"name":"media_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Media details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaResponseDTO"}}}}}}},"/v2/media/ingest-url":{"post":{"operationId":"ingestMediaFromUrl","summary":"Ingest media from a public URL","description":"Downloads a file from a public URL and uploads it to cloud storage server-side. Useful for AI agents that cannot upload binary data directly.","tags":["Media"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaIngestUrlRequestDTO"}}}},"responses":{"201":{"description":"Media ingested.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaResponseDTO"}}}}}}},"/v2/uploads/link":{"post":{"operationId":"createUploadLink","summary":"Create upload session link","description":"Creates a browser-based upload session and returns a link the user can open to upload files.","tags":["Upload Sessions"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUploadLinkRequest"}}}},"responses":{"201":{"description":"Upload link created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUploadLinkResponse"}}}}}}},"/v2/uploads/sessions/{upload_session_id}":{"get":{"operationId":"getUploadSession","summary":"Get upload session status","description":"Returns session status, uploaded assets, and inferred groupings.","tags":["Upload Sessions"],"parameters":[{"name":"upload_session_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"token","in":"query","required":true,"schema":{"type":"string"},"description":"Upload session token."}],"responses":{"200":{"description":"Session status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadSessionStatusResponse"}}}}}}},"/v2/uploads/sessions/{upload_session_id}/confirm-groupings":{"post":{"operationId":"confirmGroupings","summary":"Confirm content groupings","description":"Confirms the groupings and creates content items from the uploaded assets.","tags":["Upload Sessions"],"parameters":[{"name":"upload_session_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"token","in":"query","required":true,"schema":{"type":"string"},"description":"Upload session token."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfirmGroupingsRequest"}}}},"responses":{"200":{"description":"Groupings confirmed, content created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfirmGroupingsResponse"}}}}}}},"/v2/communication/":{"post":{"operationId":"createMessage","summary":"Create a message","description":"Posts a message to a workspace, content, team, or media scope. Supports threaded replies, @mentions, and decision requests.","tags":["Communication"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateMessageRequest"}}}},"responses":{"201":{"description":"Message created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}}}},"get":{"operationId":"listMessages","summary":"List messages by scope","description":"Returns messages for a scope with cursor-based pagination.","tags":["Communication"],"parameters":[{"name":"scope_type","in":"query","required":true,"schema":{"type":"string","enum":["team","workspace","content","media"]}},{"name":"scope_id","in":"query","required":true,"schema":{"type":"string"}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"Pagination cursor."},{"name":"limit","in":"query","schema":{"type":"integer","default":50,"maximum":200}},{"name":"thread_root_id","in":"query","schema":{"type":"string"},"description":"Filter to a specific thread."}],"responses":{"200":{"description":"List of messages.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageListResponse"}}}}}}},"/v2/communication/{message_id}":{"get":{"operationId":"getMessage","summary":"Get a message","description":"Returns a single message by ID.","tags":["Communication"],"parameters":[{"name":"message_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Message details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}}}},"delete":{"operationId":"deleteMessage","summary":"Delete a message","description":"Soft-deletes a message.","tags":["Communication"],"parameters":[{"name":"message_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Deleted."}}}},"/v2/credentials":{"get":{"operationId":"listCredentials","summary":"List connected platform accounts","description":"Returns all platform credentials for the current user.","tags":["Credentials"],"parameters":[{"name":"platform","in":"query","schema":{"type":"string","enum":["youtube","instagram","facebook","tiktok","linkedin","twitter","vimeo"]},"description":"Filter by platform."},{"name":"limit","in":"query","schema":{"type":"integer","default":50}},{"name":"offset","in":"query","schema":{"type":"integer","default":0}}],"responses":{"200":{"description":"List of credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CredentialListResponse"}}}}}}},"/v2/platform-configs":{"post":{"operationId":"createPlatformConfig","summary":"Create a platform config","description":"Creates a platform-specific configuration for a content item. Links a credential to a platform and applies default settings. Use apply-general-settings afterwards to push title/description and move status to READY.","tags":["Platform Configs"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePlatformConfigRequest"}}}},"responses":{"201":{"description":"Platform config created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformConfigResponse"}}}},"400":{"description":"Validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}