{"openapi":"3.1.0","info":{"title":"Posty API","version":"0.3.81","description":"Programmatic access to Posty workspaces: posts, approvals, comments, channels, media, campaigns, client shares, questionnaires, analytics, link in bio, inbox, Today and members. Authenticate with an API key or a Better Auth OAuth access token with mcp:tools scope. OAuth requests require X-Workspace-Id, except GET /v1/workspaces.","x-logo":{"url":"https://posty.social/brand/rebrand-v1/logo-light.png","altText":"Posty"}},"components":{"securitySchemes":{"ApiKey":{"type":"http","scheme":"bearer","bearerFormat":"pk_live_*","description":"Workspace-scoped API key. Include as `Authorization: Bearer pk_live_...`."},"OAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Better Auth OAuth access token with mcp:tools scope. Send X-Workspace-Id to select a workspace from GET /v1/workspaces. Current membership permissions apply."}},"schemas":{"ChannelList":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/Channel"}},"has_more":{"type":"boolean"},"next_cursor":{"type":"string","nullable":true}},"required":["object","data","has_more","next_cursor"]},"Channel":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"provider":{"type":"string","enum":["bluesky","discord","facebook","instagram","linkedin","pinterest","threads","tiktok","wordpress","youtube"]},"providerAccountId":{"type":"string"},"name":{"type":"string"},"accountLabel":{"type":"string","nullable":true},"avatarUrl":{"type":"string","nullable":true},"status":{"type":"string","enum":["pending","active","error","disconnected"]},"missingPermissions":{"type":"array","items":{"type":"string"},"description":"Permissions the connection lacks, as the platform names them. Features that need them stop working until the channel is reconnected with every permission allowed.","example":["read_insights"]},"connectedByUserId":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","workspaceId","provider","providerAccountId","name","accountLabel","avatarUrl","status","missingPermissions","connectedByUserId","createdAt","updatedAt"]},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","permission_error","invalid_request_error","not_found_error","conflict_error","rate_limit_error","api_error"]},"code":{"type":"string","enum":["authentication_required","invalid_api_key","api_key_expired","api_key_revoked","api_key_orphaned","missing_scope","validation_failed","invalid_schedule","invalid_channel","invalid_media","duplicate_channel_content","storage_limit_exceeded","post_limit_exceeded","workspace_inactive","workspace_required","workspace_not_found","workspace_mismatch","plan_not_eligible","media_not_uploaded","post_not_editable","post_not_found","channel_not_found","media_not_found","comment_not_found","invalid_transition","approval_required","channel_inactive","media_not_ready","resource_not_found","limit_exceeded","feature_not_available","campaign_not_found","persona_not_found","objective_not_found","questionnaire_not_found","response_not_found","link_not_found","template_not_found","block_not_found","conversation_not_found","post_thread_not_found","invitation_not_found","member_not_found","last_workspace_admin","today_item_not_found","user_session_required","folder_not_found","review_request_not_found","campaigns_disabled","campaign_archived","campaign_status_conflict","invalid_campaign_window","persona_not_in_campaign","post_not_in_campaign","share_not_found","campaign_limit_exceeded","questionnaire_archived","questionnaire_not_active","questionnaire_limit_exceeded","response_not_submitted","member_limit_exceeded","channel_limit_exceeded","handle_unavailable","operating_model_not_agency","delegated_connect_not_available","organization_not_found","idempotency_key_in_use","idempotency_in_progress","rate_limit_exceeded","internal_error"]},"message":{"type":"string"},"param":{"type":"string"},"docUrl":{"type":"string"},"requestId":{"type":"string"}},"required":["type","code","message","requestId"]}},"required":["error"]},"CommentList":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/Comment"}},"has_more":{"type":"boolean"},"next_cursor":{"type":"string","nullable":true}},"required":["object","data","has_more","next_cursor"]},"Comment":{"type":"object","properties":{"id":{"type":"string"},"postId":{"type":"string"},"body":{"type":"string"},"isChangeRequest":{"type":"boolean"},"visibility":{"type":"string","enum":["team","all"]},"createdBy":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","postId","body","isChangeRequest","visibility","createdBy","createdAt"]},"CreateCommentRequest":{"type":"object","properties":{"body":{"type":"string","minLength":1,"maxLength":10000},"isChangeRequest":{"type":"boolean"}},"required":["body"]},"MediaList":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/Media"}},"has_more":{"type":"boolean"},"next_cursor":{"type":"string","nullable":true}},"required":["object","data","has_more","next_cursor"]},"Media":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"folderId":{"type":"string","nullable":true},"title":{"type":"string"},"thumbhash":{"type":"string","nullable":true,"description":"Base64 ThumbHash (https://evanw.github.io/thumbhash/) of the thumbnail, for a blurred placeholder while it loads. Null until one has been computed."},"sizeBytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"contentType":{"type":"string"},"etag":{"type":"string","nullable":true},"status":{"type":"string","enum":["pending","processing","ready","failed","deduped"]},"width":{"type":"integer","nullable":true,"minimum":-9007199254740991,"maximum":9007199254740991},"height":{"type":"integer","nullable":true,"minimum":-9007199254740991,"maximum":9007199254740991},"altText":{"type":"string","nullable":true},"createdAt":{"type":"string","nullable":true,"format":"date-time"},"updatedAt":{"type":"string","nullable":true,"format":"date-time"},"duration":{"type":"integer","nullable":true,"minimum":-9007199254740991,"maximum":9007199254740991},"url":{"type":"string","nullable":true},"thumbnailUrl":{"type":"string","nullable":true}},"required":["id","workspaceId","folderId","title","thumbhash","sizeBytes","contentType","etag","status","width","height","altText","createdAt","updatedAt","duration","url","thumbnailUrl"]},"CreateMediaResponse":{"type":"object","properties":{"id":{"type":"string"},"uploadUrl":{"type":"string"},"key":{"type":"string"},"expiresAt":{"type":"string","format":"date-time"}},"required":["id","uploadUrl","key","expiresAt"]},"CreateMediaRequest":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":500},"contentType":{"type":"string","enum":["image/jpeg","image/png","image/webp","image/gif","video/mp4","video/quicktime"]},"sizeBytes":{"type":"integer","minimum":1,"maximum":5000000000}},"required":["title","contentType","sizeBytes"]},"CompleteMediaRequest":{"type":"object","properties":{"etag":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"},"duration":{"type":"integer"}}},"MediaFolderList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/MediaFolder"}}},"required":["data"]},"MediaFolder":{"type":"object","properties":{"id":{"type":"string"},"parentId":{"type":"string","nullable":true},"name":{"type":"string"},"color":{"type":"string","nullable":true,"enum":["red","orange","yellow","green","blue","purple","grey",null]},"createdBy":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"mediaCount":{"type":"integer","description":"Files directly in this folder. Present on list and create."}},"required":["id","parentId","name","color","createdBy","createdAt","updatedAt"]},"CreateMediaFolderRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[^/]*$"},"parentId":{"type":"string","nullable":true,"minLength":1}},"required":["name"]},"RenameMediaFolderRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[^/]*$"}},"required":["name"]},"MoveMediaFolderRequest":{"type":"object","properties":{"parentId":{"type":"string","nullable":true,"minLength":1}},"required":["parentId"]},"MediaFolderColorResult":{"type":"object","properties":{"folderIds":{"type":"array","items":{"type":"string"}}},"required":["folderIds"]},"SetMediaFolderColorRequest":{"type":"object","properties":{"folderIds":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"maxItems":200},"color":{"type":"string","nullable":true,"enum":["red","orange","yellow","green","blue","purple","grey",null]}},"required":["folderIds","color"]},"MoveMediaItemsResult":{"type":"object","properties":{"moved":{"type":"integer"}},"required":["moved"]},"MoveMediaItemsRequest":{"type":"object","properties":{"mediaIds":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"maxItems":200},"folderId":{"type":"string","nullable":true,"minLength":1}},"required":["mediaIds","folderId"]},"RenameMediaRequest":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":500}},"required":["title"]},"SetMediaAltTextRequest":{"type":"object","properties":{"altText":{"type":"string","nullable":true,"maxLength":1000}},"required":["altText"]},"MediaUsage":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"postId":{"type":"string"},"postContentId":{"type":"string"},"postStatus":{"type":"string","enum":["draft","pending_approval","pending_client_approval","approved","scheduled","delivered","partially_delivered","delivery_failed"]},"platform":{"type":"string","enum":["bluesky","discord","facebook","instagram","linkedin","pinterest","threads","tiktok","wordpress","youtube"]},"body":{"type":"string","nullable":true}},"required":["postId","postContentId","postStatus","platform","body"]}}},"required":["data"]},"StorageUsage":{"type":"object","properties":{"usedBytes":{"type":"integer"},"limitBytes":{"type":"integer","nullable":true},"remainingBytes":{"type":"integer","nullable":true},"unlimited":{"type":"boolean"}},"required":["usedBytes","limitBytes","remainingBytes","unlimited"]},"PostList":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/Post"}},"has_more":{"type":"boolean"},"next_cursor":{"type":"string","nullable":true}},"required":["object","data","has_more","next_cursor"]},"Post":{"type":"object","properties":{"createdBy":{"type":"string","nullable":true},"id":{"type":"string"},"approvalMode":{"type":"string","nullable":true,"enum":["none","optional","required","multi_level",null]},"scheduledAt":{"type":"string","nullable":true,"format":"date-time"},"status":{"type":"string","enum":["draft","pending_approval","pending_client_approval","approved","scheduled","delivered","partially_delivered","delivery_failed"]},"workspaceId":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"body":{"type":"string"},"content":{"type":"array","items":{"$ref":"#/components/schemas/PostContent"}}},"required":["createdBy","id","approvalMode","scheduledAt","status","workspaceId","createdAt","updatedAt"]},"PostContent":{"type":"object","properties":{"id":{"type":"string"},"postId":{"type":"string"},"channelId":{"type":"string","nullable":true},"platform":{"type":"string","enum":["bluesky","discord","facebook","instagram","linkedin","pinterest","threads","tiktok","wordpress","youtube"]},"body":{"type":"string","nullable":true},"firstComment":{"type":"string","nullable":true},"firstCommentExternalId":{"type":"string","nullable":true},"firstCommentError":{"type":"string","nullable":true},"contentType":{"type":"string","nullable":true,"enum":["image","video","reel","story","carousel","text",null]},"thumbnailUrl":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true},"hashtags":{"type":"string","nullable":true},"updatedBy":{"type":"string","nullable":true},"deliveryStatus":{"type":"string","enum":["pending","in_progress","delivered","failed","permanently_failed","cancelled","external"]},"deliveryAttempts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"deliveryError":{"type":"string","nullable":true},"deliveryErrorCategory":{"type":"string","nullable":true,"enum":["transform","platform","auth","media_proxy","validation","unknown",null]},"externalPostId":{"type":"string","nullable":true},"consecutiveMissingFetches":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"metadata":{"type":"object","nullable":true,"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"type":"string"}},{"nullable":true}]}},"media":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"url":{"type":"string","nullable":true},"thumbnailUrl":{"type":"string","nullable":true}},"required":["id","title","url","thumbnailUrl"]}},"deliveredAt":{"type":"string","nullable":true,"format":"date-time"},"nextRetryAt":{"type":"string","nullable":true,"format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"historyBackfilledAt":{"type":"string","nullable":true,"format":"date-time"},"deletedOnPlatformAt":{"type":"string","nullable":true,"format":"date-time"},"firstCommentPostedAt":{"type":"string","nullable":true,"format":"date-time"}},"required":["id","postId","channelId","platform","body","firstComment","firstCommentExternalId","firstCommentError","contentType","thumbnailUrl","permalink","hashtags","updatedBy","deliveryStatus","deliveryAttempts","deliveryError","deliveryErrorCategory","externalPostId","consecutiveMissingFetches","metadata","media","deliveredAt","nextRetryAt","updatedAt","historyBackfilledAt","deletedOnPlatformAt","firstCommentPostedAt"]},"CreatePostRequest":{"type":"object","properties":{"scheduledAt":{"type":"string","format":"date-time"},"approvalMode":{"type":"string","enum":["none","optional","required","multi_level"]},"content":{"type":"array","items":{"type":"object","properties":{"channelId":{"type":"string"},"body":{"type":"string","nullable":true},"firstComment":{"type":"string","nullable":true,"description":"First comment or reply to publish after the post on supported platforms. At most 10,000 Unicode codepoints after trimming whitespace. Non-empty text requires the workspace first-comment entitlement. Null or blank text means no comment."},"metadata":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"type":"string"}},{"nullable":true}]}},"mediaIds":{"type":"array","items":{"type":"string"}}},"required":["channelId"]},"minItems":1}},"required":["content"]},"UpdatePostRequest":{"type":"object","properties":{"status":{"type":"string","enum":["draft","pending_approval","pending_client_approval","approved","scheduled","delivered","partially_delivered","delivery_failed"]},"scheduledAt":{"type":"string","nullable":true,"format":"date-time"},"approvalMode":{"type":"string","enum":["none","optional","required","multi_level"]}}},"UpdatePostContentRequest":{"type":"object","properties":{"body":{"type":"string","nullable":true},"firstComment":{"type":"string","nullable":true,"description":"First comment or reply on supported platforms. At most 10,000 Unicode codepoints after trimming whitespace. Omit to preserve the saved value; null or blank text clears it. Non-empty text requires the workspace first-comment entitlement."},"metadata":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"type":"string"}},{"nullable":true}]}}}},"ReplaceContentMediaRequest":{"type":"object","properties":{"mediaIds":{"type":"array","items":{"type":"string"}}},"required":["mediaIds"]},"CalendarPostList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CalendarPost"}}},"required":["data"]},"CalendarPost":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["draft","pending_approval","pending_client_approval","approved","scheduled","delivered","partially_delivered","delivery_failed"]},"body":{"type":"string","description":"Display label: platform title or first caption, or a media fallback."},"campaignId":{"type":"string","nullable":true},"channelIds":{"type":"array","items":{"type":"string"}},"platforms":{"type":"array","items":{"type":"string","enum":["bluesky","discord","facebook","instagram","linkedin","pinterest","threads","tiktok","wordpress","youtube"]}},"thumbnail":{"type":"string","nullable":true,"description":"Short-lived signed preview URL, when the post has one."},"scheduledAt":{"type":"string","nullable":true,"format":"date-time"},"deliveryCounts":{"type":"object","properties":{"delivered":{"type":"integer"},"failed":{"type":"integer"},"pending":{"type":"integer"},"permanentlyFailed":{"type":"integer"},"total":{"type":"integer"}},"required":["delivered","failed","pending","permanentlyFailed","total"]},"deliveryErrorCategory":{"type":"string","nullable":true}},"required":["id","status","body","campaignId","channelIds","platforms","thumbnail","scheduledAt","deliveryCounts","deliveryErrorCategory"]},"BacklogPostList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/BacklogPost"}}},"required":["data"]},"BacklogPost":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["draft","pending_approval","pending_client_approval","approved","scheduled","delivered","partially_delivered","delivery_failed"]},"body":{"type":"string","description":"Display label: platform title or first caption, or a media fallback."},"campaignId":{"type":"string","nullable":true},"channelIds":{"type":"array","items":{"type":"string"}},"platforms":{"type":"array","items":{"type":"string","enum":["bluesky","discord","facebook","instagram","linkedin","pinterest","threads","tiktok","wordpress","youtube"]}},"thumbnail":{"type":"string","nullable":true,"description":"Short-lived signed preview URL, when the post has one."},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","status","body","campaignId","channelIds","platforms","thumbnail","updatedAt"]},"BacklogCount":{"type":"object","properties":{"count":{"type":"integer"}},"required":["count"]},"PostState":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["draft","pending_approval","pending_client_approval","approved","scheduled","delivered","partially_delivered","delivery_failed"]},"approvalMode":{"type":"string","nullable":true,"enum":["none","optional","required","multi_level",null]},"scheduledAt":{"type":"string","nullable":true,"format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","status","approvalMode","scheduledAt","updatedAt"]},"SetPostApprovalModeRequest":{"type":"object","properties":{"approvalMode":{"type":"string","nullable":true,"enum":["none","optional","required","multi_level",null]}},"required":["approvalMode"]},"PostRevision":{"type":"object","properties":{"id":{"type":"string"},"postId":{"type":"string"},"version":{"type":"integer"},"status":{"type":"string","enum":["draft","pending_approval","pending_client_approval","approved","scheduled","delivered","partially_delivered","delivery_failed"]},"scheduledAt":{"type":"string","nullable":true,"format":"date-time"},"createdBy":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","postId","version","status","scheduledAt","createdBy","createdAt"]},"CancelledDelivery":{"type":"object","properties":{"postContentId":{"type":"string"},"deliveryStatus":{"type":"string","enum":["pending","in_progress","delivered","failed","permanently_failed","cancelled","external"]}},"required":["postContentId","deliveryStatus"]},"CancelPostDeliveryRequest":{"type":"object","properties":{"postContentId":{"type":"string","minLength":1}},"required":["postContentId"]},"BulkSchedulePostsResult":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PostState"}}},"required":["data"]},"BulkSchedulePostsRequest":{"type":"object","properties":{"posts":{"type":"array","items":{"type":"object","properties":{"postId":{"type":"string","minLength":1},"expectedUpdatedAt":{"type":"string","format":"date-time"},"scheduledAt":{"type":"string","format":"date-time"}},"required":["postId","expectedUpdatedAt","scheduledAt"]},"minItems":1,"maxItems":50}},"required":["posts"]},"ReviewRequestList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ReviewRequest"}}},"required":["data"]},"ReviewRequest":{"type":"object","properties":{"id":{"type":"string"},"postId":{"type":"string"},"audience":{"type":"string","enum":["team","client"]},"requestedBy":{"type":"string","nullable":true},"email":{"type":"string"},"userId":{"type":"string","nullable":true},"invitationId":{"type":"string","nullable":true},"batchId":{"type":"string","nullable":true},"message":{"type":"string","nullable":true},"status":{"type":"string","enum":["pending","approved","changes_requested","superseded","cancelled"]},"respondedAt":{"type":"string","nullable":true,"format":"date-time"},"lastNotifiedAt":{"type":"string","nullable":true,"format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"reviewerName":{"type":"string","nullable":true},"reviewerImage":{"type":"string","nullable":true},"requesterName":{"type":"string","nullable":true}},"required":["id","postId","audience","requestedBy","email","userId","invitationId","batchId","message","status","respondedAt","lastNotifiedAt","createdAt","updatedAt","reviewerName","reviewerImage","requesterName"]},"CancelledReviewRequest":{"type":"object","properties":{"id":{"type":"string"},"postId":{"type":"string"},"audience":{"type":"string","enum":["team","client"]},"requestedBy":{"type":"string","nullable":true},"email":{"type":"string"},"userId":{"type":"string","nullable":true},"invitationId":{"type":"string","nullable":true},"batchId":{"type":"string","nullable":true},"message":{"type":"string","nullable":true},"status":{"type":"string","enum":["pending","approved","changes_requested","superseded","cancelled"]},"respondedAt":{"type":"string","nullable":true,"format":"date-time"},"lastNotifiedAt":{"type":"string","nullable":true,"format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","postId","audience","requestedBy","email","userId","invitationId","batchId","message","status","respondedAt","lastNotifiedAt","createdAt","updatedAt"]},"PendingReviewRequestList":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/PendingReviewRequest"}},"has_more":{"type":"boolean"},"next_cursor":{"type":"string","nullable":true}},"required":["object","data","has_more","next_cursor"]},"PendingReviewRequest":{"type":"object","properties":{"id":{"type":"string"},"postId":{"type":"string"},"audience":{"type":"string","enum":["team","client"]},"requestedBy":{"type":"string","nullable":true},"email":{"type":"string"},"userId":{"type":"string","nullable":true},"invitationId":{"type":"string","nullable":true},"batchId":{"type":"string","nullable":true},"message":{"type":"string","nullable":true},"status":{"type":"string","enum":["pending","approved","changes_requested","superseded","cancelled"]},"respondedAt":{"type":"string","nullable":true,"format":"date-time"},"lastNotifiedAt":{"type":"string","nullable":true,"format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"reviewerName":{"type":"string","nullable":true},"reviewerImage":{"type":"string","nullable":true},"postTitle":{"type":"string"},"postUpdatedAt":{"type":"string","format":"date-time","description":"Pass as expectedUpdatedAt when rescheduling this post."}},"required":["id","postId","audience","requestedBy","email","userId","invitationId","batchId","message","status","respondedAt","lastNotifiedAt","createdAt","updatedAt","reviewerName","reviewerImage","postTitle","postUpdatedAt"]},"ReviewBatch":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string","nullable":true},"total":{"type":"integer"},"pending":{"type":"integer"}},"required":["id","message","total","pending"]},"CampaignList":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"audience":{"type":"string","enum":["team","client"]},"name":{"type":"string"},"objectiveId":{"type":"string","nullable":true},"creativeDirection":{"type":"string","nullable":true},"status":{"type":"string","enum":["draft","active","completed","archived"]},"startAt":{"type":"string","nullable":true,"format":"date-time"},"endAt":{"type":"string","nullable":true,"format":"date-time"},"color":{"type":"string","nullable":true},"ongoing":{"type":"boolean"},"personaIds":{"type":"array","items":{"type":"string"}},"postCounts":{"type":"object","additionalProperties":{"type":"number"}},"coverImageUrl":{"type":"string","nullable":true},"internalNotes":{"type":"string","nullable":true},"monthlyPostTarget":{"type":"integer","nullable":true},"progressCount":{"type":"integer","nullable":true},"createdBy":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","workspaceId","audience","name","objectiveId","creativeDirection","status","startAt","endAt","color","ongoing","personaIds","postCounts","coverImageUrl"]}}},"required":["data"]},"Campaign":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"audience":{"type":"string","enum":["team","client"]},"name":{"type":"string"},"objectiveId":{"type":"string","nullable":true},"creativeDirection":{"type":"string","nullable":true},"status":{"type":"string","enum":["draft","active","completed","archived"]},"startAt":{"type":"string","nullable":true,"format":"date-time"},"endAt":{"type":"string","nullable":true,"format":"date-time"},"color":{"type":"string","nullable":true},"ongoing":{"type":"boolean"},"personaIds":{"type":"array","items":{"type":"string"}},"postCounts":{"type":"object","additionalProperties":{"type":"number"}},"coverImageUrl":{"type":"string","nullable":true},"internalNotes":{"type":"string","nullable":true},"monthlyPostTarget":{"type":"integer","nullable":true},"progressCount":{"type":"integer","nullable":true},"createdBy":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","workspaceId","audience","name","objectiveId","creativeDirection","status","startAt","endAt","color","ongoing","personaIds","postCounts","coverImageUrl"]},"CreateCampaignRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"objectiveId":{"type":"string","nullable":true,"minLength":1},"personaIds":{"type":"array","items":{"type":"string","minLength":1},"maxItems":50,"default":[]},"creativeDirection":{"type":"string","nullable":true,"maxLength":5000},"internalNotes":{"type":"string","nullable":true,"maxLength":5000},"status":{"type":"string","enum":["draft","active","completed","archived"],"default":"draft"},"startAt":{"type":"string","nullable":true,"format":"date-time"},"endAt":{"type":"string","nullable":true,"format":"date-time"},"monthlyPostTarget":{"type":"integer","nullable":true,"minimum":1,"maximum":1000},"color":{"type":"string","nullable":true,"maxLength":32}},"required":["name"]},"UpdateCampaignRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"objectiveId":{"type":"string","nullable":true,"minLength":1},"creativeDirection":{"type":"string","nullable":true,"maxLength":5000},"internalNotes":{"type":"string","nullable":true,"maxLength":5000},"startAt":{"type":"string","nullable":true,"format":"date-time"},"endAt":{"type":"string","nullable":true,"format":"date-time"},"monthlyPostTarget":{"type":"integer","nullable":true,"minimum":1,"maximum":1000},"color":{"type":"string","nullable":true,"maxLength":32}}},"SetCampaignStatusRequest":{"type":"object","properties":{"status":{"type":"string","enum":["draft","active","completed","archived"]}},"required":["status"]},"CampaignPersonas":{"type":"object","properties":{"campaignId":{"type":"string"},"personaIds":{"type":"array","items":{"type":"string"}}},"required":["campaignId","personaIds"]},"SetCampaignPersonasRequest":{"type":"object","properties":{"personaIds":{"type":"array","items":{"type":"string","minLength":1},"maxItems":50}},"required":["personaIds"]},"CampaignResults":{"type":"object","properties":{"campaignId":{"type":"string"},"audience":{"type":"string","enum":["team","client"]},"available":{"type":"boolean"},"findings":{"type":"array","items":{"type":"string"}},"windowDays":{"type":"integer"},"totals":{"type":"object","nullable":true,"properties":{"reach":{"type":"number"},"impressions":{"type":"number"},"likes":{"type":"number"},"comments":{"type":"number"},"shares":{"type":"number"},"saves":{"type":"number"},"clicks":{"type":"number"},"postCount":{"type":"number"}},"required":["reach","impressions","likes","comments","shares","saves","clicks","postCount"]},"posts":{"type":"array","items":{"type":"object","properties":{"postId":{"type":"string"},"body":{"type":"string"},"personaId":{"type":"string","nullable":true},"reach":{"type":"number"},"engagements":{"type":"number"}},"required":["postId","body","personaId","reach","engagements"]}},"personas":{"type":"array","items":{"type":"object","properties":{"personaId":{"type":"string"},"name":{"type":"string"},"reach":{"type":"number"},"engagements":{"type":"number"},"postCount":{"type":"number"}},"required":["personaId","name","reach","engagements","postCount"]}},"reach":{"type":"number"},"impressions":{"type":"number"},"engagements":{"type":"number"},"postCount":{"type":"number"}},"required":["campaignId","audience","available","findings"]},"CampaignDeliverableList":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"body":{"type":"string"},"status":{"type":"string","enum":["draft","pending_approval","pending_client_approval","approved","scheduled","delivered","partially_delivered","delivery_failed"]},"scheduledAt":{"type":"string","nullable":true,"format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"personaId":{"type":"string","nullable":true},"channelIds":{"type":"array","items":{"type":"string"}},"platforms":{"type":"array","items":{"type":"string","enum":["bluesky","discord","facebook","instagram","linkedin","pinterest","threads","tiktok","wordpress","youtube"]}},"thumbnail":{"type":"string","nullable":true}},"required":["id","body","status","scheduledAt","updatedAt","personaId","channelIds","platforms","thumbnail"]}}},"required":["data"]},"CampaignPostAssignment":{"type":"object","properties":{"postId":{"type":"string"},"campaignId":{"type":"string","nullable":true},"personaId":{"type":"string","nullable":true},"status":{"type":"string","enum":["draft","pending_approval","pending_client_approval","approved","scheduled","delivered","partially_delivered","delivery_failed"]}},"required":["postId","campaignId","personaId","status"]},"AddCampaignPostRequest":{"type":"object","properties":{"personaId":{"type":"string","nullable":true,"minLength":1}}},"PersonaList":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"color":{"type":"string","nullable":true},"templateKey":{"type":"string","nullable":true},"archivedAt":{"type":"string","nullable":true,"format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","workspaceId","name","description","color","templateKey","archivedAt","createdAt","updatedAt"]}}},"required":["data"]},"GetOrCreatePersonaResult":{"type":"object","properties":{"persona":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"color":{"type":"string","nullable":true},"templateKey":{"type":"string","nullable":true},"archivedAt":{"type":"string","nullable":true,"format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","workspaceId","name","description","color","templateKey","archivedAt","createdAt","updatedAt"]},"created":{"type":"boolean"}},"required":["persona","created"]},"GetOrCreatePersonaRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","nullable":true,"maxLength":5000},"color":{"type":"string","nullable":true,"maxLength":32},"templateKey":{"type":"string","nullable":true,"maxLength":100}},"required":["name"]},"Persona":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"color":{"type":"string","nullable":true},"templateKey":{"type":"string","nullable":true},"archivedAt":{"type":"string","nullable":true,"format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","workspaceId","name","description","color","templateKey","archivedAt","createdAt","updatedAt"]},"UpdatePersonaRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","nullable":true,"maxLength":5000},"color":{"type":"string","nullable":true,"maxLength":32}}},"ArchivePersonaRequest":{"type":"object","properties":{"archived":{"type":"boolean","default":true}}},"ObjectiveList":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"targetMetricKey":{"type":"string","nullable":true},"targetValue":{"type":"integer","nullable":true},"templateKey":{"type":"string","nullable":true},"archivedAt":{"type":"string","nullable":true,"format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","workspaceId","name","description","targetMetricKey","targetValue","templateKey","archivedAt","createdAt","updatedAt"]}}},"required":["data"]},"GetOrCreateObjectiveResult":{"type":"object","properties":{"objective":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"targetMetricKey":{"type":"string","nullable":true},"targetValue":{"type":"integer","nullable":true},"templateKey":{"type":"string","nullable":true},"archivedAt":{"type":"string","nullable":true,"format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","workspaceId","name","description","targetMetricKey","targetValue","templateKey","archivedAt","createdAt","updatedAt"]},"created":{"type":"boolean"}},"required":["objective","created"]},"GetOrCreateObjectiveRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","nullable":true,"maxLength":5000},"targetMetricKey":{"type":"string","nullable":true,"maxLength":100},"targetValue":{"type":"integer","nullable":true,"minimum":0},"templateKey":{"type":"string","nullable":true,"maxLength":100}},"required":["name"]},"Objective":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"targetMetricKey":{"type":"string","nullable":true},"targetValue":{"type":"integer","nullable":true},"templateKey":{"type":"string","nullable":true},"archivedAt":{"type":"string","nullable":true,"format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","workspaceId","name","description","targetMetricKey","targetValue","templateKey","archivedAt","createdAt","updatedAt"]},"UpdateObjectiveRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","nullable":true,"maxLength":5000},"targetMetricKey":{"type":"string","nullable":true,"maxLength":100},"targetValue":{"type":"integer","nullable":true,"minimum":0}}},"ArchiveObjectiveRequest":{"type":"object","properties":{"archived":{"type":"boolean","default":true}}},"ClientShareList":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"scope":{"type":"string","enum":["workspace","post","campaign"]},"subjectIds":{"type":"array","nullable":true,"items":{"type":"string"}},"label":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"expiresAt":{"type":"string","nullable":true,"format":"date-time"},"revokedAt":{"type":"string","nullable":true,"format":"date-time"},"lastUsedAt":{"type":"string","nullable":true,"format":"date-time"},"createdBy":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"revoked":{"type":"boolean"},"expired":{"type":"boolean"}},"required":["id","workspaceId","scope","subjectIds","label","email","expiresAt","revokedAt","lastUsedAt","createdBy","createdAt","revoked","expired"]}}},"required":["data"]},"CreatedClientShare":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"scope":{"type":"string","enum":["workspace","post","campaign"]},"subjectIds":{"type":"array","nullable":true,"items":{"type":"string"}},"label":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"expiresAt":{"type":"string","nullable":true,"format":"date-time"},"revokedAt":{"type":"string","nullable":true,"format":"date-time"},"lastUsedAt":{"type":"string","nullable":true,"format":"date-time"},"createdBy":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"revoked":{"type":"boolean"},"expired":{"type":"boolean"},"token":{"type":"string"},"url":{"type":"string"}},"required":["id","workspaceId","scope","subjectIds","label","email","expiresAt","revokedAt","lastUsedAt","createdBy","createdAt","revoked","expired","token","url"]},"CreateClientShareRequest":{"type":"object","properties":{"scope":{"type":"string","enum":["workspace","post","campaign"]},"subjectIds":{"type":"array","items":{"type":"string","minLength":1},"maxItems":100},"label":{"type":"string","maxLength":200},"email":{"type":"string","maxLength":320},"expiresAt":{"type":"string","nullable":true,"format":"date-time"}},"required":["scope"]},"QuestionnaireList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/QuestionnaireSummary"}}},"required":["data"]},"QuestionnaireSummary":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"templateId":{"type":"string","nullable":true},"templateVersion":{"type":"integer","nullable":true},"name":{"type":"string"},"description":{"type":"string","nullable":true},"definitionVersion":{"type":"integer"},"status":{"type":"string","enum":["draft","active","archived"]},"createdBy":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"sectionCount":{"type":"integer"},"questionCount":{"type":"integer"},"linkCount":{"type":"integer"},"responseCount":{"type":"integer"}},"required":["id","workspaceId","templateId","templateVersion","name","description","definitionVersion","status","createdBy","createdAt","updatedAt","sectionCount","questionCount","linkCount","responseCount"]},"QuestionnaireDetail":{"type":"object","properties":{"questionnaire":{"$ref":"#/components/schemas/Questionnaire"},"links":{"type":"array","items":{"$ref":"#/components/schemas/QuestionnaireLink"}},"responses":{"type":"array","items":{"$ref":"#/components/schemas/QuestionnaireResponseSummary"}},"delegatedConnectAvailable":{"type":"boolean"}},"required":["questionnaire","links","responses","delegatedConnectAvailable"]},"Questionnaire":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"templateId":{"type":"string","nullable":true},"templateVersion":{"type":"integer","nullable":true},"name":{"type":"string"},"description":{"type":"string","nullable":true},"definitionVersion":{"type":"integer"},"status":{"type":"string","enum":["draft","active","archived"]},"createdBy":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"sectionCount":{"type":"integer"},"questionCount":{"type":"integer"},"linkCount":{"type":"integer"},"responseCount":{"type":"integer"},"definition":{"$ref":"#/components/schemas/QuestionnaireDefinition"}},"required":["id","workspaceId","templateId","templateVersion","name","description","definitionVersion","status","createdBy","createdAt","updatedAt","sectionCount","questionCount","linkCount","responseCount","definition"]},"QuestionnaireDefinition":{"type":"object","properties":{"version":{"type":"number","enum":[1]},"intro":{"type":"object","properties":{"heading":{"type":"string","minLength":1,"maxLength":300},"body":{"type":"string","maxLength":2000}},"required":["heading"],"additionalProperties":false},"sections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":40},"title":{"type":"string","minLength":1,"maxLength":300},"description":{"type":"string","maxLength":2000},"blocks":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":40},"label":{"type":"string","minLength":1,"maxLength":300},"helpText":{"type":"string","maxLength":2000},"required":{"type":"boolean","default":false},"showWhen":{"type":"object","properties":{"blockId":{"type":"string","minLength":1,"maxLength":40},"op":{"type":"string","enum":["equals","not_equals","includes","is_answered"]},"value":{"type":"string","maxLength":300}},"required":["blockId","op"],"additionalProperties":false},"mapping":{"oneOf":[{"type":"object","properties":{"target":{"type":"string","enum":["workspace.name"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["workspace.logo"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["brand.voice"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["brand.competitors"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["persona"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["objective"]},"metricKey":{"type":"string","maxLength":100}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["campaign.creativeDirection"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["campaign.monthlyPostTarget"]}},"required":["target"],"additionalProperties":false}]},"kind":{"type":"string","enum":["short_text"]},"maxLength":{"type":"integer","minimum":1,"maximum":500,"default":200}},"required":["id","label","kind"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":40},"label":{"type":"string","minLength":1,"maxLength":300},"helpText":{"type":"string","maxLength":2000},"required":{"type":"boolean","default":false},"showWhen":{"type":"object","properties":{"blockId":{"type":"string","minLength":1,"maxLength":40},"op":{"type":"string","enum":["equals","not_equals","includes","is_answered"]},"value":{"type":"string","maxLength":300}},"required":["blockId","op"],"additionalProperties":false},"mapping":{"oneOf":[{"type":"object","properties":{"target":{"type":"string","enum":["workspace.name"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["workspace.logo"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["brand.voice"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["brand.competitors"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["persona"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["objective"]},"metricKey":{"type":"string","maxLength":100}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["campaign.creativeDirection"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["campaign.monthlyPostTarget"]}},"required":["target"],"additionalProperties":false}]},"kind":{"type":"string","enum":["long_text"]},"maxLength":{"type":"integer","minimum":1,"maximum":10000,"default":5000}},"required":["id","label","kind"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":40},"label":{"type":"string","minLength":1,"maxLength":300},"helpText":{"type":"string","maxLength":2000},"required":{"type":"boolean","default":false},"showWhen":{"type":"object","properties":{"blockId":{"type":"string","minLength":1,"maxLength":40},"op":{"type":"string","enum":["equals","not_equals","includes","is_answered"]},"value":{"type":"string","maxLength":300}},"required":["blockId","op"],"additionalProperties":false},"mapping":{"oneOf":[{"type":"object","properties":{"target":{"type":"string","enum":["workspace.name"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["workspace.logo"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["brand.voice"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["brand.competitors"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["persona"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["objective"]},"metricKey":{"type":"string","maxLength":100}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["campaign.creativeDirection"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["campaign.monthlyPostTarget"]}},"required":["target"],"additionalProperties":false}]},"kind":{"type":"string","enum":["email"]}},"required":["id","label","kind"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":40},"label":{"type":"string","minLength":1,"maxLength":300},"helpText":{"type":"string","maxLength":2000},"required":{"type":"boolean","default":false},"showWhen":{"type":"object","properties":{"blockId":{"type":"string","minLength":1,"maxLength":40},"op":{"type":"string","enum":["equals","not_equals","includes","is_answered"]},"value":{"type":"string","maxLength":300}},"required":["blockId","op"],"additionalProperties":false},"mapping":{"oneOf":[{"type":"object","properties":{"target":{"type":"string","enum":["workspace.name"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["workspace.logo"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["brand.voice"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["brand.competitors"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["persona"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["objective"]},"metricKey":{"type":"string","maxLength":100}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["campaign.creativeDirection"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["campaign.monthlyPostTarget"]}},"required":["target"],"additionalProperties":false}]},"kind":{"type":"string","enum":["url"]}},"required":["id","label","kind"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":40},"label":{"type":"string","minLength":1,"maxLength":300},"helpText":{"type":"string","maxLength":2000},"required":{"type":"boolean","default":false},"showWhen":{"type":"object","properties":{"blockId":{"type":"string","minLength":1,"maxLength":40},"op":{"type":"string","enum":["equals","not_equals","includes","is_answered"]},"value":{"type":"string","maxLength":300}},"required":["blockId","op"],"additionalProperties":false},"mapping":{"oneOf":[{"type":"object","properties":{"target":{"type":"string","enum":["workspace.name"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["workspace.logo"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["brand.voice"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["brand.competitors"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["persona"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["objective"]},"metricKey":{"type":"string","maxLength":100}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["campaign.creativeDirection"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["campaign.monthlyPostTarget"]}},"required":["target"],"additionalProperties":false}]},"kind":{"type":"string","enum":["url_list"]},"maxItems":{"type":"integer","minimum":1,"maximum":50,"default":10}},"required":["id","label","kind"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":40},"label":{"type":"string","minLength":1,"maxLength":300},"helpText":{"type":"string","maxLength":2000},"required":{"type":"boolean","default":false},"showWhen":{"type":"object","properties":{"blockId":{"type":"string","minLength":1,"maxLength":40},"op":{"type":"string","enum":["equals","not_equals","includes","is_answered"]},"value":{"type":"string","maxLength":300}},"required":["blockId","op"],"additionalProperties":false},"mapping":{"oneOf":[{"type":"object","properties":{"target":{"type":"string","enum":["workspace.name"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["workspace.logo"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["brand.voice"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["brand.competitors"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["persona"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["objective"]},"metricKey":{"type":"string","maxLength":100}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["campaign.creativeDirection"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["campaign.monthlyPostTarget"]}},"required":["target"],"additionalProperties":false}]},"kind":{"type":"string","enum":["number"]},"min":{"type":"number"},"max":{"type":"number"}},"required":["id","label","kind"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":40},"label":{"type":"string","minLength":1,"maxLength":300},"helpText":{"type":"string","maxLength":2000},"required":{"type":"boolean","default":false},"showWhen":{"type":"object","properties":{"blockId":{"type":"string","minLength":1,"maxLength":40},"op":{"type":"string","enum":["equals","not_equals","includes","is_answered"]},"value":{"type":"string","maxLength":300}},"required":["blockId","op"],"additionalProperties":false},"mapping":{"oneOf":[{"type":"object","properties":{"target":{"type":"string","enum":["workspace.name"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["workspace.logo"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["brand.voice"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["brand.competitors"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["persona"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["objective"]},"metricKey":{"type":"string","maxLength":100}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["campaign.creativeDirection"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["campaign.monthlyPostTarget"]}},"required":["target"],"additionalProperties":false}]},"kind":{"type":"string","enum":["date"]}},"required":["id","label","kind"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":40},"label":{"type":"string","minLength":1,"maxLength":300},"helpText":{"type":"string","maxLength":2000},"required":{"type":"boolean","default":false},"showWhen":{"type":"object","properties":{"blockId":{"type":"string","minLength":1,"maxLength":40},"op":{"type":"string","enum":["equals","not_equals","includes","is_answered"]},"value":{"type":"string","maxLength":300}},"required":["blockId","op"],"additionalProperties":false},"mapping":{"oneOf":[{"type":"object","properties":{"target":{"type":"string","enum":["workspace.name"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["workspace.logo"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["brand.voice"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["brand.competitors"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["persona"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["objective"]},"metricKey":{"type":"string","maxLength":100}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["campaign.creativeDirection"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["campaign.monthlyPostTarget"]}},"required":["target"],"additionalProperties":false}]},"kind":{"type":"string","enum":["single_choice"]},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":40},"label":{"type":"string","minLength":1,"maxLength":300}},"required":["id","label"],"additionalProperties":false},"minItems":2,"maxItems":50},"allowOther":{"type":"boolean","default":false}},"required":["id","label","kind","options"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":40},"label":{"type":"string","minLength":1,"maxLength":300},"helpText":{"type":"string","maxLength":2000},"required":{"type":"boolean","default":false},"showWhen":{"type":"object","properties":{"blockId":{"type":"string","minLength":1,"maxLength":40},"op":{"type":"string","enum":["equals","not_equals","includes","is_answered"]},"value":{"type":"string","maxLength":300}},"required":["blockId","op"],"additionalProperties":false},"mapping":{"oneOf":[{"type":"object","properties":{"target":{"type":"string","enum":["workspace.name"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["workspace.logo"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["brand.voice"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["brand.competitors"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["persona"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["objective"]},"metricKey":{"type":"string","maxLength":100}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["campaign.creativeDirection"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["campaign.monthlyPostTarget"]}},"required":["target"],"additionalProperties":false}]},"kind":{"type":"string","enum":["multi_choice"]},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":40},"label":{"type":"string","minLength":1,"maxLength":300}},"required":["id","label"],"additionalProperties":false},"minItems":2,"maxItems":50},"allowOther":{"type":"boolean","default":false}},"required":["id","label","kind","options"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":40},"label":{"type":"string","minLength":1,"maxLength":300},"helpText":{"type":"string","maxLength":2000},"required":{"type":"boolean","default":false},"showWhen":{"type":"object","properties":{"blockId":{"type":"string","minLength":1,"maxLength":40},"op":{"type":"string","enum":["equals","not_equals","includes","is_answered"]},"value":{"type":"string","maxLength":300}},"required":["blockId","op"],"additionalProperties":false},"mapping":{"oneOf":[{"type":"object","properties":{"target":{"type":"string","enum":["workspace.name"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["workspace.logo"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["brand.voice"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["brand.competitors"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["persona"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["objective"]},"metricKey":{"type":"string","maxLength":100}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["campaign.creativeDirection"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["campaign.monthlyPostTarget"]}},"required":["target"],"additionalProperties":false}]},"kind":{"type":"string","enum":["dropdown"]},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":40},"label":{"type":"string","minLength":1,"maxLength":300}},"required":["id","label"],"additionalProperties":false},"minItems":2,"maxItems":50}},"required":["id","label","kind","options"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":40},"label":{"type":"string","minLength":1,"maxLength":300},"helpText":{"type":"string","maxLength":2000},"required":{"type":"boolean","default":false},"showWhen":{"type":"object","properties":{"blockId":{"type":"string","minLength":1,"maxLength":40},"op":{"type":"string","enum":["equals","not_equals","includes","is_answered"]},"value":{"type":"string","maxLength":300}},"required":["blockId","op"],"additionalProperties":false},"mapping":{"oneOf":[{"type":"object","properties":{"target":{"type":"string","enum":["workspace.name"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["workspace.logo"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["brand.voice"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["brand.competitors"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["persona"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["objective"]},"metricKey":{"type":"string","maxLength":100}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["campaign.creativeDirection"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["campaign.monthlyPostTarget"]}},"required":["target"],"additionalProperties":false}]},"kind":{"type":"string","enum":["yes_no"]}},"required":["id","label","kind"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":40},"label":{"type":"string","minLength":1,"maxLength":300},"helpText":{"type":"string","maxLength":2000},"required":{"type":"boolean","default":false},"showWhen":{"type":"object","properties":{"blockId":{"type":"string","minLength":1,"maxLength":40},"op":{"type":"string","enum":["equals","not_equals","includes","is_answered"]},"value":{"type":"string","maxLength":300}},"required":["blockId","op"],"additionalProperties":false},"mapping":{"oneOf":[{"type":"object","properties":{"target":{"type":"string","enum":["workspace.name"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["workspace.logo"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["brand.voice"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["brand.competitors"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["persona"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["objective"]},"metricKey":{"type":"string","maxLength":100}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["campaign.creativeDirection"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["campaign.monthlyPostTarget"]}},"required":["target"],"additionalProperties":false}]},"kind":{"type":"string","enum":["scale"]},"min":{"type":"integer","default":1},"max":{"type":"integer","default":5},"minLabel":{"type":"string","maxLength":60},"maxLabel":{"type":"string","maxLength":60}},"required":["id","label","kind"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":40},"label":{"type":"string","minLength":1,"maxLength":300},"helpText":{"type":"string","maxLength":2000},"required":{"type":"boolean","default":false},"showWhen":{"type":"object","properties":{"blockId":{"type":"string","minLength":1,"maxLength":40},"op":{"type":"string","enum":["equals","not_equals","includes","is_answered"]},"value":{"type":"string","maxLength":300}},"required":["blockId","op"],"additionalProperties":false},"mapping":{"oneOf":[{"type":"object","properties":{"target":{"type":"string","enum":["workspace.name"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["workspace.logo"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["brand.voice"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["brand.competitors"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["persona"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["objective"]},"metricKey":{"type":"string","maxLength":100}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["campaign.creativeDirection"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["campaign.monthlyPostTarget"]}},"required":["target"],"additionalProperties":false}]},"kind":{"type":"string","enum":["color_list"]},"maxItems":{"type":"integer","minimum":1,"maximum":12,"default":6}},"required":["id","label","kind"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":40},"label":{"type":"string","minLength":1,"maxLength":300},"helpText":{"type":"string","maxLength":2000},"required":{"type":"boolean","default":false},"showWhen":{"type":"object","properties":{"blockId":{"type":"string","minLength":1,"maxLength":40},"op":{"type":"string","enum":["equals","not_equals","includes","is_answered"]},"value":{"type":"string","maxLength":300}},"required":["blockId","op"],"additionalProperties":false},"mapping":{"oneOf":[{"type":"object","properties":{"target":{"type":"string","enum":["workspace.name"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["workspace.logo"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["brand.voice"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["brand.competitors"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["persona"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["objective"]},"metricKey":{"type":"string","maxLength":100}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["campaign.creativeDirection"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["campaign.monthlyPostTarget"]}},"required":["target"],"additionalProperties":false}]},"kind":{"type":"string","enum":["file_upload"]},"accept":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"maxItems":20},"maxFiles":{"type":"integer","minimum":1,"maximum":20,"default":5}},"required":["id","label","kind","accept"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":40},"label":{"type":"string","minLength":1,"maxLength":300},"helpText":{"type":"string","maxLength":2000},"required":{"type":"boolean","default":false},"showWhen":{"type":"object","properties":{"blockId":{"type":"string","minLength":1,"maxLength":40},"op":{"type":"string","enum":["equals","not_equals","includes","is_answered"]},"value":{"type":"string","maxLength":300}},"required":["blockId","op"],"additionalProperties":false},"mapping":{"oneOf":[{"type":"object","properties":{"target":{"type":"string","enum":["workspace.name"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["workspace.logo"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["brand.voice"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["brand.competitors"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["persona"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["objective"]},"metricKey":{"type":"string","maxLength":100}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["campaign.creativeDirection"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["campaign.monthlyPostTarget"]}},"required":["target"],"additionalProperties":false}]},"kind":{"type":"string","enum":["statement"]},"body":{"type":"string","maxLength":2000},"confirmLabel":{"type":"string","maxLength":300}},"required":["id","label","kind","body"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":40},"label":{"type":"string","minLength":1,"maxLength":300},"helpText":{"type":"string","maxLength":2000},"required":{"type":"boolean","default":false},"showWhen":{"type":"object","properties":{"blockId":{"type":"string","minLength":1,"maxLength":40},"op":{"type":"string","enum":["equals","not_equals","includes","is_answered"]},"value":{"type":"string","maxLength":300}},"required":["blockId","op"],"additionalProperties":false},"mapping":{"oneOf":[{"type":"object","properties":{"target":{"type":"string","enum":["workspace.name"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["workspace.logo"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["brand.voice"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["brand.competitors"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["persona"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["objective"]},"metricKey":{"type":"string","maxLength":100}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["campaign.creativeDirection"]}},"required":["target"],"additionalProperties":false},{"type":"object","properties":{"target":{"type":"string","enum":["campaign.monthlyPostTarget"]}},"required":["target"],"additionalProperties":false}]},"kind":{"type":"string","enum":["connect_channels"]},"platforms":{"type":"array","items":{"type":"string","enum":["bluesky","discord","facebook","instagram","linkedin","pinterest","threads","tiktok","wordpress","youtube"]},"minItems":1},"minimum":{"type":"integer","minimum":0,"default":0}},"required":["id","label","kind","platforms"],"additionalProperties":false}]},"maxItems":50}},"required":["id","title","blocks"],"additionalProperties":false},"minItems":1,"maxItems":20},"outro":{"type":"object","properties":{"heading":{"type":"string","minLength":1,"maxLength":300},"body":{"type":"string","maxLength":2000}},"required":["heading"],"additionalProperties":false}},"required":["version","intro","sections","outro"],"additionalProperties":false},"QuestionnaireLink":{"type":"object","properties":{"id":{"type":"string"},"questionnaireId":{"type":"string"},"workspaceId":{"type":"string"},"recipientEmail":{"type":"string","nullable":true},"recipientName":{"type":"string","nullable":true},"note":{"type":"string","nullable":true},"expiresAt":{"type":"string","format":"date-time"},"revokedAt":{"type":"string","nullable":true,"format":"date-time"},"lastUsedAt":{"type":"string","nullable":true,"format":"date-time"},"reminderDays":{"type":"array","items":{"type":"integer","minimum":1,"maximum":60},"maxItems":5},"lastReminderAt":{"type":"string","nullable":true,"format":"date-time"},"createdBy":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"definitionVersion":{"type":"integer"},"state":{"type":"string","enum":["open","submitted","revoked","expired"]}},"required":["id","questionnaireId","workspaceId","recipientEmail","recipientName","note","expiresAt","revokedAt","lastUsedAt","reminderDays","lastReminderAt","createdBy","createdAt","definitionVersion","state"]},"QuestionnaireResponseSummary":{"type":"object","properties":{"id":{"type":"string"},"linkId":{"type":"string"},"status":{"type":"string","enum":["draft","submitted","applied"]},"respondentName":{"type":"string","nullable":true},"respondentEmail":{"type":"string","nullable":true},"startedAt":{"type":"string","format":"date-time"},"submittedAt":{"type":"string","nullable":true,"format":"date-time"},"appliedAt":{"type":"string","nullable":true,"format":"date-time"}},"required":["id","linkId","status","respondentName","respondentEmail","startedAt","submittedAt","appliedAt"]},"CreateQuestionnaireRequest":{"type":"object","properties":{"templateId":{"type":"string","nullable":true,"minLength":1},"name":{"type":"string","minLength":1,"maxLength":200}}},"UpdateQuestionnaireRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","nullable":true,"maxLength":2000},"definition":{"$ref":"#/components/schemas/QuestionnaireDefinition"}}},"SetQuestionnaireStatusRequest":{"type":"object","properties":{"status":{"type":"string","enum":["draft","active","archived"]}},"required":["status"]},"QuestionnaireLinkList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/QuestionnaireLink"}}},"required":["data"]},"CreatedQuestionnaireLink":{"type":"object","properties":{"id":{"type":"string"},"questionnaireId":{"type":"string"},"workspaceId":{"type":"string"},"recipientEmail":{"type":"string","nullable":true},"recipientName":{"type":"string","nullable":true},"note":{"type":"string","nullable":true},"expiresAt":{"type":"string","format":"date-time"},"revokedAt":{"type":"string","nullable":true,"format":"date-time"},"lastUsedAt":{"type":"string","nullable":true,"format":"date-time"},"reminderDays":{"type":"array","items":{"type":"integer","minimum":1,"maximum":60},"maxItems":5},"lastReminderAt":{"type":"string","nullable":true,"format":"date-time"},"createdBy":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"definitionVersion":{"type":"integer"},"state":{"type":"string","enum":["open","submitted","revoked","expired"]},"url":{"type":"string","format":"uri","description":"The public form. Returned only here: Posty stores a hash of the token, so the URL cannot be fetched again."}},"required":["id","questionnaireId","workspaceId","recipientEmail","recipientName","note","expiresAt","revokedAt","lastUsedAt","reminderDays","lastReminderAt","createdBy","createdAt","definitionVersion","state","url"]},"CreateQuestionnaireLinkRequest":{"type":"object","properties":{"recipientName":{"type":"string","nullable":true,"maxLength":200},"note":{"type":"string","nullable":true,"maxLength":2000},"expiresAt":{"type":"string","format":"date-time","description":"Defaults to 30 days from now; capped at 180 days."}},"additionalProperties":false},"QuestionnaireResponseList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/QuestionnaireResponseSummary"}}},"required":["data"]},"QuestionnaireExport":{"type":"object","properties":{"columns":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"}},"required":["id","label"]}},"rows":{"type":"array","items":{"type":"object","properties":{"respondentName":{"type":"string","nullable":true},"respondentEmail":{"type":"string","nullable":true},"submittedAt":{"type":"string","nullable":true,"format":"date-time"},"cells":{"type":"array","items":{"type":"string"}}},"required":["respondentName","respondentEmail","submittedAt","cells"]}}},"required":["columns","rows"]},"QuestionnaireResponseDetail":{"type":"object","properties":{"response":{"$ref":"#/components/schemas/QuestionnaireResponse"},"media":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","nullable":true},"title":{"type":"string"},"contentType":{"type":"string"}},"required":["id","url","title","contentType"]}},"channels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"provider":{"type":"string","enum":["bluesky","discord","facebook","instagram","linkedin","pinterest","threads","tiktok","wordpress","youtube"]},"name":{"type":"string"},"avatarUrl":{"type":"string","nullable":true},"connectedHere":{"type":"boolean"}},"required":["id","provider","name","avatarUrl","connectedHere"]}}},"required":["response","media","channels"]},"QuestionnaireResponse":{"type":"object","properties":{"id":{"type":"string"},"linkId":{"type":"string"},"status":{"type":"string","enum":["draft","submitted","applied"]},"respondentName":{"type":"string","nullable":true},"respondentEmail":{"type":"string","nullable":true},"startedAt":{"type":"string","format":"date-time"},"submittedAt":{"type":"string","nullable":true,"format":"date-time"},"appliedAt":{"type":"string","nullable":true,"format":"date-time"},"questionnaireId":{"type":"string"},"workspaceId":{"type":"string"},"questionnaireName":{"type":"string"},"answers":{"$ref":"#/components/schemas/QuestionnaireAnswers"},"definition":{"allOf":[{"$ref":"#/components/schemas/QuestionnaireDefinition"},{"description":"The form as it was when this link was sent."}]},"appliedBy":{"type":"string","nullable":true},"appliedTargets":{"type":"array","items":{"type":"object","properties":{"blockId":{"type":"string"},"target":{"type":"string"},"value":{"type":"string"},"appliedAt":{"type":"number"}},"required":["blockId","target","value","appliedAt"],"additionalProperties":false}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","linkId","status","respondentName","respondentEmail","startedAt","submittedAt","appliedAt","questionnaireId","workspaceId","questionnaireName","answers","definition","appliedBy","appliedTargets","createdAt","updatedAt"]},"QuestionnaireAnswers":{"type":"object","additionalProperties":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["short_text"]},"value":{"type":"string"}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["long_text"]},"value":{"type":"string"}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["email"]},"value":{"type":"string"}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["url"]},"value":{"type":"string"}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["url_list"]},"values":{"type":"array","items":{"type":"string"}}},"required":["kind","values"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["number"]},"value":{"type":"number"}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["date"]},"value":{"type":"string"}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["single_choice"]},"optionId":{"type":"string","nullable":true},"other":{"type":"string"}},"required":["kind","optionId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["multi_choice"]},"optionIds":{"type":"array","items":{"type":"string"}},"other":{"type":"string"}},"required":["kind","optionIds"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["dropdown"]},"optionId":{"type":"string"}},"required":["kind","optionId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["yes_no"]},"value":{"type":"boolean"}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["scale"]},"value":{"type":"integer"}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["color_list"]},"values":{"type":"array","items":{"type":"string"}}},"required":["kind","values"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["file_upload"]},"mediaIds":{"type":"array","items":{"type":"string"}}},"required":["kind","mediaIds"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["statement"]},"confirmed":{"type":"boolean"}},"required":["kind","confirmed"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["connect_channels"]},"channelIds":{"type":"array","items":{"type":"string"}}},"required":["kind","channelIds"],"additionalProperties":false}]}},"AppliedQuestionnaireResponse":{"type":"object","properties":{"response":{"$ref":"#/components/schemas/QuestionnaireResponse"},"campaignPrefill":{"type":"object","properties":{"creativeDirection":{"type":"string"},"monthlyPostTarget":{"type":"integer"},"objectiveIds":{"type":"array","items":{"type":"string"}},"personaIds":{"type":"array","items":{"type":"string"}}},"required":["objectiveIds","personaIds"]}},"required":["response","campaignPrefill"]},"ApplyQuestionnaireResponseRequest":{"type":"object","properties":{"blockIds":{"type":"array","items":{"type":"string","minLength":1},"maxItems":200}},"required":["blockIds"]},"QuestionnaireTemplateList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/QuestionnaireTemplateSummary"}},"starters":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"sectionCount":{"type":"integer"}},"required":["key","name","description","sectionCount"]}}},"required":["data","starters"]},"QuestionnaireTemplateSummary":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"definitionVersion":{"type":"integer"},"starterKey":{"type":"string","nullable":true},"archived":{"type":"boolean"},"archivedAt":{"type":"string","nullable":true,"format":"date-time"},"createdBy":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"sectionCount":{"type":"integer"},"questionCount":{"type":"integer"}},"required":["id","organizationId","name","description","definitionVersion","starterKey","archived","archivedAt","createdBy","createdAt","updatedAt","sectionCount","questionCount"]},"QuestionnaireTemplate":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"definitionVersion":{"type":"integer"},"starterKey":{"type":"string","nullable":true},"archived":{"type":"boolean"},"archivedAt":{"type":"string","nullable":true,"format":"date-time"},"createdBy":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"sectionCount":{"type":"integer"},"questionCount":{"type":"integer"},"definition":{"$ref":"#/components/schemas/QuestionnaireDefinition"}},"required":["id","organizationId","name","description","definitionVersion","starterKey","archived","archivedAt","createdBy","createdAt","updatedAt","sectionCount","questionCount","definition"]},"CreateQuestionnaireTemplateRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","nullable":true,"maxLength":2000},"definition":{"$ref":"#/components/schemas/QuestionnaireDefinition"},"starterKey":{"type":"string","maxLength":100}}},"UpdateQuestionnaireTemplateRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","nullable":true,"maxLength":2000},"definition":{"$ref":"#/components/schemas/QuestionnaireDefinition"}}},"AnalyticsOverview":{"type":"object","properties":{"retentionDays":{"type":"number","description":"Days of history the workspace's plan retains. 0 means the plan includes no analytics."},"requestedDays":{"type":"number"},"effectiveDays":{"type":"number","description":"Length of the window actually read, after clamping."},"startDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"endDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"prevStartDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"provisionalSinceDate":{"type":"string","nullable":true,"pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Dates on or after this are still collecting (platform insight lag) and may rise."},"planName":{"type":"string","enum":["free","starter","pro","business"]},"audienceAnalyticsEnabled":{"type":"boolean"},"kpis":{"$ref":"#/components/schemas/AnalyticsKpis"},"channelSummaries":{"type":"array","items":{"$ref":"#/components/schemas/AnalyticsChannelSummary"}},"dailyTotals":{"type":"array","items":{"$ref":"#/components/schemas/AnalyticsDailyTotal"}},"dailyByPlatform":{"type":"array","items":{"$ref":"#/components/schemas/AnalyticsDailyByPlatform"}},"topPosts":{"type":"array","items":{"$ref":"#/components/schemas/AnalyticsTopPost"}},"backfillingChannels":{"type":"array","items":{"$ref":"#/components/schemas/AnalyticsBackfillingChannel"},"description":"Channels still importing their history, so totals may be incomplete."}},"required":["retentionDays","requestedDays","effectiveDays","startDate","endDate","prevStartDate","provisionalSinceDate","planName","audienceAnalyticsEnabled","kpis","channelSummaries","dailyTotals","dailyByPlatform","topPosts","backfillingChannels"]},"AnalyticsKpis":{"type":"object","properties":{"followers":{"type":"number"},"views":{"type":"number"},"impressions":{"type":"number"},"reach":{"type":"number"},"engagements":{"type":"number"},"engagementRateBp":{"type":"number","nullable":true},"clicks":{"type":"number"},"saves":{"type":"number"},"posts":{"type":"number"},"prevFollowers":{"type":"number"},"prevViews":{"type":"number"},"prevImpressions":{"type":"number"},"prevReach":{"type":"number"},"prevEngagements":{"type":"number"},"prevEngagementRateBp":{"type":"number","nullable":true},"prevClicks":{"type":"number"},"prevSaves":{"type":"number"},"prevPosts":{"type":"number"}},"required":["followers","views","impressions","reach","engagements","engagementRateBp","clicks","saves","posts","prevFollowers","prevViews","prevImpressions","prevReach","prevEngagements","prevEngagementRateBp","prevClicks","prevSaves","prevPosts"],"description":"Totals for the window and the previous window of equal length (prev*). Engagements are likes, comments, shares and saves gained in the window. Rates are basis points (250 = 2.5%)."},"AnalyticsChannelSummary":{"type":"object","properties":{"channelId":{"type":"string"},"channelName":{"type":"string"},"channelLabel":{"type":"string","nullable":true},"platform":{"type":"string","enum":["bluesky","discord","facebook","instagram","linkedin","pinterest","threads","tiktok","wordpress","youtube"]},"followersLatest":{"type":"number","nullable":true},"accountViewsTotal":{"type":"number","nullable":true},"accountReachTotal":{"type":"number","nullable":true},"profileVisitsTotal":{"type":"number","nullable":true},"engagementsTotal":{"type":"number","nullable":true},"postsPublished":{"type":"number"},"prevFollowersLatest":{"type":"number","nullable":true},"prevAccountViewsTotal":{"type":"number","nullable":true},"prevEngagementsTotal":{"type":"number","nullable":true}},"required":["channelId","channelName","channelLabel","platform","followersLatest","accountViewsTotal","accountReachTotal","profileVisitsTotal","engagementsTotal","postsPublished","prevFollowersLatest","prevAccountViewsTotal","prevEngagementsTotal"]},"AnalyticsDailyTotal":{"type":"object","properties":{"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"impressions":{"type":"number"},"reach":{"type":"number"},"likes":{"type":"number"},"comments":{"type":"number"},"shares":{"type":"number"},"saves":{"type":"number"},"clicks":{"type":"number"},"videoViews":{"type":"number"},"accountReach":{"type":"number"},"accountViews":{"type":"number"},"followers":{"type":"number"},"posts":{"type":"number"}},"required":["date","impressions","reach","likes","comments","shares","saves","clicks","videoViews","accountReach","accountViews","followers","posts"]},"AnalyticsDailyByPlatform":{"type":"object","properties":{"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"platform":{"type":"string","enum":["bluesky","discord","facebook","instagram","linkedin","pinterest","threads","tiktok","wordpress","youtube"]},"impressions":{"type":"number"},"reach":{"type":"number"},"likes":{"type":"number"},"comments":{"type":"number"},"shares":{"type":"number"},"saves":{"type":"number"},"clicks":{"type":"number"},"videoViews":{"type":"number"},"accountReach":{"type":"number"},"accountViews":{"type":"number"},"followersCount":{"type":"number"}},"required":["date","platform","impressions","reach","likes","comments","shares","saves","clicks","videoViews","accountReach","accountViews","followersCount"]},"AnalyticsTopPost":{"type":"object","properties":{"postId":{"type":"string"},"postContentId":{"type":"string"},"postTitle":{"type":"string"},"channelId":{"type":"string"},"channelName":{"type":"string"},"platform":{"type":"string","enum":["bluesky","discord","facebook","instagram","linkedin","pinterest","threads","tiktok","wordpress","youtube"]},"contentType":{"type":"string","nullable":true,"enum":["image","video","reel","story","carousel","text",null]},"thumbnailUrl":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true},"date":{"type":"string","description":"Publish time, ISO 8601."},"deletedOnPlatformAt":{"type":"string","nullable":true},"impressions":{"type":"number","nullable":true},"reach":{"type":"number","nullable":true},"likes":{"type":"number","nullable":true},"comments":{"type":"number","nullable":true},"shares":{"type":"number","nullable":true},"saves":{"type":"number","nullable":true},"engagementRateBp":{"type":"number","nullable":true}},"required":["postId","postContentId","postTitle","channelId","channelName","platform","contentType","thumbnailUrl","permalink","date","deletedOnPlatformAt","impressions","reach","likes","comments","shares","saves","engagementRateBp"]},"AnalyticsBackfillingChannel":{"type":"object","properties":{"channelId":{"type":"string"},"channelName":{"type":"string"},"channelLabel":{"type":"string","nullable":true},"platform":{"type":"string","enum":["bluesky","discord","facebook","instagram","linkedin","pinterest","threads","tiktok","wordpress","youtube"]}},"required":["channelId","channelName","channelLabel","platform"]},"AnalyticsDetail":{"type":"object","properties":{"lifetimeAsOf":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"postRows":{"type":"array","items":{"$ref":"#/components/schemas/AnalyticsPostPerformance"},"description":"Posts with analytics in the window, highest period impressions first. Top-level metrics are gains within the window."},"contentTypeBreakdown":{"type":"array","items":{"type":"object","properties":{"contentType":{"type":"string"},"postCount":{"type":"number"},"avgEngagementRateBp":{"type":"number"}},"required":["contentType","postCount","avgEngagementRateBp"]}},"topHashtags":{"type":"array","items":{"type":"object","properties":{"hashtag":{"type":"string"},"postCount":{"type":"number"},"avgEngagementRateBp":{"type":"number"}},"required":["hashtag","postCount","avgEngagementRateBp"]}},"heatmap":{"type":"array","items":{"type":"object","properties":{"dayOfWeek":{"type":"number","description":"0 is Sunday (UTC)."},"hourOfDay":{"type":"number","description":"UTC hour, 0 to 23."},"avgEngagementRateBp":{"type":"number"},"postCount":{"type":"number"}},"required":["dayOfWeek","hourOfDay","avgEngagementRateBp","postCount"]},"description":"Average engagement rate by UTC publish weekday and hour."}},"required":["lifetimeAsOf","postRows","contentTypeBreakdown","topHashtags","heatmap"]},"AnalyticsPostPerformance":{"type":"object","properties":{"postId":{"type":"string"},"postContentId":{"type":"string"},"postTitle":{"type":"string"},"channelId":{"type":"string"},"channelName":{"type":"string"},"platform":{"type":"string","enum":["bluesky","discord","facebook","instagram","linkedin","pinterest","threads","tiktok","wordpress","youtube"]},"contentType":{"type":"string","nullable":true,"enum":["image","video","reel","story","carousel","text",null]},"thumbnailUrl":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true},"date":{"type":"string","description":"Publish time, ISO 8601."},"hashtags":{"type":"array","items":{"type":"string"}},"externalPostId":{"type":"string","nullable":true},"metricsDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"lifetime":{"$ref":"#/components/schemas/AnalyticsLifetimeMetrics"},"impressions":{"type":"number","nullable":true},"reach":{"type":"number","nullable":true},"likes":{"type":"number","nullable":true},"comments":{"type":"number","nullable":true},"shares":{"type":"number","nullable":true},"saves":{"type":"number","nullable":true},"engagementRateBp":{"type":"number","nullable":true},"clicks":{"type":"number","nullable":true},"videoViews":{"type":"number","nullable":true}},"required":["postId","postContentId","postTitle","channelId","channelName","platform","contentType","thumbnailUrl","permalink","date","hashtags","externalPostId","metricsDate","lifetime","impressions","reach","likes","comments","shares","saves","engagementRateBp","clicks","videoViews"]},"AnalyticsLifetimeMetrics":{"type":"object","properties":{"impressions":{"type":"number","nullable":true},"reach":{"type":"number","nullable":true},"likes":{"type":"number","nullable":true},"comments":{"type":"number","nullable":true},"shares":{"type":"number","nullable":true},"saves":{"type":"number","nullable":true},"clicks":{"type":"number","nullable":true},"videoViews":{"type":"number","nullable":true},"engagementRateBp":{"type":"number","nullable":true}},"required":["impressions","reach","likes","comments","shares","saves","clicks","videoViews","engagementRateBp"],"description":"Each metric's latest lifetime reading on or before the window end. Null means not reported by the platform."},"AnalyticsAudience":{"type":"object","properties":{"startDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"endDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"audience":{"type":"array","items":{"type":"object","properties":{"dimension":{"type":"string"},"dimensionValue":{"type":"string"},"valuePctBp":{"type":"number","nullable":true},"valueCount":{"type":"number","nullable":true}},"required":["dimension","dimensionValue","valuePctBp","valueCount"]}}},"required":["startDate","endDate","audience"]},"AnalyticsChannelNativeMetrics":{"type":"object","properties":{"metrics":{"type":"array","items":{"type":"object","properties":{"metricKey":{"type":"string"},"label":{"type":"string"},"description":{"type":"string"},"unit":{"type":"string","enum":["count","rate_bp","seconds","milliseconds","currency_cents"]},"semantic":{"type":"string","enum":["daily_delta","cumulative","window_aggregate"]},"value":{"type":"number"},"postCount":{"type":"number"}},"required":["metricKey","label","description","unit","semantic","value","postCount"]}}},"required":["metrics"]},"AnalyticsPostNativeMetrics":{"type":"object","properties":{"metrics":{"type":"array","items":{"type":"object","properties":{"metricKey":{"type":"string"},"label":{"type":"string"},"description":{"type":"string"},"unit":{"type":"string","enum":["count","rate_bp","seconds","milliseconds","currency_cents"]},"semantic":{"type":"string","enum":["daily_delta","cumulative","window_aggregate"]},"value":{"type":"number"}},"required":["metricKey","label","description","unit","semantic","value"]}}},"required":["metrics"]},"AnalyticsRetentionCurve":{"type":"object","properties":{"samples":{"type":"array","items":{"type":"object","properties":{"elapsedRatio":{"type":"number"},"watchRatio":{"type":"number"},"performance":{"type":"number"}},"required":["elapsedRatio","watchRatio"]}}},"required":["samples"]},"AnalyticsPostDailySeries":{"type":"object","properties":{"series":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"impressions":{"type":"number"},"reach":{"type":"number"},"likes":{"type":"number"},"comments":{"type":"number"},"shares":{"type":"number"},"saves":{"type":"number"},"videoViews":{"type":"number"},"engagementRateBp":{"type":"number","nullable":true}},"required":["date","impressions","reach","likes","comments","shares","saves","videoViews","engagementRateBp"]}}},"required":["series"]},"LinkBioPage":{"type":"object","properties":{"id":{"type":"string"},"handle":{"type":"string","description":"Draft handle. The public page uses publishedHandle."},"title":{"type":"string"},"bio":{"type":"string","nullable":true},"avatarUrl":{"type":"string","nullable":true},"theme":{"$ref":"#/components/schemas/LinkBioTheme"},"seo":{"$ref":"#/components/schemas/LinkBioSeo"},"published":{"type":"boolean","description":"Whether the public page is reachable at all."},"publishedHandle":{"type":"string","nullable":true},"publishedAt":{"type":"string","nullable":true,"format":"date-time"},"hasUnpublishedChanges":{"type":"boolean","description":"True when the draft differs from what the public page shows."},"viewCount":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"blocks":{"type":"array","items":{"$ref":"#/components/schemas/LinkBioBlock"}}},"required":["id","handle","title","bio","avatarUrl","theme","seo","published","publishedHandle","publishedAt","hasUnpublishedChanges","viewCount","createdAt","updatedAt","blocks"]},"LinkBioTheme":{"type":"object","nullable":true,"properties":{"backgroundColor":{"type":"string","pattern":"^#(?:[\\dA-Fa-f]{3}|[\\dA-Fa-f]{6})$","description":"Hex colour such as #18181B."},"backgroundGradient":{"type":"string","maxLength":280},"backgroundImageUrl":{"type":"string","maxLength":2048},"buttonBorderRadius":{"type":"string","enum":["none","sm","md","lg","full"]},"buttonColor":{"type":"string","pattern":"^#(?:[\\dA-Fa-f]{3}|[\\dA-Fa-f]{6})$","description":"Hex colour such as #18181B."},"buttonStyle":{"type":"string","enum":["filled","outline","shadow","soft"]},"buttonTextColor":{"type":"string","pattern":"^#(?:[\\dA-Fa-f]{3}|[\\dA-Fa-f]{6})$","description":"Hex colour such as #18181B."},"fontFamily":{"type":"string","enum":["inter","plus-jakarta","mono","serif","instrument-serif","manrope","ibm-plex-mono","cormorant-garamond","space-grotesk","fraunces","bricolage-grotesque","outfit","dm-serif-display","unbounded","playfair-display","libre-baskerville","bebas-neue","archivo-black","syne"]},"surfaceBorderRadius":{"type":"string","enum":["none","sm","md","lg","xl"]},"textColor":{"type":"string","pattern":"^#(?:[\\dA-Fa-f]{3}|[\\dA-Fa-f]{6})$","description":"Hex colour such as #18181B."}}},"LinkBioSeo":{"type":"object","nullable":true,"properties":{"description":{"type":"string","maxLength":300},"noIndex":{"type":"boolean","default":false},"ogImageUrl":{"type":"string","maxLength":2048},"title":{"type":"string","maxLength":120}}},"LinkBioBlock":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"url":{"type":"string","nullable":true},"thumbnailUrl":{"type":"string","nullable":true},"sortOrder":{"type":"integer"},"visible":{"type":"boolean"},"clickCount":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["profile"]},"config":{"type":"object","nullable":true,"properties":{"alignment":{"type":"string","enum":["left","center","right"],"default":"left"},"avatarPosition":{"type":"object","properties":{"x":{"type":"integer","minimum":0,"maximum":100},"y":{"type":"integer","minimum":0,"maximum":100}},"required":["x","y"]},"avatarSize":{"type":"integer","minimum":72,"maximum":180},"avatarUrl":{"type":"string"},"bio":{"type":"string","maxLength":300},"coverHeight":{"type":"integer","minimum":120,"maximum":260},"coverImageUrl":{"type":"string"},"coverPosition":{"type":"object","properties":{"x":{"type":"integer","minimum":0,"maximum":100},"y":{"type":"integer","minimum":0,"maximum":100}},"required":["x","y"]},"displayHandle":{"type":"string","maxLength":80},"displayName":{"type":"string","maxLength":100},"layout":{"type":"object","properties":{"side":{"type":"string","enum":["left","right"]},"width":{"type":"string","enum":["full","half"],"default":"full"}}},"variant":{"type":"string","enum":["avatar","avatar_text","cover","cover_avatar"],"default":"avatar_text"}},"description":"Type-specific settings. Null when the stored value cannot be read for this type."}},"required":["id","title","description","url","thumbnailUrl","sortOrder","visible","clickCount","createdAt","updatedAt","type","config"]},{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"url":{"type":"string","nullable":true},"thumbnailUrl":{"type":"string","nullable":true},"sortOrder":{"type":"integer"},"visible":{"type":"boolean"},"clickCount":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["link"]},"config":{"type":"object","nullable":true,"properties":{"alignment":{"type":"string","enum":["left","center","right"],"default":"left"},"featured":{"type":"boolean","default":false},"layout":{"type":"object","properties":{"side":{"type":"string","enum":["left","right"]},"width":{"type":"string","enum":["full","half"],"default":"full"}}},"mode":{"type":"string","enum":["button","link"]},"schedule":{"type":"object","properties":{"endAt":{"type":"string","maxLength":64},"mode":{"type":"string","enum":["window"],"default":"window"},"startAt":{"type":"string","maxLength":64},"timezone":{"type":"string","maxLength":100}}},"showTitle":{"type":"boolean","default":true},"thumbnailPosition":{"type":"object","properties":{"x":{"type":"integer","minimum":0,"maximum":100},"y":{"type":"integer","minimum":0,"maximum":100}},"required":["x","y"]}},"description":"Type-specific settings. Null when the stored value cannot be read for this type."}},"required":["id","title","description","url","thumbnailUrl","sortOrder","visible","clickCount","createdAt","updatedAt","type","config"]},{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"url":{"type":"string","nullable":true},"thumbnailUrl":{"type":"string","nullable":true},"sortOrder":{"type":"integer"},"visible":{"type":"boolean"},"clickCount":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["about"]},"config":{"type":"object","nullable":true,"properties":{"alignment":{"type":"string","enum":["left","center","right"],"default":"left"},"imagePosition":{"type":"object","properties":{"x":{"type":"integer","minimum":0,"maximum":100},"y":{"type":"integer","minimum":0,"maximum":100}},"required":["x","y"]},"imageSide":{"type":"string","enum":["left","right"],"default":"left"},"imageUrl":{"type":"string","maxLength":2048},"layout":{"type":"object","properties":{"side":{"type":"string","enum":["left","right"]},"width":{"type":"string","enum":["full","half"],"default":"full"}}},"variant":{"type":"string","enum":["text","image","image_text"],"default":"text"}},"description":"Type-specific settings. Null when the stored value cannot be read for this type."}},"required":["id","title","description","url","thumbnailUrl","sortOrder","visible","clickCount","createdAt","updatedAt","type","config"]},{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"url":{"type":"string","nullable":true},"thumbnailUrl":{"type":"string","nullable":true},"sortOrder":{"type":"integer"},"visible":{"type":"boolean"},"clickCount":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["header"]},"config":{"type":"object","nullable":true,"properties":{"layout":{"type":"object","properties":{"side":{"type":"string","enum":["left","right"]},"width":{"type":"string","enum":["full","half"],"default":"full"}}}},"description":"Type-specific settings. Null when the stored value cannot be read for this type."}},"required":["id","title","description","url","thumbnailUrl","sortOrder","visible","clickCount","createdAt","updatedAt","type","config"]},{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"url":{"type":"string","nullable":true},"thumbnailUrl":{"type":"string","nullable":true},"sortOrder":{"type":"integer"},"visible":{"type":"boolean"},"clickCount":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["divider"]},"config":{"type":"object","nullable":true,"properties":{"layout":{"type":"object","properties":{"side":{"type":"string","enum":["left","right"]},"width":{"type":"string","enum":["full","half"],"default":"full"}}}},"description":"Type-specific settings. Null when the stored value cannot be read for this type."}},"required":["id","title","description","url","thumbnailUrl","sortOrder","visible","clickCount","createdAt","updatedAt","type","config"]},{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"url":{"type":"string","nullable":true},"thumbnailUrl":{"type":"string","nullable":true},"sortOrder":{"type":"integer"},"visible":{"type":"boolean"},"clickCount":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["text"]},"config":{"type":"object","nullable":true,"properties":{"layout":{"type":"object","properties":{"side":{"type":"string","enum":["left","right"]},"width":{"type":"string","enum":["full","half"],"default":"full"}}}},"description":"Type-specific settings. Null when the stored value cannot be read for this type."}},"required":["id","title","description","url","thumbnailUrl","sortOrder","visible","clickCount","createdAt","updatedAt","type","config"]},{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"url":{"type":"string","nullable":true},"thumbnailUrl":{"type":"string","nullable":true},"sortOrder":{"type":"integer"},"visible":{"type":"boolean"},"clickCount":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["image"]},"config":{"type":"object","nullable":true,"properties":{"alt":{"type":"string","maxLength":300},"href":{"type":"string","maxLength":2048},"imagePosition":{"type":"object","properties":{"x":{"type":"integer","minimum":0,"maximum":100},"y":{"type":"integer","minimum":0,"maximum":100}},"required":["x","y"]},"imageUrl":{"type":"string","maxLength":2048},"layout":{"type":"object","properties":{"side":{"type":"string","enum":["left","right"]},"width":{"type":"string","enum":["full","half"],"default":"full"}}},"schedule":{"type":"object","properties":{"endAt":{"type":"string","maxLength":64},"mode":{"type":"string","enum":["window"],"default":"window"},"startAt":{"type":"string","maxLength":64},"timezone":{"type":"string","maxLength":100}}}},"description":"Type-specific settings. Null when the stored value cannot be read for this type."}},"required":["id","title","description","url","thumbnailUrl","sortOrder","visible","clickCount","createdAt","updatedAt","type","config"]},{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"url":{"type":"string","nullable":true},"thumbnailUrl":{"type":"string","nullable":true},"sortOrder":{"type":"integer"},"visible":{"type":"boolean"},"clickCount":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["video_embed"]},"config":{"type":"object","nullable":true,"properties":{"embedUrl":{"type":"string","maxLength":2048},"layout":{"type":"object","properties":{"side":{"type":"string","enum":["left","right"]},"width":{"type":"string","enum":["full","half"],"default":"full"}}},"schedule":{"type":"object","properties":{"endAt":{"type":"string","maxLength":64},"mode":{"type":"string","enum":["window"],"default":"window"},"startAt":{"type":"string","maxLength":64},"timezone":{"type":"string","maxLength":100}}},"title":{"type":"string","maxLength":120},"variant":{"type":"string","enum":["embed","feature"],"default":"embed"}},"description":"Type-specific settings. Null when the stored value cannot be read for this type."}},"required":["id","title","description","url","thumbnailUrl","sortOrder","visible","clickCount","createdAt","updatedAt","type","config"]},{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"url":{"type":"string","nullable":true},"thumbnailUrl":{"type":"string","nullable":true},"sortOrder":{"type":"integer"},"visible":{"type":"boolean"},"clickCount":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["social_icons"]},"config":{"type":"object","nullable":true,"properties":{"alignment":{"type":"string","enum":["left","center","right"],"default":"left"},"heading":{"type":"string","maxLength":60},"items":{"type":"array","items":{"type":"object","properties":{"platform":{"type":"string","enum":["apple_podcasts","discord","email","facebook","github","instagram","linkedin","pinterest","snapchat","spotify","threads","tiktok","twitch","twitter","whatsapp","website","youtube"]},"title":{"type":"string","maxLength":60},"url":{"type":"string","maxLength":2048}},"required":["platform","url"]},"maxItems":12,"default":[]},"layout":{"type":"object","properties":{"side":{"type":"string","enum":["left","right"]},"width":{"type":"string","enum":["full","half"],"default":"full"}}}},"description":"Type-specific settings. Null when the stored value cannot be read for this type."}},"required":["id","title","description","url","thumbnailUrl","sortOrder","visible","clickCount","createdAt","updatedAt","type","config"]},{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"url":{"type":"string","nullable":true},"thumbnailUrl":{"type":"string","nullable":true},"sortOrder":{"type":"integer"},"visible":{"type":"boolean"},"clickCount":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["footer"]},"config":{"type":"object","nullable":true,"properties":{"alignment":{"type":"string","enum":["left","center","right"],"default":"center"},"attributionMode":{"type":"string","enum":["made_with_posty","get_posty","icon"],"default":"made_with_posty"},"layout":{"type":"object","properties":{"side":{"type":"string","enum":["left","right"]},"width":{"type":"string","enum":["full","half"],"default":"full"}}},"links":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","maxLength":80},"url":{"type":"string","maxLength":2048}},"required":["label","url"]},"maxItems":6,"default":[]}},"description":"Type-specific settings. Null when the stored value cannot be read for this type."}},"required":["id","title","description","url","thumbnailUrl","sortOrder","visible","clickCount","createdAt","updatedAt","type","config"]},{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"url":{"type":"string","nullable":true},"thumbnailUrl":{"type":"string","nullable":true},"sortOrder":{"type":"integer"},"visible":{"type":"boolean"},"clickCount":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["social_buttons"]},"config":{"type":"object","nullable":true,"properties":{"alignment":{"type":"string","enum":["left","center","right"],"default":"left"},"heading":{"type":"string","maxLength":60},"items":{"type":"array","items":{"type":"object","properties":{"platform":{"type":"string","enum":["apple_podcasts","discord","email","facebook","github","instagram","linkedin","pinterest","snapchat","spotify","threads","tiktok","twitch","twitter","whatsapp","website","youtube"]},"title":{"type":"string","maxLength":60},"url":{"type":"string","maxLength":2048}},"required":["platform","url"]},"maxItems":12,"default":[]},"layout":{"type":"object","properties":{"side":{"type":"string","enum":["left","right"]},"width":{"type":"string","enum":["full","half"],"default":"full"}}}},"description":"Type-specific settings. Null when the stored value cannot be read for this type."}},"required":["id","title","description","url","thumbnailUrl","sortOrder","visible","clickCount","createdAt","updatedAt","type","config"]},{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"url":{"type":"string","nullable":true},"thumbnailUrl":{"type":"string","nullable":true},"sortOrder":{"type":"integer"},"visible":{"type":"boolean"},"clickCount":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["social_link"]},"config":{"type":"object","nullable":true,"properties":{"layout":{"type":"object","properties":{"side":{"type":"string","enum":["left","right"]},"width":{"type":"string","enum":["full","half"],"default":"full"}}},"platform":{"type":"string","enum":["apple_podcasts","discord","email","facebook","github","instagram","linkedin","pinterest","snapchat","spotify","threads","tiktok","twitch","twitter","whatsapp","website","youtube"]}},"description":"Type-specific settings. Null when the stored value cannot be read for this type."}},"required":["id","title","description","url","thumbnailUrl","sortOrder","visible","clickCount","createdAt","updatedAt","type","config"]}]},"LinkBioAnalytics":{"type":"object","properties":{"rangeDays":{"type":"integer"},"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"},"totals":{"type":"object","properties":{"allTimeViews":{"type":"integer"},"views":{"type":"integer"},"uniqueViews":{"type":"integer"},"clicks":{"type":"integer"}},"required":["allTimeViews","views","uniqueViews","clicks"]},"viewsByDay":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"views":{"type":"integer"},"uniques":{"type":"integer"}},"required":["date","views","uniques"]}},"clicksByDay":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"clicks":{"type":"integer"}},"required":["date","clicks"]}},"links":{"type":"array","items":{"type":"object","properties":{"blockId":{"type":"string","nullable":true},"blockTitle":{"type":"string","nullable":true},"blockType":{"type":"string","nullable":true,"enum":["profile","about","social_buttons","link","header","divider","social_icons","social_link","text","image","video_embed","footer",null]},"targetUrl":{"type":"string","nullable":true},"clicks":{"type":"integer"}},"required":["blockId","blockTitle","blockType","targetUrl","clicks"]}},"referrers":{"type":"array","items":{"type":"object","properties":{"referrer":{"type":"string","nullable":true},"views":{"type":"integer"}},"required":["referrer","views"]}},"countries":{"type":"array","items":{"type":"object","properties":{"country":{"type":"string","nullable":true},"views":{"type":"integer"}},"required":["country","views"]}}},"required":["rangeDays","from","to","totals","viewsByDay","clicksByDay","links","referrers","countries"]},"LinkBioHandleAvailability":{"type":"object","properties":{"handle":{"type":"string"},"available":{"type":"boolean"},"reason":{"type":"string","nullable":true,"description":"Why the handle cannot be used, when it is not available."}},"required":["handle","available","reason"]},"ClaimLinkBioHandleRequest":{"type":"object","properties":{"handle":{"type":"string","minLength":3,"maxLength":64,"description":"Lowercase letters, numbers and hyphens, starting and ending with a letter or number."},"title":{"type":"string","minLength":1,"maxLength":100}},"required":["handle","title"]},"UpdateLinkBioPageRequest":{"type":"object","properties":{"handle":{"type":"string","minLength":3,"maxLength":64},"title":{"type":"string","minLength":1,"maxLength":100},"bio":{"type":"string","nullable":true,"maxLength":300},"avatarUrl":{"type":"string","nullable":true,"maxLength":2048},"theme":{"allOf":[{"$ref":"#/components/schemas/LinkBioTheme"},{"description":"Replaces the whole theme. Omitted theme fields reset to their defaults."}]},"seo":{"allOf":[{"$ref":"#/components/schemas/LinkBioSeo"},{"description":"Replaces the whole SEO object."}]}}},"LinkBioBlockResult":{"type":"object","properties":{"block":{"$ref":"#/components/schemas/LinkBioBlock"}},"required":["block"]},"AddLinkBioBlockRequest":{"oneOf":[{"type":"object","properties":{"title":{"type":"string","nullable":true,"maxLength":120},"description":{"type":"string","nullable":true,"maxLength":1000},"url":{"type":"string","nullable":true,"maxLength":2048,"description":"http, https, mailto, sms or tel link. A bare domain gets https://."},"thumbnailUrl":{"type":"string","nullable":true,"maxLength":2048},"visible":{"type":"boolean"},"insertIndex":{"type":"integer","minimum":0,"maximum":200,"description":"Zero-based draft position. Omit to append."},"type":{"type":"string","enum":["profile"]},"config":{"type":"object","properties":{"alignment":{"type":"string","enum":["left","center","right"],"default":"left"},"avatarPosition":{"type":"object","properties":{"x":{"type":"integer","minimum":0,"maximum":100},"y":{"type":"integer","minimum":0,"maximum":100}},"required":["x","y"]},"avatarSize":{"type":"integer","minimum":72,"maximum":180},"avatarUrl":{"type":"string"},"bio":{"type":"string","maxLength":300},"coverHeight":{"type":"integer","minimum":120,"maximum":260},"coverImageUrl":{"type":"string"},"coverPosition":{"type":"object","properties":{"x":{"type":"integer","minimum":0,"maximum":100},"y":{"type":"integer","minimum":0,"maximum":100}},"required":["x","y"]},"displayHandle":{"type":"string","maxLength":80},"displayName":{"type":"string","maxLength":100},"layout":{"type":"object","properties":{"side":{"type":"string","enum":["left","right"]},"width":{"type":"string","enum":["full","half"],"default":"full"}}},"variant":{"type":"string","enum":["avatar","avatar_text","cover","cover_avatar"],"default":"avatar_text"}}}},"required":["type"]},{"type":"object","properties":{"title":{"type":"string","nullable":true,"maxLength":120},"description":{"type":"string","nullable":true,"maxLength":1000},"url":{"type":"string","nullable":true,"maxLength":2048,"description":"http, https, mailto, sms or tel link. A bare domain gets https://."},"thumbnailUrl":{"type":"string","nullable":true,"maxLength":2048},"visible":{"type":"boolean"},"insertIndex":{"type":"integer","minimum":0,"maximum":200,"description":"Zero-based draft position. Omit to append."},"type":{"type":"string","enum":["link"]},"config":{"type":"object","properties":{"alignment":{"type":"string","enum":["left","center","right"],"default":"left"},"featured":{"type":"boolean","default":false},"layout":{"type":"object","properties":{"side":{"type":"string","enum":["left","right"]},"width":{"type":"string","enum":["full","half"],"default":"full"}}},"mode":{"type":"string","enum":["button","link"]},"schedule":{"type":"object","properties":{"endAt":{"type":"string","maxLength":64},"mode":{"type":"string","enum":["window"],"default":"window"},"startAt":{"type":"string","maxLength":64},"timezone":{"type":"string","maxLength":100}}},"showTitle":{"type":"boolean","default":true},"thumbnailPosition":{"type":"object","properties":{"x":{"type":"integer","minimum":0,"maximum":100},"y":{"type":"integer","minimum":0,"maximum":100}},"required":["x","y"]}}}},"required":["type"]},{"type":"object","properties":{"title":{"type":"string","nullable":true,"maxLength":120},"description":{"type":"string","nullable":true,"maxLength":1000},"url":{"type":"string","nullable":true,"maxLength":2048,"description":"http, https, mailto, sms or tel link. A bare domain gets https://."},"thumbnailUrl":{"type":"string","nullable":true,"maxLength":2048},"visible":{"type":"boolean"},"insertIndex":{"type":"integer","minimum":0,"maximum":200,"description":"Zero-based draft position. Omit to append."},"type":{"type":"string","enum":["about"]},"config":{"type":"object","properties":{"alignment":{"type":"string","enum":["left","center","right"],"default":"left"},"imagePosition":{"type":"object","properties":{"x":{"type":"integer","minimum":0,"maximum":100},"y":{"type":"integer","minimum":0,"maximum":100}},"required":["x","y"]},"imageSide":{"type":"string","enum":["left","right"],"default":"left"},"imageUrl":{"type":"string","maxLength":2048},"layout":{"type":"object","properties":{"side":{"type":"string","enum":["left","right"]},"width":{"type":"string","enum":["full","half"],"default":"full"}}},"variant":{"type":"string","enum":["text","image","image_text"],"default":"text"}}}},"required":["type"]},{"type":"object","properties":{"title":{"type":"string","nullable":true,"maxLength":120},"description":{"type":"string","nullable":true,"maxLength":1000},"url":{"type":"string","nullable":true,"maxLength":2048,"description":"http, https, mailto, sms or tel link. A bare domain gets https://."},"thumbnailUrl":{"type":"string","nullable":true,"maxLength":2048},"visible":{"type":"boolean"},"insertIndex":{"type":"integer","minimum":0,"maximum":200,"description":"Zero-based draft position. Omit to append."},"type":{"type":"string","enum":["header"]},"config":{"type":"object","properties":{"layout":{"type":"object","properties":{"side":{"type":"string","enum":["left","right"]},"width":{"type":"string","enum":["full","half"],"default":"full"}}}}}},"required":["type"]},{"type":"object","properties":{"title":{"type":"string","nullable":true,"maxLength":120},"description":{"type":"string","nullable":true,"maxLength":1000},"url":{"type":"string","nullable":true,"maxLength":2048,"description":"http, https, mailto, sms or tel link. A bare domain gets https://."},"thumbnailUrl":{"type":"string","nullable":true,"maxLength":2048},"visible":{"type":"boolean"},"insertIndex":{"type":"integer","minimum":0,"maximum":200,"description":"Zero-based draft position. Omit to append."},"type":{"type":"string","enum":["divider"]},"config":{"type":"object","properties":{"layout":{"type":"object","properties":{"side":{"type":"string","enum":["left","right"]},"width":{"type":"string","enum":["full","half"],"default":"full"}}}}}},"required":["type"]},{"type":"object","properties":{"title":{"type":"string","nullable":true,"maxLength":120},"description":{"type":"string","nullable":true,"maxLength":1000},"url":{"type":"string","nullable":true,"maxLength":2048,"description":"http, https, mailto, sms or tel link. A bare domain gets https://."},"thumbnailUrl":{"type":"string","nullable":true,"maxLength":2048},"visible":{"type":"boolean"},"insertIndex":{"type":"integer","minimum":0,"maximum":200,"description":"Zero-based draft position. Omit to append."},"type":{"type":"string","enum":["text"]},"config":{"type":"object","properties":{"layout":{"type":"object","properties":{"side":{"type":"string","enum":["left","right"]},"width":{"type":"string","enum":["full","half"],"default":"full"}}}}}},"required":["type"]},{"type":"object","properties":{"title":{"type":"string","nullable":true,"maxLength":120},"description":{"type":"string","nullable":true,"maxLength":1000},"url":{"type":"string","nullable":true,"maxLength":2048,"description":"http, https, mailto, sms or tel link. A bare domain gets https://."},"thumbnailUrl":{"type":"string","nullable":true,"maxLength":2048},"visible":{"type":"boolean"},"insertIndex":{"type":"integer","minimum":0,"maximum":200,"description":"Zero-based draft position. Omit to append."},"type":{"type":"string","enum":["image"]},"config":{"type":"object","properties":{"alt":{"type":"string","maxLength":300},"href":{"type":"string","maxLength":2048},"imagePosition":{"type":"object","properties":{"x":{"type":"integer","minimum":0,"maximum":100},"y":{"type":"integer","minimum":0,"maximum":100}},"required":["x","y"]},"imageUrl":{"type":"string","maxLength":2048},"layout":{"type":"object","properties":{"side":{"type":"string","enum":["left","right"]},"width":{"type":"string","enum":["full","half"],"default":"full"}}},"schedule":{"type":"object","properties":{"endAt":{"type":"string","maxLength":64},"mode":{"type":"string","enum":["window"],"default":"window"},"startAt":{"type":"string","maxLength":64},"timezone":{"type":"string","maxLength":100}}}}}},"required":["type"]},{"type":"object","properties":{"title":{"type":"string","nullable":true,"maxLength":120},"description":{"type":"string","nullable":true,"maxLength":1000},"url":{"type":"string","nullable":true,"maxLength":2048,"description":"http, https, mailto, sms or tel link. A bare domain gets https://."},"thumbnailUrl":{"type":"string","nullable":true,"maxLength":2048},"visible":{"type":"boolean"},"insertIndex":{"type":"integer","minimum":0,"maximum":200,"description":"Zero-based draft position. Omit to append."},"type":{"type":"string","enum":["video_embed"]},"config":{"type":"object","properties":{"embedUrl":{"type":"string","maxLength":2048},"layout":{"type":"object","properties":{"side":{"type":"string","enum":["left","right"]},"width":{"type":"string","enum":["full","half"],"default":"full"}}},"schedule":{"type":"object","properties":{"endAt":{"type":"string","maxLength":64},"mode":{"type":"string","enum":["window"],"default":"window"},"startAt":{"type":"string","maxLength":64},"timezone":{"type":"string","maxLength":100}}},"title":{"type":"string","maxLength":120},"variant":{"type":"string","enum":["embed","feature"],"default":"embed"}}}},"required":["type"]},{"type":"object","properties":{"title":{"type":"string","nullable":true,"maxLength":120},"description":{"type":"string","nullable":true,"maxLength":1000},"url":{"type":"string","nullable":true,"maxLength":2048,"description":"http, https, mailto, sms or tel link. A bare domain gets https://."},"thumbnailUrl":{"type":"string","nullable":true,"maxLength":2048},"visible":{"type":"boolean"},"insertIndex":{"type":"integer","minimum":0,"maximum":200,"description":"Zero-based draft position. Omit to append."},"type":{"type":"string","enum":["social_icons"]},"config":{"type":"object","properties":{"alignment":{"type":"string","enum":["left","center","right"],"default":"left"},"heading":{"type":"string","maxLength":60},"items":{"type":"array","items":{"type":"object","properties":{"platform":{"type":"string","enum":["apple_podcasts","discord","email","facebook","github","instagram","linkedin","pinterest","snapchat","spotify","threads","tiktok","twitch","twitter","whatsapp","website","youtube"]},"title":{"type":"string","maxLength":60},"url":{"type":"string","maxLength":2048}},"required":["platform","url"]},"maxItems":12,"default":[]},"layout":{"type":"object","properties":{"side":{"type":"string","enum":["left","right"]},"width":{"type":"string","enum":["full","half"],"default":"full"}}}}}},"required":["type"]},{"type":"object","properties":{"title":{"type":"string","nullable":true,"maxLength":120},"description":{"type":"string","nullable":true,"maxLength":1000},"url":{"type":"string","nullable":true,"maxLength":2048,"description":"http, https, mailto, sms or tel link. A bare domain gets https://."},"thumbnailUrl":{"type":"string","nullable":true,"maxLength":2048},"visible":{"type":"boolean"},"insertIndex":{"type":"integer","minimum":0,"maximum":200,"description":"Zero-based draft position. Omit to append."},"type":{"type":"string","enum":["footer"]},"config":{"type":"object","properties":{"alignment":{"type":"string","enum":["left","center","right"],"default":"center"},"attributionMode":{"type":"string","enum":["made_with_posty","get_posty","icon"],"default":"made_with_posty"},"layout":{"type":"object","properties":{"side":{"type":"string","enum":["left","right"]},"width":{"type":"string","enum":["full","half"],"default":"full"}}},"links":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","maxLength":80},"url":{"type":"string","maxLength":2048}},"required":["label","url"]},"maxItems":6,"default":[]}}}},"required":["type"]}]},"UpdateLinkBioBlockRequest":{"oneOf":[{"type":"object","properties":{"title":{"type":"string","nullable":true,"maxLength":120},"description":{"type":"string","nullable":true,"maxLength":1000},"url":{"type":"string","nullable":true,"maxLength":2048,"description":"http, https, mailto, sms or tel link. A bare domain gets https://."},"thumbnailUrl":{"type":"string","nullable":true,"maxLength":2048},"visible":{"type":"boolean"},"type":{"type":"string","enum":["profile"]},"config":{"type":"object","properties":{"alignment":{"type":"string","enum":["left","center","right"],"default":"left"},"avatarPosition":{"type":"object","properties":{"x":{"type":"integer","minimum":0,"maximum":100},"y":{"type":"integer","minimum":0,"maximum":100}},"required":["x","y"]},"avatarSize":{"type":"integer","minimum":72,"maximum":180},"avatarUrl":{"type":"string"},"bio":{"type":"string","maxLength":300},"coverHeight":{"type":"integer","minimum":120,"maximum":260},"coverImageUrl":{"type":"string"},"coverPosition":{"type":"object","properties":{"x":{"type":"integer","minimum":0,"maximum":100},"y":{"type":"integer","minimum":0,"maximum":100}},"required":["x","y"]},"displayHandle":{"type":"string","maxLength":80},"displayName":{"type":"string","maxLength":100},"layout":{"type":"object","properties":{"side":{"type":"string","enum":["left","right"]},"width":{"type":"string","enum":["full","half"],"default":"full"}}},"variant":{"type":"string","enum":["avatar","avatar_text","cover","cover_avatar"],"default":"avatar_text"}}}},"required":["type"]},{"type":"object","properties":{"title":{"type":"string","nullable":true,"maxLength":120},"description":{"type":"string","nullable":true,"maxLength":1000},"url":{"type":"string","nullable":true,"maxLength":2048,"description":"http, https, mailto, sms or tel link. A bare domain gets https://."},"thumbnailUrl":{"type":"string","nullable":true,"maxLength":2048},"visible":{"type":"boolean"},"type":{"type":"string","enum":["link"]},"config":{"type":"object","properties":{"alignment":{"type":"string","enum":["left","center","right"],"default":"left"},"featured":{"type":"boolean","default":false},"layout":{"type":"object","properties":{"side":{"type":"string","enum":["left","right"]},"width":{"type":"string","enum":["full","half"],"default":"full"}}},"mode":{"type":"string","enum":["button","link"]},"schedule":{"type":"object","properties":{"endAt":{"type":"string","maxLength":64},"mode":{"type":"string","enum":["window"],"default":"window"},"startAt":{"type":"string","maxLength":64},"timezone":{"type":"string","maxLength":100}}},"showTitle":{"type":"boolean","default":true},"thumbnailPosition":{"type":"object","properties":{"x":{"type":"integer","minimum":0,"maximum":100},"y":{"type":"integer","minimum":0,"maximum":100}},"required":["x","y"]}}}},"required":["type"]},{"type":"object","properties":{"title":{"type":"string","nullable":true,"maxLength":120},"description":{"type":"string","nullable":true,"maxLength":1000},"url":{"type":"string","nullable":true,"maxLength":2048,"description":"http, https, mailto, sms or tel link. A bare domain gets https://."},"thumbnailUrl":{"type":"string","nullable":true,"maxLength":2048},"visible":{"type":"boolean"},"type":{"type":"string","enum":["about"]},"config":{"type":"object","properties":{"alignment":{"type":"string","enum":["left","center","right"],"default":"left"},"imagePosition":{"type":"object","properties":{"x":{"type":"integer","minimum":0,"maximum":100},"y":{"type":"integer","minimum":0,"maximum":100}},"required":["x","y"]},"imageSide":{"type":"string","enum":["left","right"],"default":"left"},"imageUrl":{"type":"string","maxLength":2048},"layout":{"type":"object","properties":{"side":{"type":"string","enum":["left","right"]},"width":{"type":"string","enum":["full","half"],"default":"full"}}},"variant":{"type":"string","enum":["text","image","image_text"],"default":"text"}}}},"required":["type"]},{"type":"object","properties":{"title":{"type":"string","nullable":true,"maxLength":120},"description":{"type":"string","nullable":true,"maxLength":1000},"url":{"type":"string","nullable":true,"maxLength":2048,"description":"http, https, mailto, sms or tel link. A bare domain gets https://."},"thumbnailUrl":{"type":"string","nullable":true,"maxLength":2048},"visible":{"type":"boolean"},"type":{"type":"string","enum":["header"]},"config":{"type":"object","properties":{"layout":{"type":"object","properties":{"side":{"type":"string","enum":["left","right"]},"width":{"type":"string","enum":["full","half"],"default":"full"}}}}}},"required":["type"]},{"type":"object","properties":{"title":{"type":"string","nullable":true,"maxLength":120},"description":{"type":"string","nullable":true,"maxLength":1000},"url":{"type":"string","nullable":true,"maxLength":2048,"description":"http, https, mailto, sms or tel link. A bare domain gets https://."},"thumbnailUrl":{"type":"string","nullable":true,"maxLength":2048},"visible":{"type":"boolean"},"type":{"type":"string","enum":["divider"]},"config":{"type":"object","properties":{"layout":{"type":"object","properties":{"side":{"type":"string","enum":["left","right"]},"width":{"type":"string","enum":["full","half"],"default":"full"}}}}}},"required":["type"]},{"type":"object","properties":{"title":{"type":"string","nullable":true,"maxLength":120},"description":{"type":"string","nullable":true,"maxLength":1000},"url":{"type":"string","nullable":true,"maxLength":2048,"description":"http, https, mailto, sms or tel link. A bare domain gets https://."},"thumbnailUrl":{"type":"string","nullable":true,"maxLength":2048},"visible":{"type":"boolean"},"type":{"type":"string","enum":["text"]},"config":{"type":"object","properties":{"layout":{"type":"object","properties":{"side":{"type":"string","enum":["left","right"]},"width":{"type":"string","enum":["full","half"],"default":"full"}}}}}},"required":["type"]},{"type":"object","properties":{"title":{"type":"string","nullable":true,"maxLength":120},"description":{"type":"string","nullable":true,"maxLength":1000},"url":{"type":"string","nullable":true,"maxLength":2048,"description":"http, https, mailto, sms or tel link. A bare domain gets https://."},"thumbnailUrl":{"type":"string","nullable":true,"maxLength":2048},"visible":{"type":"boolean"},"type":{"type":"string","enum":["image"]},"config":{"type":"object","properties":{"alt":{"type":"string","maxLength":300},"href":{"type":"string","maxLength":2048},"imagePosition":{"type":"object","properties":{"x":{"type":"integer","minimum":0,"maximum":100},"y":{"type":"integer","minimum":0,"maximum":100}},"required":["x","y"]},"imageUrl":{"type":"string","maxLength":2048},"layout":{"type":"object","properties":{"side":{"type":"string","enum":["left","right"]},"width":{"type":"string","enum":["full","half"],"default":"full"}}},"schedule":{"type":"object","properties":{"endAt":{"type":"string","maxLength":64},"mode":{"type":"string","enum":["window"],"default":"window"},"startAt":{"type":"string","maxLength":64},"timezone":{"type":"string","maxLength":100}}}}}},"required":["type"]},{"type":"object","properties":{"title":{"type":"string","nullable":true,"maxLength":120},"description":{"type":"string","nullable":true,"maxLength":1000},"url":{"type":"string","nullable":true,"maxLength":2048,"description":"http, https, mailto, sms or tel link. A bare domain gets https://."},"thumbnailUrl":{"type":"string","nullable":true,"maxLength":2048},"visible":{"type":"boolean"},"type":{"type":"string","enum":["video_embed"]},"config":{"type":"object","properties":{"embedUrl":{"type":"string","maxLength":2048},"layout":{"type":"object","properties":{"side":{"type":"string","enum":["left","right"]},"width":{"type":"string","enum":["full","half"],"default":"full"}}},"schedule":{"type":"object","properties":{"endAt":{"type":"string","maxLength":64},"mode":{"type":"string","enum":["window"],"default":"window"},"startAt":{"type":"string","maxLength":64},"timezone":{"type":"string","maxLength":100}}},"title":{"type":"string","maxLength":120},"variant":{"type":"string","enum":["embed","feature"],"default":"embed"}}}},"required":["type"]},{"type":"object","properties":{"title":{"type":"string","nullable":true,"maxLength":120},"description":{"type":"string","nullable":true,"maxLength":1000},"url":{"type":"string","nullable":true,"maxLength":2048,"description":"http, https, mailto, sms or tel link. A bare domain gets https://."},"thumbnailUrl":{"type":"string","nullable":true,"maxLength":2048},"visible":{"type":"boolean"},"type":{"type":"string","enum":["social_icons"]},"config":{"type":"object","properties":{"alignment":{"type":"string","enum":["left","center","right"],"default":"left"},"heading":{"type":"string","maxLength":60},"items":{"type":"array","items":{"type":"object","properties":{"platform":{"type":"string","enum":["apple_podcasts","discord","email","facebook","github","instagram","linkedin","pinterest","snapchat","spotify","threads","tiktok","twitch","twitter","whatsapp","website","youtube"]},"title":{"type":"string","maxLength":60},"url":{"type":"string","maxLength":2048}},"required":["platform","url"]},"maxItems":12,"default":[]},"layout":{"type":"object","properties":{"side":{"type":"string","enum":["left","right"]},"width":{"type":"string","enum":["full","half"],"default":"full"}}}}}},"required":["type"]},{"type":"object","properties":{"title":{"type":"string","nullable":true,"maxLength":120},"description":{"type":"string","nullable":true,"maxLength":1000},"url":{"type":"string","nullable":true,"maxLength":2048,"description":"http, https, mailto, sms or tel link. A bare domain gets https://."},"thumbnailUrl":{"type":"string","nullable":true,"maxLength":2048},"visible":{"type":"boolean"},"type":{"type":"string","enum":["footer"]},"config":{"type":"object","properties":{"alignment":{"type":"string","enum":["left","center","right"],"default":"center"},"attributionMode":{"type":"string","enum":["made_with_posty","get_posty","icon"],"default":"made_with_posty"},"layout":{"type":"object","properties":{"side":{"type":"string","enum":["left","right"]},"width":{"type":"string","enum":["full","half"],"default":"full"}}},"links":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","maxLength":80},"url":{"type":"string","maxLength":2048}},"required":["label","url"]},"maxItems":6,"default":[]}}}},"required":["type"]}]},"LinkBioBlockOrder":{"type":"object","properties":{"blockIds":{"type":"array","items":{"type":"string"}}},"required":["blockIds"]},"ReorderLinkBioBlocksRequest":{"type":"object","properties":{"blockIds":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"maxItems":200,"description":"Every block id on the page, in the new order."}},"required":["blockIds"]},"InboxConversationList":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/InboxConversation"}},"has_more":{"type":"boolean"},"next_cursor":{"type":"string","nullable":true},"unreadTotal":{"type":"integer"},"windowDays":{"type":"integer"}},"required":["object","data","has_more","next_cursor","unreadTotal","windowDays"]},"InboxConversation":{"type":"object","properties":{"id":{"type":"string"},"channelId":{"type":"string"},"platform":{"type":"string","enum":["bluesky","discord","facebook","instagram","linkedin","pinterest","threads","tiktok","wordpress","youtube"]},"externalConversationId":{"type":"string"},"participant":{"type":"object","properties":{"id":{"type":"string","nullable":true},"name":{"type":"string","nullable":true},"username":{"type":"string","nullable":true},"avatarUrl":{"type":"string","nullable":true}},"required":["id","name","username","avatarUrl"]},"lastMessageText":{"type":"string","nullable":true},"lastMessageAt":{"type":"string","nullable":true,"format":"date-time"},"lastReadAt":{"type":"string","nullable":true,"format":"date-time"},"participantLastReadAt":{"type":"string","nullable":true,"format":"date-time"},"participantLastDeliveredAt":{"type":"string","nullable":true,"format":"date-time"},"unreadCount":{"type":"integer"},"status":{"type":"string","enum":["open","archived","spam"]},"standby":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"channel":{"type":"object","properties":{"name":{"type":"string"},"platform":{"type":"string","enum":["bluesky","discord","facebook","instagram","linkedin","pinterest","threads","tiktok","wordpress","youtube"]},"avatarUrl":{"type":"string","nullable":true}},"required":["name","platform","avatarUrl"]}},"required":["id","channelId","platform","externalConversationId","participant","lastMessageText","lastMessageAt","lastReadAt","participantLastReadAt","participantLastDeliveredAt","unreadCount","status","standby","createdAt","updatedAt","channel"]},"InboxMessageList":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/InboxMessage"}},"has_more":{"type":"boolean"},"next_cursor":{"type":"string","nullable":true},"conversation":{"$ref":"#/components/schemas/InboxConversation"}},"required":["object","data","has_more","next_cursor","conversation"]},"InboxMessage":{"type":"object","properties":{"id":{"type":"string"},"conversationId":{"type":"string"},"externalMessageId":{"type":"string","nullable":true},"fromParticipant":{"type":"boolean"},"senderName":{"type":"string","nullable":true},"messageText":{"type":"string","nullable":true},"attachmentType":{"type":"string","nullable":true},"attachmentUrl":{"type":"string","nullable":true},"content":{"type":"object","properties":{"unsupported":{"type":"boolean"},"sender":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"username":{"type":"string"},"email":{"type":"string"}}},"recipients":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"username":{"type":"string"},"email":{"type":"string"}}}},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"},"previewUrl":{"type":"string"},"width":{"type":"number"},"height":{"type":"number"},"duration":{"type":"number"},"template":{"type":"object","properties":{"title":{"type":"string"},"subtitle":{"type":"string"},"imageUrl":{"type":"string"},"buttons":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"type":{"type":"string"},"url":{"type":"string"},"payload":{"type":"string"}}}}}}},"required":["kind"]}},"shares":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"type":{"type":"string"},"url":{"type":"string"},"template":{"anyOf":[{"type":"string"},{"type":"object","properties":{"title":{"type":"string"},"subtitle":{"type":"string"},"imageUrl":{"type":"string"},"buttons":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"type":{"type":"string"},"url":{"type":"string"},"payload":{"type":"string"}}}}}}]}}}},"story":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"}}},"reactionsObservedAt":{"type":"string","format":"date-time"},"reactions":{"type":"array","items":{"type":"object","properties":{"emoji":{"type":"string"},"users":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"username":{"type":"string"},"email":{"type":"string"}}}}},"required":["emoji","users"]}},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}}}},"reaction":{"type":"string","nullable":true},"editedAt":{"type":"string","nullable":true,"format":"date-time"},"sentAt":{"type":"string","format":"date-time"}},"required":["id","conversationId","externalMessageId","fromParticipant","senderName","messageText","attachmentType","attachmentUrl","content","reaction","editedAt","sentAt"]},"InboxConversationState":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["open","archived","spam"]},"unreadCount":{"type":"integer"},"lastReadAt":{"type":"string","nullable":true,"format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","status","unreadCount","lastReadAt","updatedAt"]},"UpdateInboxConversationRequest":{"type":"object","properties":{"status":{"type":"string","enum":["open","archived","spam"]}},"required":["status"]},"InboxPostThreadList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/InboxPostThread"}},"windowDays":{"type":"integer"}},"required":["data","windowDays"]},"InboxPostThread":{"type":"object","properties":{"id":{"type":"string"},"postId":{"type":"string"},"channelId":{"type":"string"},"platform":{"type":"string","enum":["bluesky","discord","facebook","instagram","linkedin","pinterest","threads","tiktok","wordpress","youtube"]},"externalPostId":{"type":"string"},"permalink":{"type":"string","nullable":true},"postTitle":{"type":"string"},"postBody":{"type":"string","nullable":true},"mediaUrl":{"type":"string","nullable":true},"publishedAt":{"type":"string","nullable":true,"format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"channel":{"type":"object","properties":{"name":{"type":"string"},"platform":{"type":"string","enum":["bluesky","discord","facebook","instagram","linkedin","pinterest","threads","tiktok","wordpress","youtube"]},"avatarUrl":{"type":"string","nullable":true}},"required":["name","platform","avatarUrl"]}},"required":["id","postId","channelId","platform","externalPostId","permalink","postTitle","postBody","mediaUrl","publishedAt","updatedAt","channel"]},"InboxPostCommentThread":{"type":"object","properties":{"thread":{"$ref":"#/components/schemas/InboxPostThread"},"comments":{"type":"array","items":{"$ref":"#/components/schemas/InboxPostComment"}},"commentStatus":{"$ref":"#/components/schemas/InboxCommentStatus"}},"required":["thread","comments","commentStatus"]},"InboxPostComment":{"type":"object","properties":{"id":{"type":"string"},"parentCommentId":{"type":"string","nullable":true},"authorId":{"type":"string","nullable":true},"authorName":{"type":"string","nullable":true},"authorUsername":{"type":"string","nullable":true},"authorAvatarUrl":{"type":"string","nullable":true},"isFromConnectedAccount":{"type":"boolean"},"likeCount":{"type":"integer","nullable":true},"messageText":{"type":"string","nullable":true},"createdAt":{"type":"string","nullable":true,"format":"date-time"}},"required":["id","parentCommentId","authorId","authorName","authorUsername","authorAvatarUrl","isFromConnectedAccount","likeCount","messageText","createdAt"]},"InboxCommentStatus":{"type":"object","properties":{"type":{"type":"string","enum":["available","not_mirrored"]},"message":{"type":"string","nullable":true}},"required":["type","message"]},"TodaySnapshot":{"type":"object","properties":{"workspaceId":{"type":"string"},"asOf":{"type":"string","format":"date-time"},"projectionRevision":{"type":"integer"},"summary":{"type":"object","properties":{"blockers":{"type":"integer"},"decisions":{"type":"integer"},"actions":{"type":"integer"},"updates":{"type":"integer"},"insights":{"type":"integer"}},"required":["blockers","decisions","actions","updates","insights"]},"sections":{"type":"object","properties":{"urgent":{"type":"array","items":{"$ref":"#/components/schemas/TodayItem"}},"next":{"type":"array","items":{"$ref":"#/components/schemas/TodayItem"}},"progress":{"type":"array","items":{"$ref":"#/components/schemas/TodayItem"}},"insights":{"type":"array","items":{"$ref":"#/components/schemas/TodayItem"}}},"required":["urgent","next","progress","insights"]},"sinceYesterday":{"type":"object","properties":{"count":{"type":"integer"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["blocker","decision","action","update","insight","celebration"]},"presentation":{"$ref":"#/components/schemas/TodayPresentation"},"resolvedAt":{"type":"string","format":"date-time"}},"required":["id","kind","presentation","resolvedAt"]}}},"required":["count","items"]}},"required":["workspaceId","asOf","projectionRevision","summary","sections","sinceYesterday"]},"TodayItem":{"type":"object","properties":{"id":{"type":"string"},"recipeKey":{"type":"string"},"targetKind":{"type":"string","enum":["user","workspace_permission","org_permission"]},"kind":{"type":"string","enum":["blocker","decision","action","update","insight","celebration"]},"severity":{"type":"string","enum":["critical","high","normal","low"]},"priorityBucket":{"type":"integer"},"presentationKind":{"type":"string","enum":["setup_action","task","decision","risk","progress_update","celebration","metric_insight","workspace_group"]},"presentation":{"$ref":"#/components/schemas/TodayPresentation"},"channels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"avatarUrl":{"type":"string","nullable":true},"platform":{"type":"string","enum":["bluesky","discord","facebook","instagram","linkedin","pinterest","threads","tiktok","wordpress","youtube"]}},"required":["id","name","avatarUrl","platform"]}},"occurredAt":{"type":"string","format":"date-time"},"dueAt":{"type":"string","nullable":true,"format":"date-time"},"canDismiss":{"type":"boolean"}},"required":["id","recipeKey","targetKind","kind","severity","priorityBucket","presentationKind","presentation","channels","occurredAt","dueAt","canDismiss"]},"TodayPresentation":{"type":"object","properties":{"eyebrow":{"type":"string"},"title":{"type":"string"},"summary":{"type":"string"},"detail":{"type":"string"},"primaryAction":{"$ref":"#/components/schemas/TodayAction"}},"required":["title"]},"TodayAction":{"type":"object","properties":{"type":{"type":"string","enum":["navigate"]},"label":{"type":"string"},"action":{"type":"string"},"params":{"type":"object","additionalProperties":{"type":"string"}}},"required":["type","label","action"]},"TodayItemActionResult":{"type":"object","properties":{"itemId":{"type":"string"},"status":{"type":"string","enum":["open","resolved","dismissed","expired"]},"projectionRevision":{"type":"integer"}},"required":["itemId","status","projectionRevision"]},"TodaySettings":{"type":"object","properties":{"workspaceId":{"type":"string"},"workspaceSettingsRevision":{"type":"integer"},"recipes":{"type":"array","items":{"$ref":"#/components/schemas/TodayRecipeSettings"}}},"required":["workspaceId","workspaceSettingsRevision","recipes"]},"TodayRecipeSettings":{"type":"object","properties":{"recipeKey":{"type":"string"},"recipeVersion":{"type":"integer"},"settingsSchemaVersion":{"type":"integer"},"definitions":{"type":"object","additionalProperties":{"type":"object","properties":{"configurableAt":{"type":"array","items":{"type":"string","enum":["organization","workspace"]}},"defaultValue":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]},"description":{"type":"string","nullable":true},"kind":{"type":"string","enum":["boolean","duration","number","percentage"]},"label":{"type":"string"},"maximum":{"type":"number","nullable":true},"minimum":{"type":"number","nullable":true},"unit":{"type":"string","nullable":true,"enum":["days","hours","percent",null]}},"required":["configurableAt","defaultValue","description","kind","label","maximum","minimum","unit"]}},"effective":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"sources":{"type":"object","additionalProperties":{"type":"string","enum":["code","operating_model","organization","workspace"]}},"workspaceOverride":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"overrideRevision":{"type":"integer","nullable":true}},"required":["recipeKey","recipeVersion","settingsSchemaVersion","definitions","effective","sources","workspaceOverride","overrideRevision"]},"TodaySettingsUpdateResult":{"type":"object","properties":{"changed":{"type":"boolean"},"recipeKey":{"type":"string"},"overrideRevision":{"type":"integer","nullable":true},"workspaceSettingsRevision":{"type":"integer"},"projectionRevision":{"type":"integer","nullable":true}},"required":["changed","recipeKey","overrideRevision","workspaceSettingsRevision","projectionRevision"]},"UpdateTodaySettings":{"type":"object","properties":{"configuration":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"expectedRevision":{"type":"integer","nullable":true,"minimum":0,"exclusiveMinimum":true}},"required":["configuration","expectedRevision"]},"MemberList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WorkspaceMember"}}},"required":["data"]},"WorkspaceMember":{"type":"object","properties":{"id":{"type":"string"},"userId":{"type":"string"},"role":{"type":"string","enum":["admin","approver","contributor","viewer"]},"visibility":{"type":"string","enum":["team","client"]},"isOwner":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"name":{"type":"string"},"email":{"type":"string"},"image":{"type":"string","nullable":true}},"required":["id","userId","role","visibility","isOwner","createdAt","name","email","image"]},"WorkspaceMembership":{"type":"object","properties":{"id":{"type":"string"},"userId":{"type":"string"},"role":{"type":"string","enum":["admin","approver","contributor","viewer"]},"visibility":{"type":"string","enum":["team","client"]},"isOwner":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","userId","role","visibility","isOwner","createdAt"]},"UpdateWorkspaceMember":{"type":"object","properties":{"role":{"type":"string","enum":["admin","approver","contributor","viewer"]}},"required":["role"]},"InvitationList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WorkspaceInvitation"}}},"required":["data"]},"WorkspaceInvitation":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"role":{"type":"string","description":"One of admin, contributor, approver or viewer."},"visibility":{"type":"string","enum":["team","client"]},"inviterName":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"}},"required":["id","email","role","visibility","inviterName","createdAt","expiresAt"]},"WorkspaceDetail":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"logoUrl":{"type":"string","nullable":true},"approvalMode":{"type":"string","enum":["none","optional","required","multi_level"]},"lockDuringReview":{"type":"boolean"},"campaignsEnabled":{"type":"boolean"},"settings":{"type":"object","properties":{"autoScheduleOnApproval":{"type":"boolean"},"timezone":{"type":"string","nullable":true},"postingPreferences":{"type":"object","properties":{"defaultPostingTimes":{"type":"object","properties":{"morning":{"type":"string","pattern":"^(?:[01]\\d|2[0-3]):[0-5]\\d$"},"midday":{"type":"string","pattern":"^(?:[01]\\d|2[0-3]):[0-5]\\d$"},"laterAfternoon":{"type":"string","pattern":"^(?:[01]\\d|2[0-3]):[0-5]\\d$"},"other":{"type":"string","pattern":"^(?:[01]\\d|2[0-3]):[0-5]\\d$"}},"required":["morning","midday","laterAfternoon","other"]},"showDefaultPostingTimes":{"type":"boolean"},"timeWiggleEnabled":{"type":"boolean"}},"required":["defaultPostingTimes","showDefaultPostingTimes","timeWiggleEnabled"]}},"required":["autoScheduleOnApproval","timezone","postingPreferences"]},"allowedApprovalModes":{"type":"array","items":{"type":"string","enum":["none","optional","required","multi_level"]}},"permissions":{"type":"array","items":{"type":"string"}}},"required":["id","name","logoUrl","approvalMode","lockDuringReview","campaignsEnabled","settings","allowedApprovalModes","permissions"]},"Workspace":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"logoUrl":{"type":"string","nullable":true},"approvalMode":{"type":"string","enum":["none","optional","required","multi_level"]},"lockDuringReview":{"type":"boolean"},"campaignsEnabled":{"type":"boolean"},"settings":{"type":"object","properties":{"autoScheduleOnApproval":{"type":"boolean"},"timezone":{"type":"string","nullable":true},"postingPreferences":{"type":"object","properties":{"defaultPostingTimes":{"type":"object","properties":{"morning":{"type":"string","pattern":"^(?:[01]\\d|2[0-3]):[0-5]\\d$"},"midday":{"type":"string","pattern":"^(?:[01]\\d|2[0-3]):[0-5]\\d$"},"laterAfternoon":{"type":"string","pattern":"^(?:[01]\\d|2[0-3]):[0-5]\\d$"},"other":{"type":"string","pattern":"^(?:[01]\\d|2[0-3]):[0-5]\\d$"}},"required":["morning","midday","laterAfternoon","other"]},"showDefaultPostingTimes":{"type":"boolean"},"timeWiggleEnabled":{"type":"boolean"}},"required":["defaultPostingTimes","showDefaultPostingTimes","timeWiggleEnabled"]}},"required":["autoScheduleOnApproval","timezone","postingPreferences"]}},"required":["id","name","logoUrl","approvalMode","lockDuringReview","campaignsEnabled","settings"]},"UpdateWorkspaceSettings":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":30},"approvalMode":{"type":"string","enum":["none","optional","required","multi_level"]},"lockDuringReview":{"type":"boolean"},"campaignsEnabled":{"type":"boolean"},"settings":{"type":"object","properties":{"autoScheduleOnApproval":{"type":"boolean"},"timezone":{"type":"string","minLength":1,"maxLength":100},"postingPreferences":{"type":"object","properties":{"defaultPostingTimes":{"type":"object","properties":{"morning":{"type":"string","pattern":"^(?:[01]\\d|2[0-3]):[0-5]\\d$"},"midday":{"type":"string","pattern":"^(?:[01]\\d|2[0-3]):[0-5]\\d$"},"laterAfternoon":{"type":"string","pattern":"^(?:[01]\\d|2[0-3]):[0-5]\\d$"},"other":{"type":"string","pattern":"^(?:[01]\\d|2[0-3]):[0-5]\\d$"}}},"showDefaultPostingTimes":{"type":"boolean"},"timeWiggleEnabled":{"type":"boolean"}}}}}}},"NotificationPreferences":{"type":"object","properties":{"profile":{"$ref":"#/components/schemas/NotificationProfile"},"categories":{"type":"array","items":{"type":"object","properties":{"category":{"type":"string","enum":["assigned_work","approvals_and_feedback","publishing_and_channels","planning_reminders","progress_updates","insights_and_celebrations"]},"defaults":{"type":"object","properties":{"inAppEnabled":{"type":"boolean"},"emailFrequency":{"type":"string","enum":["off","immediate","daily_digest","weekly_digest"]}},"required":["inAppEnabled","emailFrequency"]},"override":{"type":"object","nullable":true,"properties":{"inAppEnabled":{"type":"boolean"},"emailFrequency":{"type":"string","enum":["off","immediate","daily_digest","weekly_digest"]},"category":{"type":"string","enum":["assigned_work","approvals_and_feedback","publishing_and_channels","planning_reminders","progress_updates","insights_and_celebrations"]},"workspaceId":{"type":"string","nullable":true},"revision":{"type":"integer"}},"required":["inAppEnabled","emailFrequency","category","workspaceId","revision"]}},"required":["category","defaults","override"]}},"workspaceOverrides":{"type":"array","items":{"$ref":"#/components/schemas/NotificationPreference"}}},"required":["profile","categories","workspaceOverrides"]},"NotificationProfile":{"type":"object","properties":{"emailEnabled":{"type":"boolean"},"timezone":{"type":"string"},"dailyDigestLocalTime":{"type":"string"},"weeklyDigestDay":{"type":"integer"},"quietHoursStart":{"type":"string","nullable":true},"quietHoursEnd":{"type":"string","nullable":true},"quietHoursBehavior":{"type":"string","enum":["defer","next_digest"]},"pausedUntil":{"type":"string","nullable":true,"format":"date-time"},"revision":{"type":"integer"}},"required":["emailEnabled","timezone","dailyDigestLocalTime","weeklyDigestDay","quietHoursStart","quietHoursEnd","quietHoursBehavior","pausedUntil","revision"]},"NotificationPreference":{"type":"object","properties":{"inAppEnabled":{"type":"boolean"},"emailFrequency":{"type":"string","enum":["off","immediate","daily_digest","weekly_digest"]},"category":{"type":"string","enum":["assigned_work","approvals_and_feedback","publishing_and_channels","planning_reminders","progress_updates","insights_and_celebrations"]},"workspaceId":{"type":"string","nullable":true},"revision":{"type":"integer"}},"required":["inAppEnabled","emailFrequency","category","workspaceId","revision"]},"UpdateNotificationPreference":{"type":"object","properties":{"inAppEnabled":{"type":"boolean"},"emailFrequency":{"type":"string","enum":["off","immediate","daily_digest","weekly_digest"]},"scope":{"type":"string","enum":["account","workspace"]},"expectedRevision":{"type":"integer","nullable":true,"minimum":0,"exclusiveMinimum":true}},"required":["inAppEnabled","emailFrequency","scope","expectedRevision"]},"UpdateNotificationProfile":{"type":"object","properties":{"emailEnabled":{"type":"boolean"},"timezone":{"type":"string","minLength":1,"maxLength":100},"dailyDigestLocalTime":{"type":"string","pattern":"^(?:[01]\\d|2[0-3]):[0-5]\\d$"},"weeklyDigestDay":{"type":"integer","minimum":0,"maximum":6},"quietHoursStart":{"type":"string","nullable":true,"pattern":"^(?:[01]\\d|2[0-3]):[0-5]\\d$"},"quietHoursEnd":{"type":"string","nullable":true,"pattern":"^(?:[01]\\d|2[0-3]):[0-5]\\d$"},"quietHoursBehavior":{"type":"string","enum":["defer","next_digest"]},"pausedUntil":{"type":"string","nullable":true,"format":"date-time"},"expectedRevision":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["emailEnabled","timezone","dailyDigestLocalTime","weeklyDigestDay","quietHoursStart","quietHoursEnd","quietHoursBehavior","pausedUntil","expectedRevision"]},"WorkspaceNotificationMute":{"type":"object","properties":{"muted":{"type":"boolean"},"changed":{"type":"integer"}},"required":["muted","changed"]},"SetWorkspaceNotificationMute":{"type":"object","properties":{"muted":{"type":"boolean"}},"required":["muted"]}},"parameters":{}},"paths":{"/v1/workspaces":{"get":{"description":"List accessible Posty workspaces and current permissions for the authenticated caller. Returns workspace IDs to use in subsequent tools. This read-only operation needs no workspace selection.","operationId":"list_workspaces","tags":["Workspaces"],"security":[{"ApiKey":[]},{"OAuth":[]}],"responses":{"200":{"description":"Accessible workspaces. OAuth includes current permissions. A key pinned to one workspace returns just that one; a key scoped to its organization returns every workspace in it.","content":{"application/json":{"schema":{"type":"object","properties":{"workspaces":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"permissions":{"type":"array","items":{"type":"string"}}},"required":["id","permissions"]}}},"required":["workspaces"]}}}}}}},"/v1/channels":{"get":{"operationId":"list_channels","description":"List connected social channels in the selected workspace with optional provider and status filters and cursor pagination. Returns stored account details and channel IDs for composing posts, without contacting social platforms.","tags":["Channels"],"security":[{"ApiKey":[]},{"OAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":false,"name":"workspaceId","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"starting_after","in":"query"},{"schema":{"type":"string"},"required":false,"name":"ending_before","in":"query"},{"schema":{"type":"string","enum":["bluesky","discord","facebook","instagram","linkedin","pinterest","threads","tiktok","wordpress","youtube"]},"required":false,"name":"provider","in":"query"},{"schema":{"type":"string","enum":["pending","active","error","disconnected"]},"required":false,"name":"status","in":"query"}],"responses":{"200":{"description":"List of channels","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChannelList"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/channels/{id}":{"get":{"operationId":"get_channel","description":"Retrieve a connected social channel by ID in the selected workspace. Returns stored account, provider and connection-status details without credentials or a live request to the social platform.","tags":["Channels"],"security":[{"ApiKey":[]},{"OAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Channel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Channel"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/posts/{postId}/comments":{"get":{"operationId":"list_post_comments","description":"List visible collaboration comments on a Posty post using its post ID and optional cursor pagination. Returns Posty review discussions, filtered by caller visibility, rather than comments on a published social-platform post.","tags":["Comments"],"security":[{"ApiKey":[]},{"OAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"postId","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"starting_after","in":"query"},{"schema":{"type":"string"},"required":false,"name":"ending_before","in":"query"}],"responses":{"200":{"description":"List of comments","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommentList"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Post not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"create_post_comment","description":"Add a collaboration comment to a Posty post using its post ID and a comment body. Returns the created comment, attributed to the authenticated caller and shared with team members or clients according to post visibility. Mentions can generate notifications. The optional isChangeRequest flag labels feedback without changing post status. This does not publish a comment to a social platform.","tags":["Comments"],"security":[{"ApiKey":[]},{"OAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"postId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCommentRequest"}}}},"responses":{"201":{"description":"Comment created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Comment"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Post not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/posts/{postId}/comments/{id}":{"delete":{"operationId":"delete_post_comment","description":"Permanently delete a collaboration comment using its post and comment IDs in the selected workspace. Requires comment ownership or deletion permission. Removes the comment from the shared Posty discussion and returns a deletion confirmation.","tags":["Comments"],"security":[{"ApiKey":[]},{"OAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"postId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Deleted"},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/media":{"get":{"operationId":"list_media","description":"List media assets in the selected workspace with optional status and content-type filters and cursor pagination. Returns media IDs, metadata and temporary signed download URLs. Use ready media IDs when attaching assets to posts.","tags":["Media"],"security":[{"ApiKey":[]},{"OAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":false,"name":"workspaceId","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"starting_after","in":"query"},{"schema":{"type":"string"},"required":false,"name":"ending_before","in":"query"},{"schema":{"type":"string","enum":["pending","processing","ready","failed","deduped"]},"required":false,"name":"status","in":"query"},{"schema":{"type":"string","enum":["image/jpeg","image/png","image/webp","image/gif","video/mp4","video/quicktime"]},"required":false,"name":"contentType","in":"query"}],"responses":{"200":{"description":"List of media","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaList"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"create_media_upload","description":"Start a media upload by providing a title, supported contentType and sizeBytes in the selected workspace. Creates a pending media record and returns its ID, temporary uploadUrl and expiry. Transfer file bytes separately with HTTP PUT to uploadUrl, then call complete_media_upload. This call alone does not transfer the file.","tags":["Media"],"security":[{"ApiKey":[]},{"OAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateMediaRequest"}}}},"responses":{"201":{"description":"Upload URL issued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateMediaResponse"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Storage limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/media/{id}":{"get":{"operationId":"get_media","description":"Retrieve a media asset by ID in the selected workspace. Returns its upload or processing status, file metadata and temporary signed download URLs for the asset and any thumbnail.","tags":["Media"],"security":[{"ApiKey":[]},{"OAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Media","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Media"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"delete_media","description":"Remove a media asset from the selected workspace library by ID. Hides it from library listings while preserving stored files and existing post attachments. Returns a deletion confirmation.","tags":["Media"],"security":[{"ApiKey":[]},{"OAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Deleted"},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/media/{id}/complete":{"post":{"operationId":"complete_media_upload","description":"Finalize a media upload after transferring its file bytes to the signed upload URL. Provide the media ID and optional dimensions or duration. Checks the uploaded object and storage quota, then returns finalized media metadata. Missing uploads or exceeded quotas produce errors.","tags":["Media"],"security":[{"ApiKey":[]},{"OAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompleteMediaRequest"}}}},"responses":{"200":{"description":"Media finalized (or already finalized)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Media"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/media-folders":{"get":{"operationId":"list_media_folders","tags":["Media"],"security":[{"ApiKey":[]},{"OAuth":[]}],"description":"List every media library folder in the workspace as a flat tree (parentId null is top level), with file counts. Needs media:view.","responses":{"200":{"description":"Folders","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaFolderList"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Media or folder not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Name taken, cycle, or uploads still in progress","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"create_media_folder","tags":["Media"],"security":[{"ApiKey":[]},{"OAuth":[]}],"description":"Create a media library folder, at the top level or inside parentId. Sibling names must be unique. Needs media:upload.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateMediaFolderRequest"}}}},"responses":{"201":{"description":"Folder created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaFolder"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Media or folder not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Name taken, cycle, or uploads still in progress","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/media-folders/{id}":{"patch":{"operationId":"rename_media_folder","tags":["Media"],"security":[{"ApiKey":[]},{"OAuth":[]}],"description":"Rename a media library folder. The new name must be unique among its siblings. Needs media:upload.","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenameMediaFolderRequest"}}}},"responses":{"200":{"description":"Folder renamed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaFolder"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Media or folder not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Name taken, cycle, or uploads still in progress","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"delete_media_folder","tags":["Media"],"security":[{"ApiKey":[]},{"OAuth":[]}],"description":"Delete a folder, its subfolders, and remove every file inside them from the library. Files already attached to posts stay on those posts. Needs media:delete.","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Folder deleted"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Media or folder not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Name taken, cycle, or uploads still in progress","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/media-folders/{id}/move":{"post":{"operationId":"move_media_folder","tags":["Media"],"security":[{"ApiKey":[]},{"OAuth":[]}],"x-mcp":{"idempotent":true},"description":"Move a folder, with everything in it, under parentId or to the top level with null. A folder cannot move into itself or its descendants. Needs media:upload.","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MoveMediaFolderRequest"}}}},"responses":{"200":{"description":"Folder moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaFolder"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Media or folder not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Name taken, cycle, or uploads still in progress","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/media-folder-colors":{"put":{"operationId":"set_media_folder_color","tags":["Media"],"security":[{"ApiKey":[]},{"OAuth":[]}],"description":"Tag up to 200 folders with one colour, or clear it with null. All or nothing: an unknown folder id fails the whole change. Needs media:upload.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetMediaFolderColorRequest"}}}},"responses":{"200":{"description":"Folders updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaFolderColorResult"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Media or folder not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Name taken, cycle, or uploads still in progress","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/media-moves":{"post":{"operationId":"move_media_items","tags":["Media"],"security":[{"ApiKey":[]},{"OAuth":[]}],"x-mcp":{"idempotent":true},"description":"Move up to 200 library files into folderId, or to the top level with null. All or nothing: an unknown media id fails the whole move. Needs media:upload.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MoveMediaItemsRequest"}}}},"responses":{"200":{"description":"Files moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MoveMediaItemsResult"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Media or folder not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Name taken, cycle, or uploads still in progress","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/media/{id}/title":{"put":{"operationId":"rename_media","tags":["Media"],"security":[{"ApiKey":[]},{"OAuth":[]}],"description":"Rename a library file (its display title, up to 500 characters). Needs media:upload.","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenameMediaRequest"}}}},"responses":{"200":{"description":"Renamed file","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Media"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Media or folder not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Name taken, cycle, or uploads still in progress","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/media/{id}/alt-text":{"put":{"operationId":"set_media_alt_text","tags":["Media"],"security":[{"ApiKey":[]},{"OAuth":[]}],"description":"Set the accessibility description published with this file on platforms that support alt text, or clear it with null or an empty string. Up to 1000 characters. Needs media:upload.","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetMediaAltTextRequest"}}}},"responses":{"200":{"description":"File with its alt text","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Media"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Media or folder not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Name taken, cycle, or uploads still in progress","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/media/{id}/usage":{"get":{"operationId":"get_media_usage","tags":["Media"],"security":[{"ApiKey":[]},{"OAuth":[]}],"description":"List the posts and channels a library file is attached to, limited to posts the caller can see. Needs media:view.","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Where the file is used","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaUsage"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Media or folder not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Name taken, cycle, or uploads still in progress","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/media-storage":{"get":{"operationId":"get_storage_usage","tags":["Media"],"security":[{"ApiKey":[]},{"OAuth":[]}],"description":"Bytes the media library uses against the workspace plan's storage limit, and how many remain. limitBytes and remainingBytes are null on an unlimited plan. Needs media:view.","responses":{"200":{"description":"Storage usage","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorageUsage"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Media or folder not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Name taken, cycle, or uploads still in progress","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/posts":{"get":{"operationId":"list_posts","description":"List visible Posty posts in the selected workspace with optional status, channel, creation-date and scheduled-date filters and cursor pagination. Returns post summaries, statuses, schedules and platform names. Use get_post for expanded channel content, media attachments and delivery details.","tags":["Posts"],"security":[{"ApiKey":[]},{"OAuth":[]}],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"starting_after","in":"query"},{"schema":{"type":"string"},"required":false,"name":"ending_before","in":"query"},{"schema":{"type":"string"},"required":false,"name":"status","in":"query"},{"schema":{"type":"string"},"required":false,"name":"channelId","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"scheduledAt_gte","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"scheduledAt_lte","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"createdAt_gte","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"createdAt_lte","in":"query"}],"responses":{"200":{"description":"List of posts","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostList"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"create_post","description":"Create a draft Posty post with channel-specific text, metadata, optional firstComment and ready media IDs in the selected workspace. First comments require the workspace entitlement and publish after the post on supported platforms. An optional future scheduledAt records the intended publication time. Returns the created post and content. Creation does not publish the draft; use act_on_post for review and publication.","tags":["Posts"],"security":[{"ApiKey":[]},{"OAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePostRequest"}}}},"responses":{"201":{"description":"Post created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Post"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Monthly post limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Channel or media not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict - inactive channel or non-ready media","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/posts/{id}":{"get":{"operationId":"get_post","description":"Retrieve a visible Posty post by ID in the selected workspace. Returns its status, schedule and expanded channel content, including media attachments and delivery details. Use this to inspect a post before editing or taking a lifecycle action.","tags":["Posts"],"security":[{"ApiKey":[]},{"OAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Post with expanded content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Post"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope or status not visible","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"update_post","x-mcp":{"openWorld":true},"description":"Update supplied status, scheduledAt or approvalMode fields on a Posty post by ID. Permissions, transitions and review rules apply. Returns the updated post. Scheduling can cause publication to connected social platforms when due; returning a post to draft resets existing approvals.","tags":["Posts"],"security":[{"ApiKey":[]},{"OAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePostRequest"}}}},"responses":{"200":{"description":"Updated post","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Post"}}}},"400":{"description":"Invalid schedule","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Invalid transition or approval required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"delete_post","description":"Permanently delete a Posty post and associated content and collaboration records by ID in the selected workspace. Requires deletion permission and is rejected during active delivery. Returns a deletion confirmation. Already published social-platform copies remain online.","tags":["Posts"],"security":[{"ApiKey":[]},{"OAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Deleted"},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/posts/{id}/content/{channelId}":{"patch":{"operationId":"update_post_content","description":"Update supplied text body, platform metadata or firstComment for one channel of an editable Posty post using post and channel IDs. Omit firstComment to preserve it; null or blank text clears it. Non-empty first comments require the workspace entitlement. Returns updated channel content. Edits apply to the Posty copy without updating an already published social-platform copy.","tags":["Posts"],"security":[{"ApiKey":[]},{"OAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"channelId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePostContentRequest"}}}},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostContent"}}}},"400":{"description":"Validation error or first comments unavailable on this plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Post is not editable or delivery is in progress","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"description":"Delete one channel-specific content entry and its attachments from an editable Posty post using post and channel IDs. Returns a deletion confirmation. Library media and already published social-platform copies are retained.","operationId":"delete_post_content","tags":["Posts"],"security":[{"ApiKey":[]},{"OAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":1},"required":true,"name":"channelId","in":"path"}],"responses":{"204":{"description":"Channel content removed from post"}}}},"/v1/posts/{id}/content/{channelId}/media":{"put":{"operationId":"replace_post_content_media","description":"Replace the complete ordered media attachment list for one channel of an editable Posty post. Provide post and channel IDs and the full ordered list of ready media IDs. Omitted attachments are detached; an empty list clears attachments. Returns updated channel content while retaining library assets.","tags":["Posts"],"security":[{"ApiKey":[]},{"OAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"channelId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplaceContentMediaRequest"}}}},"responses":{"200":{"description":"Media replaced","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostContent"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (post, channel, or media)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Media not ready","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/posts/{id}/actions":{"post":{"operationId":"act_on_post","tags":["Posts"],"security":[{"ApiKey":[]},{"OAuth":[]}],"description":"Apply a lifecycle action to a Posty post and return its resulting status. Use submit to follow its configured approval flow, approve to record approval, request_changes with a comment body to request edits, or retry to requeue failed deliveries. For an approved or scheduled post, publish with at=now (the default) queues immediate delivery; at=scheduled retains its saved publication time. Submission or approval may also schedule publication according to workspace settings. Publishing and retrying can expose content and media on external social platforms. Permissions, review stages and readiness checks apply.","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"skipApproval":{"type":"boolean","default":false},"action":{"type":"string","enum":["submit"]}},"required":["action"]},{"type":"object","properties":{"action":{"type":"string","enum":["approve"]}},"required":["action"]},{"type":"object","properties":{"body":{"type":"string","minLength":1,"maxLength":10000},"visibility":{"type":"string","enum":["team","all"]},"action":{"type":"string","enum":["request_changes"]}},"required":["body","action"]},{"type":"object","properties":{"at":{"type":"string","enum":["now","scheduled"],"default":"now"},"action":{"type":"string","enum":["publish"]}},"required":["action"]},{"type":"object","properties":{"action":{"type":"string","enum":["retry"]}},"required":["action"]}]}}}},"responses":{"200":{"description":"Resulting post status","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["draft","pending_approval","pending_client_approval","approved","scheduled","delivered","partially_delivered","delivery_failed"]}},"required":["id","status"]}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/posts/{id}/history":{"get":{"description":"Retrieve revision history, approval decisions and recorded events for a visible Posty post by ID in the selected workspace. Requires permission to view post history. Returns revisions, approvals and events without modifying the post.","operationId":"get_post_history","tags":["Posts"],"security":[{"ApiKey":[]},{"OAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Post revisions, review decisions, and events","content":{"application/json":{"schema":{"type":"object","properties":{"revisions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":{"nullable":true}}},"approvals":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":{"nullable":true}}},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":{"nullable":true}}}},"required":["revisions","approvals","events"]}}}}}}},"/v1/calendar":{"get":{"operationId":"list_calendar_posts","tags":["Posts"],"security":[{"ApiKey":[]},{"OAuth":[]}],"description":"List posts scheduled between from and to (ISO timestamps) as calendar cards with per-channel delivery counts. Needs posts:view; client reviewers never see drafts or team review.","parameters":[{"schema":{"type":"string","format":"date-time"},"required":true,"name":"from","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":true,"name":"to","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":1000,"default":500},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"Calendar posts in the range","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalendarPostList"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Post, request or group not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The post changed or is not in a state that allows this","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/backlog":{"get":{"operationId":"list_backlog_posts","tags":["Posts"],"security":[{"ApiKey":[]},{"OAuth":[]}],"description":"List unscheduled posts that are not yet delivered, most recently updated first. Needs posts:view; client reviewers never see drafts or team review.","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":500,"default":100},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"Backlog posts","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BacklogPostList"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Post, request or group not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The post changed or is not in a state that allows this","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/backlog/count":{"get":{"operationId":"count_backlog_posts","tags":["Posts"],"security":[{"ApiKey":[]},{"OAuth":[]}],"description":"Count the unscheduled posts the caller can see in the backlog. Needs posts:view.","responses":{"200":{"description":"Backlog size","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BacklogCount"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Post, request or group not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The post changed or is not in a state that allows this","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/posts/{id}/approval-mode":{"put":{"operationId":"set_post_approval_mode","tags":["Posts"],"security":[{"ApiKey":[]},{"OAuth":[]}],"description":"Pin a draft post's approval flow (none, optional, required or multi_level), or pass null to inherit the workspace default. Needs posts:update_approval_mode; the mode must be included in the workspace plan.","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetPostApprovalModeRequest"}}}},"responses":{"200":{"description":"The post with its new approval mode","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostState"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Post, request or group not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The post changed or is not in a state that allows this","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/posts/{id}/revisions":{"post":{"operationId":"create_post_revision","tags":["Posts"],"security":[{"ApiKey":[]},{"OAuth":[]}],"description":"Snapshot the post's current per-channel content and media as a new numbered revision. Needs posts:update. Read revisions with get_post_history.","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"responses":{"201":{"description":"Revision created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostRevision"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Post, request or group not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The post changed or is not in a state that allows this","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/posts/{id}/cancel-delivery":{"post":{"operationId":"cancel_post_delivery","tags":["Posts"],"security":[{"ApiKey":[]},{"OAuth":[]}],"x-mcp":{"destructive":true},"description":"Stop retrying one channel's failed delivery, or dismiss one that failed permanently, so the post no longer counts as needing attention. Obtain postContentId from content[].id in get_post for the post. Requires posts:publish. Returns the content ID and resulting delivery status. Fails with 409 if a retry already started; it does not delete a published platform post.","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelPostDeliveryRequest"}}}},"responses":{"200":{"description":"Delivery cancelled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelledDelivery"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Post, request or group not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The post changed or is not in a state that allows this","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/post-schedules":{"post":{"operationId":"bulk_schedule_posts","tags":["Posts"],"security":[{"ApiKey":[]},{"OAuth":[]}],"x-mcp":{"destructive":true},"description":"Move up to 50 posts to new future times in one all or nothing change. Each item carries the post's current updatedAt as expectedUpdatedAt; a stale value answers 409. Needs posts:update; approval states are unchanged.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkSchedulePostsRequest"}}}},"responses":{"200":{"description":"Posts whose schedule changed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkSchedulePostsResult"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Post, request or group not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The post changed or is not in a state that allows this","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/posts/{id}/review-requests":{"get":{"operationId":"list_post_review_requests","tags":["Posts"],"security":[{"ApiKey":[]},{"OAuth":[]}],"description":"List who has been asked to approve a post and how each ask ended (pending, approved, changes_requested, superseded, cancelled). Needs posts:view; client reviewers see only client stage asks.","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Review requests for the post","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewRequestList"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Post, request or group not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The post changed or is not in a state that allows this","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/posts/{id}/review-requests/{requestId}/cancel":{"post":{"operationId":"cancel_post_review_request","tags":["Posts"],"security":[{"ApiKey":[]},{"OAuth":[]}],"x-mcp":{"destructive":true},"description":"Withdraw a pending ask for one reviewer; the post stays in review and nobody is emailed. Needs posts:submit_for_approval. Asks inside a review group cannot be withdrawn here.","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":1},"required":true,"name":"requestId","in":"path"}],"responses":{"200":{"description":"The withdrawn request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelledReviewRequest"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Post, request or group not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The post changed or is not in a state that allows this","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/review-requests":{"get":{"operationId":"list_pending_review_requests","tags":["Posts"],"security":[{"ApiKey":[]},{"OAuth":[]}],"description":"List review requests still waiting at their post's current stage, newest first, cursor paginated. Needs posts:view. Grouped requests appear only to their requester and recipients over OAuth; API keys see ungrouped requests.","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"starting_after","in":"query"}],"responses":{"200":{"description":"Pending review requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PendingReviewRequestList"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Post, request or group not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The post changed or is not in a state that allows this","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/review-batches/{id}":{"get":{"operationId":"get_review_batch","tags":["Posts"],"security":[{"ApiKey":[]},{"OAuth":[]}],"description":"Read a grouped approval request: its shared note and how many visible posts are still waiting. Needs posts:view and an OAuth connection for the requester or a recipient; API keys are refused.","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The review group","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewBatch"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Post, request or group not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The post changed or is not in a state that allows this","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/review-batches/{id}/posts/{postId}":{"delete":{"operationId":"remove_post_from_review_batch","tags":["Posts"],"security":[{"ApiKey":[]},{"OAuth":[]}],"description":"Detach one post from a grouped approval request. Its individual asks and decisions stay; repeating is a no-op. Needs posts:submit_for_approval and an OAuth connection for the person who sent the group.","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":1},"required":true,"name":"postId","in":"path"}],"responses":{"204":{"description":"Post detached from the group"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Post, request or group not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The post changed or is not in a state that allows this","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/campaigns":{"get":{"operationId":"list_campaigns","tags":["Campaigns"],"security":[{"ApiKey":[]},{"OAuth":[]}],"description":"List the workspace's campaigns with post counts per status and this month's cadence progress. Filter with a comma-separated `status`. Needs campaigns:view; client-visibility members receive the client view without internal notes.","parameters":[{"schema":{"type":"string"},"required":false,"name":"status","in":"query"}],"responses":{"200":{"description":"Campaigns","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignList"}}}},"400":{"description":"Invalid status filter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope, or campaigns are disabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"create_campaign","tags":["Campaigns"],"security":[{"ApiKey":[]},{"OAuth":[]}],"description":"Create a campaign: a bounded launch (startAt and endAt) or an ongoing theme (no dates plus monthlyPostTarget). Needs campaigns:create and counts against the plan's campaign limit (402 when reached).","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCampaignRequest"}}}},"responses":{"201":{"description":"Campaign created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Campaign"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Campaign limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope, or campaigns are disabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting change","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/campaigns/{id}":{"get":{"operationId":"get_campaign","tags":["Campaigns"],"security":[{"ApiKey":[]},{"OAuth":[]}],"description":"Get one campaign's brief: objective, personas, creative direction, dates or monthly target, and post counts. Needs campaigns:view; client-visibility members receive the client view without internal notes.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Campaign","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Campaign"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope, or campaigns are disabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"update_campaign","tags":["Campaigns"],"security":[{"ApiKey":[]},{"OAuth":[]}],"description":"Edit a campaign's brief. Omitted fields are left alone and null clears a field. Needs campaigns:update. Use set_campaign_status for status and set_campaign_personas for target personas.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCampaignRequest"}}}},"responses":{"200":{"description":"Campaign updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Campaign"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope, or campaigns are disabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting change","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/campaigns/{id}/status":{"put":{"operationId":"set_campaign_status","tags":["Campaigns"],"security":[{"ApiKey":[]},{"OAuth":[]}],"description":"Move a campaign between draft, active, completed and archived. Needs campaigns:update, and campaigns:archive to archive. An archived campaign accepts no new deliverables.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetCampaignStatusRequest"}}}},"responses":{"200":{"description":"Campaign status set","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Campaign"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope, or campaigns are disabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting change","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/campaigns/{id}/personas":{"put":{"operationId":"set_campaign_personas","tags":["Campaigns"],"security":[{"ApiKey":[]},{"OAuth":[]}],"description":"Replace the set of personas a campaign targets with personaIds (find or create them with get_or_create_persona). Needs campaigns:update.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetCampaignPersonasRequest"}}}},"responses":{"200":{"description":"Campaign personas set","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignPersonas"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope, or campaigns are disabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting change","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/campaigns/{id}/results":{"get":{"operationId":"get_campaign_results","tags":["Campaigns"],"security":[{"ApiKey":[]},{"OAuth":[]}],"description":"Campaign performance over the last `days` (default 30, clamped to the plan's analytics retention): comparative findings plus totals, per-post and per-persona reach. available is false when the plan keeps no analytics. Needs campaigns:view; client-visibility members get headline numbers and findings only.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":365,"default":30},"required":false,"name":"days","in":"query"}],"responses":{"200":{"description":"Campaign results","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignResults"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope, or campaigns are disabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/campaigns/{id}/deliverables":{"get":{"operationId":"list_campaign_deliverables","tags":["Campaigns"],"security":[{"ApiKey":[]},{"OAuth":[]}],"description":"List the posts filed under a campaign with their summary text, status, schedule, persona, platforms and a signed thumbnail URL. Needs posts:view; post statuses the caller may not see are left out.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":500,"default":200},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"Campaign deliverables","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignDeliverableList"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope, or campaigns are disabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/campaigns/{id}/posts/{postId}":{"put":{"operationId":"add_post_to_campaign","tags":["Campaigns"],"security":[{"ApiKey":[]},{"OAuth":[]}],"x-mcp":{"destructive":true},"description":"File an existing post under this campaign as a deliverable, moving it out of any other campaign, and optionally set the persona it speaks to. Needs posts:update; the post must still be editable and the campaign not archived.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"postId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddCampaignPostRequest"}}}},"responses":{"200":{"description":"Post filed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignPostAssignment"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope, or campaigns are disabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting change","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"remove_post_from_campaign","tags":["Campaigns"],"security":[{"ApiKey":[]},{"OAuth":[]}],"description":"Detach a post from this campaign and clear its persona. The post itself is kept. Needs posts:update; answers 404 when the post is not in this campaign.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"postId","in":"path"}],"responses":{"204":{"description":"Post detached"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope, or campaigns are disabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting change","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/personas":{"get":{"operationId":"search_personas","tags":["Campaigns"],"security":[{"ApiKey":[]},{"OAuth":[]}],"description":"Search the workspace's personas (target audiences) by name, case-insensitively. Archived personas are excluded unless includeArchived is true. Needs campaigns:view.","parameters":[{"schema":{"type":"string","maxLength":200},"required":false,"name":"query","in":"query"},{"schema":{"type":"string","enum":["true","false"]},"required":false,"name":"includeArchived","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":50,"default":20},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"Personas","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonaList"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope, or campaigns are disabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"get_or_create_persona","tags":["Campaigns"],"security":[{"ApiKey":[]},{"OAuth":[]}],"x-mcp":{"idempotent":true},"description":"Return the workspace persona with this name (matched case-insensitively), creating it when none exists. created tells which happened; an existing persona's fields are not changed. Needs campaigns:create.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetOrCreatePersonaRequest"}}}},"responses":{"200":{"description":"Existing persona","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetOrCreatePersonaResult"}}}},"201":{"description":"Persona created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetOrCreatePersonaResult"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope, or campaigns are disabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting change","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/personas/{id}":{"patch":{"operationId":"update_persona","tags":["Campaigns"],"security":[{"ApiKey":[]},{"OAuth":[]}],"description":"Rename a persona or change its description or color. Needs campaigns:update.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePersonaRequest"}}}},"responses":{"200":{"description":"Persona updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Persona"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope, or campaigns are disabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting change","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/personas/{id}/archive":{"post":{"operationId":"archive_persona","tags":["Campaigns"],"security":[{"ApiKey":[]},{"OAuth":[]}],"x-mcp":{"destructive":true,"idempotent":true},"description":"Archive a persona so pickers stop offering it (archived: false restores it). Existing campaign and post links are kept. Needs campaigns:archive.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArchivePersonaRequest"}}}},"responses":{"200":{"description":"Persona archived or restored","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Persona"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope, or campaigns are disabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting change","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/objectives":{"get":{"operationId":"search_objectives","tags":["Campaigns"],"security":[{"ApiKey":[]},{"OAuth":[]}],"description":"Search the workspace's campaign objectives by name, case-insensitively. Archived objectives are excluded unless includeArchived is true. Needs campaigns:view.","parameters":[{"schema":{"type":"string","maxLength":200},"required":false,"name":"query","in":"query"},{"schema":{"type":"string","enum":["true","false"]},"required":false,"name":"includeArchived","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":50,"default":20},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"Objectives","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ObjectiveList"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope, or campaigns are disabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"get_or_create_objective","tags":["Campaigns"],"security":[{"ApiKey":[]},{"OAuth":[]}],"x-mcp":{"idempotent":true},"description":"Return the workspace objective with this name (matched case-insensitively), creating it when none exists. created tells which happened; an existing objective's fields are not changed. Needs campaigns:create.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetOrCreateObjectiveRequest"}}}},"responses":{"200":{"description":"Existing objective","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetOrCreateObjectiveResult"}}}},"201":{"description":"Objective created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetOrCreateObjectiveResult"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope, or campaigns are disabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting change","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/objectives/{id}":{"patch":{"operationId":"update_objective","tags":["Campaigns"],"security":[{"ApiKey":[]},{"OAuth":[]}],"description":"Rename an objective or change its description, target metric or target value. Needs campaigns:update.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateObjectiveRequest"}}}},"responses":{"200":{"description":"Objective updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Objective"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope, or campaigns are disabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting change","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/objectives/{id}/archive":{"post":{"operationId":"archive_objective","tags":["Campaigns"],"security":[{"ApiKey":[]},{"OAuth":[]}],"x-mcp":{"destructive":true,"idempotent":true},"description":"Archive an objective so pickers stop offering it (archived: false restores it). Campaigns pointing at it are kept. Needs campaigns:archive.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArchiveObjectiveRequest"}}}},"responses":{"200":{"description":"Objective archived or restored","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Objective"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope, or campaigns are disabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting change","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/client-shares":{"get":{"operationId":"list_client_shares","tags":["Client shares"],"security":[{"ApiKey":[]},{"OAuth":[]}],"description":"List the workspace's client review links (workspace, post or campaign scoped) without their tokens. Revoked links are left out unless includeRevoked is true. Needs campaigns:update.","parameters":[{"schema":{"type":"string","enum":["true","false"]},"required":false,"name":"includeRevoked","in":"query"}],"responses":{"200":{"description":"Client share links","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientShareList"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"create_client_share","tags":["Client shares"],"security":[{"ApiKey":[]},{"OAuth":[]}],"x-mcp":{"openWorld":true},"description":"Create a public review link that lets anyone holding it read client-visible posts: the whole workspace, the posts in subjectIds (scope post) or one campaign's deliverables and brief (scope campaign, agency organizations only). The url and token are returned only in this response. Needs campaigns:update; sends no email.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateClientShareRequest"}}}},"responses":{"201":{"description":"Link created; store the url now, it cannot be shown again","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatedClientShare"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Workspace not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/client-shares/{id}":{"delete":{"operationId":"revoke_client_share","tags":["Client shares"],"security":[{"ApiKey":[]},{"OAuth":[]}],"description":"Revoke a client review link so it stops working at once. Revoking cannot be undone; issue a new link instead. Needs campaigns:update.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Link revoked"},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Link not found or already revoked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/questionnaires":{"get":{"operationId":"list_questionnaires","tags":["Questionnaires"],"security":[{"ApiKey":[]},{"OAuth":[]}],"description":"List the workspace's client questionnaires (onboarding forms) with link and response counts, without their question definitions. Archived ones are left out unless includeArchived is true. Requires questionnaires:view.","parameters":[{"schema":{"type":"string","enum":["true","false"]},"required":false,"name":"includeArchived","in":"query"}],"responses":{"200":{"description":"Questionnaires","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuestionnaireList"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing permission, a client-visibility member, or an organization that is not an agency","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"create_questionnaire","tags":["Questionnaires"],"security":[{"ApiKey":[]},{"OAuth":[]}],"description":"Create a draft questionnaire in the workspace, blank or copied from one of the organization's templates (templateId from list_questionnaire_templates). Counts against the plan's questionnaire limit and needs an agency organization. Requires questionnaires:create.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateQuestionnaireRequest"}}}},"responses":{"201":{"description":"Questionnaire created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Questionnaire"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The plan's questionnaire limit is reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing permission, a client-visibility member, or an organization that is not an agency","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/questionnaires/{id}":{"get":{"operationId":"get_questionnaire","tags":["Questionnaires"],"security":[{"ApiKey":[]},{"OAuth":[]}],"description":"Get one questionnaire with its full definition (sections and question blocks), every link sent for it and a summary of each response. Requires questionnaires:view.","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Questionnaire","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuestionnaireDetail"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing permission, a client-visibility member, or an organization that is not an agency","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"update_questionnaire","tags":["Questionnaires"],"security":[{"ApiKey":[]},{"OAuth":[]}],"description":"Rename a questionnaire, change its description, or replace its whole definition (intro, sections of question blocks, outro). Links already sent keep the form they were sent with. Archived questionnaires cannot be edited. Requires questionnaires:update.","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateQuestionnaireRequest"}}}},"responses":{"200":{"description":"Questionnaire updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Questionnaire"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing permission, a client-visibility member, or an organization that is not an agency","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Not allowed in this state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/questionnaires/{id}/status":{"post":{"operationId":"set_questionnaire_status","tags":["Questionnaires"],"security":[{"ApiKey":[]},{"OAuth":[]}],"x-mcp":{"destructive":true,"idempotent":true,"openWorld":true},"description":"Set a questionnaire to draft, active (it can be sent) or archived. Archiving stops every link already sent for it from opening; restoring an archived one counts against the plan's questionnaire limit again. Requires questionnaires:update.","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetQuestionnaireStatusRequest"}}}},"responses":{"200":{"description":"Questionnaire status set","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Questionnaire"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The plan's questionnaire limit is reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing permission, a client-visibility member, or an organization that is not an agency","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/questionnaires/{id}/links":{"get":{"operationId":"list_questionnaire_links","tags":["Questionnaires"],"security":[{"ApiKey":[]},{"OAuth":[]}],"description":"List the links sent for a questionnaire, each with its state (open, submitted, revoked or expired). The link URL itself is never returned again after create_questionnaire_link. Requires questionnaires:view.","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Links","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuestionnaireLinkList"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing permission, a client-visibility member, or an organization that is not an agency","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"create_questionnaire_link","tags":["Questionnaires"],"security":[{"ApiKey":[]},{"OAuth":[]}],"x-mcp":{"openWorld":true},"description":"Create a public link a client opens to fill in an active questionnaire, without an account. The response carries the URL exactly once: share it with the client yourself, because this API sends no email and the URL cannot be fetched again. Requires questionnaires:send.","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateQuestionnaireLinkRequest"}}}},"responses":{"201":{"description":"Link created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatedQuestionnaireLink"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing permission, a client-visibility member, or an organization that is not an agency","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Not allowed in this state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/questionnaire-links/{id}":{"delete":{"operationId":"revoke_questionnaire_link","tags":["Questionnaires"],"security":[{"ApiKey":[]},{"OAuth":[]}],"description":"Revoke a questionnaire link so the client can no longer open it. A response the client already submitted is kept. Requires questionnaires:send.","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Link revoked"},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing permission, a client-visibility member, or an organization that is not an agency","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/questionnaires/{id}/responses":{"get":{"operationId":"list_questionnaire_responses","tags":["Questionnaires"],"security":[{"ApiKey":[]},{"OAuth":[]}],"description":"List the responses to a questionnaire: who answered, and whether each is a draft in progress, submitted or applied. Read the answers with get_questionnaire_response. Requires questionnaires:view.","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Responses","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuestionnaireResponseList"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing permission, a client-visibility member, or an organization that is not an agency","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/questionnaires/{id}/export":{"get":{"operationId":"export_questionnaire_responses","tags":["Questionnaires"],"security":[{"ApiKey":[]},{"OAuth":[]}],"description":"Every submitted response to a questionnaire as a table: one column per question, one row per respondent, each answer as text. A question added after a link was sent is an empty cell for that respondent. Requires questionnaires:view.","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Responses as rows","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuestionnaireExport"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing permission, a client-visibility member, or an organization that is not an agency","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/questionnaire-responses/{id}":{"get":{"operationId":"get_questionnaire_response","tags":["Questionnaires"],"security":[{"ApiKey":[]},{"OAuth":[]}],"description":"Get one questionnaire response: its answers keyed by question id, the form exactly as it was sent, signed download URLs for uploaded files, the channels the client connected, and what has been applied. Requires questionnaires:view.","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuestionnaireResponseDetail"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing permission, a client-visibility member, or an organization that is not an agency","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/questionnaire-responses/{id}/apply":{"post":{"operationId":"apply_questionnaire_response","tags":["Questionnaires"],"security":[{"ApiKey":[]},{"OAuth":[]}],"x-mcp":{"destructive":true,"idempotent":true},"description":"Write chosen answers of a submitted response into the workspace: only the listed blockIds whose questions carry a mapping. Overwrites the workspace name, logo and brand voice or competitors, and adds personas and objectives; campaign answers come back as campaignPrefill instead of being written. Answers already applied are skipped. Requires questionnaires:update.","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplyQuestionnaireResponseRequest"}}}},"responses":{"200":{"description":"Response applied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppliedQuestionnaireResponse"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing permission, a client-visibility member, or an organization that is not an agency","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Not allowed in this state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/questionnaire-templates":{"get":{"operationId":"list_questionnaire_templates","tags":["Questionnaires"],"security":[{"ApiKey":[]},{"OAuth":[]}],"description":"List the organization's questionnaire templates (without definitions) and the built-in starters a template can be created from. Templates belong to the selected workspace's organization and need a signed-in user (OAuth), not an API key, plus questionnaires:view in the workspace. Requires organization:view.","parameters":[{"schema":{"type":"string","enum":["true","false"]},"required":false,"name":"includeArchived","in":"query"}],"responses":{"200":{"description":"Templates","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuestionnaireTemplateList"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing permission, a client-visibility member, or an organization that is not an agency","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"create_questionnaire_template","tags":["Questionnaires"],"security":[{"ApiKey":[]},{"OAuth":[]}],"description":"Create an organization questionnaire template, blank, from a starterKey listed by list_questionnaire_templates, or from a full definition. Templates belong to the selected workspace's organization and need a signed-in user (OAuth), not an API key, plus questionnaires:view in the workspace. Requires organization:manage_templates (organization owners and admins).","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateQuestionnaireTemplateRequest"}}}},"responses":{"201":{"description":"Template created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuestionnaireTemplate"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing permission, a client-visibility member, or an organization that is not an agency","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/questionnaire-templates/{id}":{"get":{"operationId":"get_questionnaire_template","tags":["Questionnaires"],"security":[{"ApiKey":[]},{"OAuth":[]}],"description":"Get one questionnaire template with its full definition. Templates belong to the selected workspace's organization and need a signed-in user (OAuth), not an API key, plus questionnaires:view in the workspace. Requires organization:view.","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Template","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuestionnaireTemplate"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing permission, a client-visibility member, or an organization that is not an agency","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"update_questionnaire_template","tags":["Questionnaires"],"security":[{"ApiKey":[]},{"OAuth":[]}],"description":"Rename a questionnaire template, change its description or replace its definition. Questionnaires already copied from it do not change. Templates belong to the selected workspace's organization and need a signed-in user (OAuth), not an API key, plus questionnaires:view in the workspace. Requires organization:manage_templates.","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateQuestionnaireTemplateRequest"}}}},"responses":{"200":{"description":"Template updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuestionnaireTemplate"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing permission, a client-visibility member, or an organization that is not an agency","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/questionnaire-templates/{id}/archive":{"post":{"operationId":"archive_questionnaire_template","tags":["Questionnaires"],"security":[{"ApiKey":[]},{"OAuth":[]}],"x-mcp":{"destructive":true,"idempotent":true},"description":"Archive a questionnaire template so it is no longer offered. Questionnaires already copied from it keep working. Templates belong to the selected workspace's organization and need a signed-in user (OAuth), not an API key, plus questionnaires:view in the workspace. Requires organization:manage_templates.","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Template archived","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuestionnaireTemplate"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing permission, a client-visibility member, or an organization that is not an agency","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/analytics/overview":{"get":{"operationId":"get_analytics_overview","tags":["Analytics"],"security":[{"ApiKey":[]},{"OAuth":[]}],"description":"Workspace analytics for a window: KPIs against the previous period, per channel summaries, daily totals, per platform daily series and the top five posts. Choose `days` or a `startDate`/`endDate` pair; the window is clamped to the plan's retention (see retentionDays). Requires analytics:view.","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":365,"default":30,"description":"Trailing window in days ending today. Clamped to the plan's analytics retention."},"required":false,"description":"Trailing window in days ending today. Clamped to the plan's analytics retention.","name":"days","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Custom range start (YYYY-MM-DD, UTC). Used only together with endDate, and then overrides days. Dates older than the plan's retention are clamped."},"required":false,"description":"Custom range start (YYYY-MM-DD, UTC). Used only together with endDate, and then overrides days. Dates older than the plan's retention are clamped.","name":"startDate","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Custom range end (YYYY-MM-DD, UTC), inclusive. Used only together with startDate; capped at today."},"required":false,"description":"Custom range end (YYYY-MM-DD, UTC), inclusive. Used only together with startDate; capped at today.","name":"endDate","in":"query"},{"schema":{"type":"string","enum":["bluesky","discord","facebook","instagram","linkedin","pinterest","threads","tiktok","wordpress","youtube"],"description":"Only count channels and posts on this platform."},"required":false,"description":"Only count channels and posts on this platform.","name":"platform","in":"query"},{"schema":{"type":"string","description":"Comma separated channel ids to include. Defaults to every active or errored channel in the workspace. A channel from another workspace is rejected."},"required":false,"description":"Comma separated channel ids to include. Defaults to every active or errored channel in the workspace. A channel from another workspace is rejected.","name":"channelIds","in":"query"}],"responses":{"200":{"description":"Analytics overview","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyticsOverview"}}}},"400":{"description":"Invalid window or a channel outside the workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing analytics:view, or the plan lacks the feature","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/analytics/detail":{"get":{"operationId":"get_analytics_detail","tags":["Analytics"],"security":[{"ApiKey":[]},{"OAuth":[]}],"description":"Per post performance for a window (gains in the window plus lifetime totals) with content type, hashtag and posting time breakdowns. Takes the same window filters as get_analytics_overview plus `limit` (default 50) on the returned posts; breakdowns always cover every post. Requires analytics:view.","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":365,"default":30,"description":"Trailing window in days ending today. Clamped to the plan's analytics retention."},"required":false,"description":"Trailing window in days ending today. Clamped to the plan's analytics retention.","name":"days","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Custom range start (YYYY-MM-DD, UTC). Used only together with endDate, and then overrides days. Dates older than the plan's retention are clamped."},"required":false,"description":"Custom range start (YYYY-MM-DD, UTC). Used only together with endDate, and then overrides days. Dates older than the plan's retention are clamped.","name":"startDate","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Custom range end (YYYY-MM-DD, UTC), inclusive. Used only together with startDate; capped at today."},"required":false,"description":"Custom range end (YYYY-MM-DD, UTC), inclusive. Used only together with startDate; capped at today.","name":"endDate","in":"query"},{"schema":{"type":"string","enum":["bluesky","discord","facebook","instagram","linkedin","pinterest","threads","tiktok","wordpress","youtube"],"description":"Only count channels and posts on this platform."},"required":false,"description":"Only count channels and posts on this platform.","name":"platform","in":"query"},{"schema":{"type":"string","description":"Comma separated channel ids to include. Defaults to every active or errored channel in the workspace. A channel from another workspace is rejected."},"required":false,"description":"Comma separated channel ids to include. Defaults to every active or errored channel in the workspace. A channel from another workspace is rejected.","name":"channelIds","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":500,"default":50},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"Post performance and breakdowns","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyticsDetail"}}}},"400":{"description":"Invalid window or a channel outside the workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing analytics:view, or the plan lacks the feature","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/analytics/audience":{"get":{"operationId":"get_analytics_audience","tags":["Analytics"],"security":[{"ApiKey":[]},{"OAuth":[]}],"description":"Audience demographics (age, gender, country, city and more) from the latest snapshot inside the window, as basis points of the audience. Only on plans with audience analytics; otherwise 403 feature_not_available. Requires analytics:view.","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":365,"default":30,"description":"Trailing window in days ending today. Clamped to the plan's analytics retention."},"required":false,"description":"Trailing window in days ending today. Clamped to the plan's analytics retention.","name":"days","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Custom range start (YYYY-MM-DD, UTC). Used only together with endDate, and then overrides days. Dates older than the plan's retention are clamped."},"required":false,"description":"Custom range start (YYYY-MM-DD, UTC). Used only together with endDate, and then overrides days. Dates older than the plan's retention are clamped.","name":"startDate","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Custom range end (YYYY-MM-DD, UTC), inclusive. Used only together with startDate; capped at today."},"required":false,"description":"Custom range end (YYYY-MM-DD, UTC), inclusive. Used only together with startDate; capped at today.","name":"endDate","in":"query"},{"schema":{"type":"string","enum":["bluesky","discord","facebook","instagram","linkedin","pinterest","threads","tiktok","wordpress","youtube"],"description":"Only count channels and posts on this platform."},"required":false,"description":"Only count channels and posts on this platform.","name":"platform","in":"query"},{"schema":{"type":"string","description":"Comma separated channel ids to include. Defaults to every active or errored channel in the workspace. A channel from another workspace is rejected."},"required":false,"description":"Comma separated channel ids to include. Defaults to every active or errored channel in the workspace. A channel from another workspace is rejected.","name":"channelIds","in":"query"}],"responses":{"200":{"description":"Audience breakdown","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyticsAudience"}}}},"400":{"description":"Invalid window or a channel outside the workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing analytics:view, or the plan lacks the feature","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/analytics/channels/{channelId}/native-metrics":{"get":{"operationId":"get_channel_native_metrics","tags":["Analytics"],"security":[{"ApiKey":[]},{"OAuth":[]}],"description":"Platform specific metrics for one channel over a date range (for example Facebook reactions, Pinterest outbound clicks, YouTube average watch time), each with its label, unit and aggregation semantic. Requires analytics:view.","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"channelId","in":"path"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Window start (YYYY-MM-DD, UTC). Clamped to the plan's analytics retention."},"required":true,"description":"Window start (YYYY-MM-DD, UTC). Clamped to the plan's analytics retention.","name":"startDate","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Window end (YYYY-MM-DD, UTC), inclusive."},"required":true,"description":"Window end (YYYY-MM-DD, UTC), inclusive.","name":"endDate","in":"query"}],"responses":{"200":{"description":"Channel native metrics","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyticsChannelNativeMetrics"}}}},"400":{"description":"Invalid window or a channel outside the workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing analytics:view, or the plan lacks the feature","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Channel not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/analytics/posts/{postContentId}/native-metrics":{"get":{"operationId":"get_post_native_metrics","tags":["Analytics"],"security":[{"ApiKey":[]},{"OAuth":[]}],"description":"Every metric the platform reported for one published post over a date range, including platform specific ones such as watch time or retention, each with its label and unit. Requires analytics:view.","parameters":[{"schema":{"type":"string","minLength":1,"description":"The per-channel post content ID (postContentId in get_analytics_overview.topPosts or get_analytics_detail.postRows)."},"required":true,"description":"The per-channel post content ID (postContentId in get_analytics_overview.topPosts or get_analytics_detail.postRows).","name":"postContentId","in":"path"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Window start (YYYY-MM-DD, UTC). Clamped to the plan's analytics retention."},"required":true,"description":"Window start (YYYY-MM-DD, UTC). Clamped to the plan's analytics retention.","name":"startDate","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Window end (YYYY-MM-DD, UTC), inclusive."},"required":true,"description":"Window end (YYYY-MM-DD, UTC), inclusive.","name":"endDate","in":"query"}],"responses":{"200":{"description":"Post native metrics","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyticsPostNativeMetrics"}}}},"400":{"description":"Invalid window or a channel outside the workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing analytics:view, or the plan lacks the feature","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Post not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/analytics/posts/{postContentId}/retention-curve":{"get":{"operationId":"get_post_retention_curve","tags":["Analytics"],"security":[{"ApiKey":[]},{"OAuth":[]}],"description":"The audience retention curve of one YouTube video: the share of viewers still watching (watchRatio) at each point of the video (elapsedRatio, 0 to 1). Empty for other platforms or before YouTube reports it. Requires analytics:view.","parameters":[{"schema":{"type":"string","minLength":1,"description":"The per-channel post content ID (postContentId in get_analytics_overview.topPosts or get_analytics_detail.postRows)."},"required":true,"description":"The per-channel post content ID (postContentId in get_analytics_overview.topPosts or get_analytics_detail.postRows).","name":"postContentId","in":"path"}],"responses":{"200":{"description":"Retention curve samples","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyticsRetentionCurve"}}}},"400":{"description":"Invalid window or a channel outside the workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing analytics:view, or the plan lacks the feature","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Post not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/analytics/posts/{postContentId}/daily-series":{"get":{"operationId":"get_post_daily_series","tags":["Analytics"],"security":[{"ApiKey":[]},{"OAuth":[]}],"description":"One published post's daily gains (impressions, reach, likes, comments, shares, saves, video views) over a date range, one entry per day with data. Requires analytics:view.","parameters":[{"schema":{"type":"string","minLength":1,"description":"The per-channel post content ID (postContentId in get_analytics_overview.topPosts or get_analytics_detail.postRows)."},"required":true,"description":"The per-channel post content ID (postContentId in get_analytics_overview.topPosts or get_analytics_detail.postRows).","name":"postContentId","in":"path"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Window start (YYYY-MM-DD, UTC). Clamped to the plan's analytics retention."},"required":true,"description":"Window start (YYYY-MM-DD, UTC). Clamped to the plan's analytics retention.","name":"startDate","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Window end (YYYY-MM-DD, UTC), inclusive."},"required":true,"description":"Window end (YYYY-MM-DD, UTC), inclusive.","name":"endDate","in":"query"}],"responses":{"200":{"description":"Daily series","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyticsPostDailySeries"}}}},"400":{"description":"Invalid window or a channel outside the workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing analytics:view, or the plan lacks the feature","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Post not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/link-bio":{"get":{"operationId":"get_link_bio_page","tags":["Link in bio"],"security":[{"ApiKey":[]},{"OAuth":[]}],"description":"Get the workspace's link-in-bio page as the builder sees it: the draft blocks, theme and SEO, plus whether it is public and whether the draft has unpublished changes. Needs links:view.","responses":{"200":{"description":"The draft page","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkBioPage"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No link-in-bio page or block","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"claim_link_bio_handle","tags":["Link in bio"],"security":[{"ApiKey":[]},{"OAuth":[]}],"description":"Create the workspace's link-in-bio page by claiming a handle. The page starts private with a profile and footer block. If the workspace already has a page it is returned unchanged. Needs links:create.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClaimLinkBioHandleRequest"}}}},"responses":{"201":{"description":"The workspace's page","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkBioPage"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No link-in-bio page or block","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Handle already taken","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"update_link_bio_page","tags":["Link in bio"],"security":[{"ApiKey":[]},{"OAuth":[]}],"description":"Edit the draft page: handle, title, bio, avatar URL, theme or SEO. Send only the fields to change. Changes stay private until published in the app. Needs links:update.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateLinkBioPageRequest"}}}},"responses":{"200":{"description":"The updated draft page","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkBioPage"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No link-in-bio page or block","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Handle already taken","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/link-bio/analytics":{"get":{"operationId":"get_link_bio_analytics","tags":["Link in bio"],"security":[{"ApiKey":[]},{"OAuth":[]}],"description":"Views, unique visitors, clicks per link, referrers and countries for the link-in-bio page over the last `days` days (default 30, UTC). Needs links:view.","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":365},"required":false,"name":"days","in":"query"}],"responses":{"200":{"description":"Page analytics","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkBioAnalytics"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No link-in-bio page or block","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/link-bio/handle-availability":{"get":{"operationId":"check_link_bio_handle","tags":["Link in bio"],"security":[{"ApiKey":[]},{"OAuth":[]}],"description":"Check whether a link-in-bio handle (the name in posty.social/@handle) is valid and free. Handles are shared across every workspace.","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"required":true,"name":"handle","in":"query"}],"responses":{"200":{"description":"Availability","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkBioHandleAvailability"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No link-in-bio page or block","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/link-bio/blocks":{"post":{"operationId":"add_link_bio_block","tags":["Link in bio"],"security":[{"ApiKey":[]},{"OAuth":[]}],"description":"Add a block to the draft link-in-bio page. Set type and supply title, description, url and thumbnailUrl as top-level body fields where applicable; config holds additional type-specific settings. Returns the new block. Changes become public only when published in the app. Requires links:update.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddLinkBioBlockRequest"}}}},"responses":{"201":{"description":"The new block","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkBioBlockResult"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No link-in-bio page or block","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/link-bio/blocks/{blockId}":{"patch":{"operationId":"update_link_bio_block","tags":["Link in bio"],"security":[{"ApiKey":[]},{"OAuth":[]}],"description":"Edit a draft block. `type` must match the block's current type. Send only the fields to change; `config` replaces the stored config, so send it in full. Needs links:update.","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"blockId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateLinkBioBlockRequest"}}}},"responses":{"200":{"description":"The updated block","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkBioBlockResult"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No link-in-bio page or block","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"delete_link_bio_block","tags":["Link in bio"],"security":[{"ApiKey":[]},{"OAuth":[]}],"description":"Remove a block from the draft page. The public page keeps it until changes are published. Needs links:update.","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"blockId","in":"path"}],"responses":{"204":{"description":"Deleted"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No link-in-bio page or block","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/link-bio/block-order":{"put":{"operationId":"reorder_link_bio_blocks","tags":["Link in bio"],"security":[{"ApiKey":[]},{"OAuth":[]}],"description":"Set the order of the draft page's blocks. `blockIds` must list every block on the page exactly once. Needs links:update.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReorderLinkBioBlocksRequest"}}}},"responses":{"200":{"description":"The new order","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkBioBlockOrder"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No link-in-bio page or block","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/inbox/conversations":{"get":{"operationId":"list_inbox_conversations","tags":["Inbox"],"security":[{"ApiKey":[]},{"OAuth":[]}],"description":"List direct message conversations from connected social channels, newest activity first. Filter by status (open, archived or spam, default open) and channelId; days is clamped to the plan's inbox history window. Requires inbox:view.","parameters":[{"schema":{"type":"string","enum":["open","archived","spam"],"default":"open"},"required":false,"name":"status","in":"query"},{"schema":{"type":"string","minLength":1},"required":false,"name":"channelId","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":365,"default":30},"required":false,"name":"days","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"starting_after","in":"query"}],"responses":{"200":{"description":"One page of conversations","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InboxConversationList"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing the inbox permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/inbox/conversations/{id}/messages":{"get":{"operationId":"list_conversation_messages","tags":["Inbox"],"security":[{"ApiKey":[]},{"OAuth":[]}],"description":"List messages in one inbox conversation, newest first, with the conversation itself. Pass next_cursor as starting_after to page back through older messages. Reading does not mark the conversation read. Requires inbox:view.","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"starting_after","in":"query"}],"responses":{"200":{"description":"One page of messages","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InboxMessageList"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing the inbox permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/inbox/conversations/{id}":{"patch":{"operationId":"update_conversation_status","tags":["Inbox"],"security":[{"ApiKey":[]},{"OAuth":[]}],"x-mcp":{"idempotent":true},"description":"Move an inbox conversation to open, archived or spam. Archived and spam conversations leave the open list until moved back. Nothing is sent to the social platform. Requires inbox:view.","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateInboxConversationRequest"}}}},"responses":{"200":{"description":"The conversation's new state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InboxConversationState"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing the inbox permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/inbox/conversations/{id}/read":{"post":{"operationId":"mark_conversation_read","tags":["Inbox"],"security":[{"ApiKey":[]},{"OAuth":[]}],"x-mcp":{"idempotent":true},"description":"Mark an inbox conversation read for the workspace team, clearing its unread count. It does not send a seen receipt to the social platform. Requires inbox:view.","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The conversation's new state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InboxConversationState"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing the inbox permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/inbox/post-threads":{"get":{"operationId":"list_inbox_post_threads","tags":["Inbox"],"security":[{"ApiKey":[]},{"OAuth":[]}],"description":"List published posts whose platform comments appear in the inbox, newest first. Filter by channelId; days is clamped to the plan's inbox history window. Use get_post_comment_thread with a thread id to read its comments. Requires inbox:view.","parameters":[{"schema":{"type":"string","minLength":1},"required":false,"name":"channelId","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":365,"default":30},"required":false,"name":"days","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":30},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"Published post threads","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InboxPostThreadList"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing the inbox permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/inbox/post-threads/{id}":{"get":{"operationId":"get_post_comment_thread","tags":["Inbox"],"security":[{"ApiKey":[]},{"OAuth":[]}],"description":"Read one published post's platform comment thread as a flat list, oldest first, with parentCommentId linking replies. Facebook, Instagram and Threads comments are available; YouTube and Bluesky threads report commentStatus not_mirrored. Requires inbox:view.","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The post and its stored comments","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InboxPostCommentThread"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing the inbox permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/today":{"get":{"operationId":"get_today","tags":["Today"],"security":[{"ApiKey":[]},{"OAuth":[]}],"description":"Get the signed-in user's Today snapshot for the workspace: ranked blockers, decisions, next actions, progress and insights, plus what resolved since yesterday. Items are filtered to the caller's own permissions. Needs an OAuth user; API keys are rejected because Today is personal.","responses":{"200":{"description":"Today snapshot","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TodaySnapshot"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"API key callers (Today needs a signed-in user), or missing permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/today/items/{id}/dismiss":{"post":{"operationId":"dismiss_today_item","tags":["Today"],"security":[{"ApiKey":[]},{"OAuth":[]}],"x-mcp":{"destructive":true,"openWorld":true},"description":"Dismiss an open Today item by ID for everyone in the selected workspace and archive its associated user notifications. Updates shared Posty state and notifies connected workspace clients. Only items whose canDismiss is true can be dismissed. Requires an OAuth user with workspace:update. Returns the item ID, status and projection revision. restore_today_item can reopen it while the underlying condition still holds.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Item dismissed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TodayItemActionResult"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"API key callers (Today needs a signed-in user), or missing permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Today item not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The item or settings changed since they were read","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/today/items/{id}/restore":{"post":{"operationId":"restore_today_item","tags":["Today"],"security":[{"ApiKey":[]},{"OAuth":[]}],"x-mcp":{"destructive":true,"openWorld":true},"description":"Restore a dismissed Today item by ID so it appears again for everyone in the selected workspace. Changes shared Posty state from dismissed to open and notifies connected workspace clients. Returns the item ID, status and projection revision. Fails with 409 if the item is not dismissed or its underlying condition is no longer active. Requires an OAuth user with workspace:update.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Item restored","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TodayItemActionResult"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"API key callers (Today needs a signed-in user), or missing permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Today item not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The item or settings changed since they were read","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/today/settings":{"get":{"operationId":"get_today_settings","tags":["Today"],"security":[{"ApiKey":[]},{"OAuth":[]}],"description":"Get the workspace's Today rules: each configurable recipe's setting definitions, effective values, where each value comes from, and the workspace override with its revision. Needs an OAuth user who is a workspace member.","responses":{"200":{"description":"Today settings","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TodaySettings"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"API key callers (Today needs a signed-in user), or missing permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/today/settings/{recipeKey}":{"put":{"operationId":"update_today_settings","tags":["Today"],"security":[{"ApiKey":[]},{"OAuth":[]}],"description":"Replace the workspace override for one Today recipe (for example workspace.content_gap). Send the overrideRevision from get_today_settings as expectedRevision (null when there is no override yet); an empty configuration resets to inherited values. Needs an OAuth user holding workspace:update.","parameters":[{"schema":{"type":"string","pattern":"^workspace\\.[a-z][a-z0-9_]*$"},"required":true,"name":"recipeKey","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTodaySettings"}}}},"responses":{"200":{"description":"Settings saved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TodaySettingsUpdateResult"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"API key callers (Today needs a signed-in user), or missing permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Today item not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The item or settings changed since they were read","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/members":{"get":{"operationId":"list_workspace_members","tags":["Members"],"security":[{"ApiKey":[]},{"OAuth":[]}],"description":"List the workspace's members with their role, team or client visibility, owner flag, name and email. Use userId with update_workspace_member and remove_workspace_member. Needs workspace:view.","responses":{"200":{"description":"Workspace members","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemberList"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing workspace:view","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/members/{userId}":{"patch":{"operationId":"update_workspace_member","tags":["Members"],"security":[{"ApiKey":[]},{"OAuth":[]}],"description":"Change a member's workspace role. You cannot change your own role, and the last admin cannot be demoted. Demotion from admin revokes the member's API keys and hangs up their open realtime sessions. Needs workspace:manage_members.","parameters":[{"schema":{"type":"string"},"required":true,"name":"userId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWorkspaceMember"}}}},"responses":{"200":{"description":"Member updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceMembership"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing workspace:manage_members, or acting on yourself","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Would leave the workspace without an admin","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"remove_workspace_member","tags":["Members"],"security":[{"ApiKey":[]},{"OAuth":[]}],"description":"Remove a member from the workspace, revoke their API keys for it and hang up their open realtime sessions. You cannot remove yourself or the last admin. Needs workspace:manage_members.","parameters":[{"schema":{"type":"string"},"required":true,"name":"userId","in":"path"}],"responses":{"204":{"description":"Removed"},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing workspace:manage_members, or acting on yourself","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Would leave the workspace without an admin","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/invitations":{"get":{"operationId":"list_workspace_invitations","tags":["Members"],"security":[{"ApiKey":[]},{"OAuth":[]}],"description":"List the workspace's pending, unexpired invitations with the invited email, role, visibility, inviter and expiry. Each one holds a seat until it is accepted, cancelled or expires. Needs workspace:view.","responses":{"200":{"description":"Pending invitations","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationList"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing workspace:view","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/invitations/{id}":{"delete":{"operationId":"cancel_workspace_invitation","tags":["Members"],"security":[{"ApiKey":[]},{"OAuth":[]}],"description":"Cancel a pending invitation in this workspace, freeing its seat. Review requests still waiting on the invitee are cancelled too. Needs workspace:manage_members.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Cancelled"},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing workspace:manage_members","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Invitation not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Invitation was already accepted or cancelled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/workspace":{"get":{"operationId":"get_workspace","tags":["Workspace settings"],"security":[{"ApiKey":[]},{"OAuth":[]}],"description":"Get the current workspace's settings as the settings page shows them: name, logo, approval mode, review locking, campaigns, timezone and posting times, the approval modes the plan allows, and the caller's permissions. Needs workspace:view.","responses":{"200":{"description":"Workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceDetail"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing workspace:view","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"update_workspace_settings","tags":["Workspace settings"],"security":[{"ApiKey":[]},{"OAuth":[]}],"description":"Update the current workspace's name, approval mode, review locking, campaigns switch, timezone, auto scheduling on approval or default posting times. Only the fields you send change. An approval mode outside the plan's allowedApprovalModes is refused. Needs workspace:update.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWorkspaceSettings"}}}},"responses":{"200":{"description":"Workspace updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workspace"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing workspace:update, or approval mode not on the plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/me/notification-preferences":{"get":{"operationId":"get_my_notification_preferences","tags":["Notification preferences"],"security":[{"ApiKey":[]},{"OAuth":[]}],"description":"Get the signed-in user's notification profile (email switch, digest times, quiet hours, pause) and per-category delivery with defaults, account-wide overrides and per-workspace overrides. OAuth users only; API keys get 403 user_session_required.","responses":{"200":{"description":"Preferences","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationPreferences"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"API key callers: notification preferences belong to a signed-in user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/me/notification-preferences/{category}":{"put":{"operationId":"update_my_notification_preference","tags":["Notification preferences"],"security":[{"ApiKey":[]},{"OAuth":[]}],"description":"Set how the signed-in user hears about one category: in app on or off and the email frequency. scope account applies everywhere; scope workspace overrides it for the current workspace only. Send the override's revision as expectedRevision, or null when none exists. OAuth users only.","parameters":[{"schema":{"type":"string","enum":["assigned_work","approvals_and_feedback","publishing_and_channels","planning_reminders","progress_updates","insights_and_celebrations"]},"required":true,"name":"category","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateNotificationPreference"}}}},"responses":{"200":{"description":"Preference saved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationPreference"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"API key callers: notification preferences belong to a signed-in user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Preferences changed since they were read","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/me/notification-profile":{"put":{"operationId":"update_my_notification_profile","tags":["Notification preferences"],"security":[{"ApiKey":[]},{"OAuth":[]}],"description":"Replace the signed-in user's notification profile: email master switch, IANA timezone, daily digest time (HH:mm), weekly digest day (0 is Sunday), quiet hours and their behaviour, and an optional pause. Send the profile revision from get_my_notification_preferences as expectedRevision. OAuth users only.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateNotificationProfile"}}}},"responses":{"200":{"description":"Profile saved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationProfile"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"API key callers: notification preferences belong to a signed-in user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Preferences changed since they were read","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/me/workspace-notification-mute":{"put":{"operationId":"set_workspace_notification_mute","tags":["Notification preferences"],"security":[{"ApiKey":[]},{"OAuth":[]}],"description":"Mute or unmute email from the current workspace for the signed-in user. Muting turns email off for every category in this workspace; unmuting removes this workspace's overrides. OAuth users only.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetWorkspaceNotificationMute"}}}},"responses":{"200":{"description":"Mute saved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceNotificationMute"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"API key callers: notification preferences belong to a signed-in user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Preferences changed since they were read","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}