{"openapi":"3.0.3","info":{"title":"ankk-api-public","description":"Development documentation","version":"0.1.0"},"components":{"securitySchemes":{"ApiKeyAuth":{"type":"http","scheme":"bearer","bearerFormat":"API key","description":"Use an ankk public API key with the spk_ prefix."}},"schemas":{}},"security":[{"ApiKeyAuth":[]}],"paths":{"/v1/brand/analytics":{"get":{"tags":["Analytics"],"summary":"Get analytics","parameters":[{"name":"connection_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"days","in":"query","required":false,"schema":{"anyOf":[{"format":"numeric","default":0,"type":"string"},{"type":"number"}]}},{"name":"from","in":"query","required":false,"schema":{"type":"string"}},{"name":"sns_type","in":"query","required":false,"schema":{"type":"string"}},{"name":"to","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["accounts","bySnsType","dailyTrend","scope","topPosts","totals"],"properties":{"accounts":{"type":"array","items":{"type":"object","required":["connection_id","display_name","latest","profile_image_url","provider_account_id","provider_platform","sns_type","status","username"],"properties":{"connection_id":{"type":"string"},"display_name":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"latest":{"nullable":true,"anyOf":[{"type":"object","required":["followers","following","measured_at","posts","status"],"properties":{"followers":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"following":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"measured_at":{"type":"string"},"posts":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"status":{"type":"string"}}},{"type":"null"}]},"profile_image_url":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"provider_account_id":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"provider_platform":{"type":"string"},"sns_type":{"type":"string"},"status":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"username":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]}}}},"bySnsType":{"type":"array","items":{"type":"object","required":["metrics","provider_platform","sns_type"],"properties":{"metrics":{"type":"object","required":["comments","impressions","likes","quotes","reach","replies","reposts","saves","shares","views","exposures","followers","following","posts"],"properties":{"comments":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"impressions":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"likes":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"quotes":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"reach":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"replies":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"reposts":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"saves":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"shares":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"views":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"exposures":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"followers":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"following":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"posts":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]}}},"provider_platform":{"type":"string"},"sns_type":{"type":"string"}}}},"dailyTrend":{"type":"array","items":{"type":"object","required":["date","metrics"],"properties":{"date":{"type":"string"},"metrics":{"type":"object","required":["comments","impressions","likes","quotes","reach","replies","reposts","saves","shares","views","exposures","followers","following","posts"],"properties":{"comments":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"impressions":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"likes":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"quotes":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"reach":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"replies":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"reposts":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"saves":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"shares":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"views":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"exposures":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"followers":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"following":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"posts":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]}}}}}},"scope":{"type":"object","required":["brandRef","connectionIds","range","snsTypes"],"properties":{"brandRef":{"type":"string"},"connectionIds":{"type":"array","items":{"type":"string"}},"range":{"type":"object","required":["from","to"],"properties":{"from":{"type":"string"},"to":{"type":"string"}}},"snsTypes":{"type":"array","items":{"type":"string"}}}},"topPosts":{"type":"array","items":{"type":"object","required":["connection_id","content","metrics","permalink","provider_platform","provider_post_id","published_at","sns_post_id","sns_type","unsupported_metrics"],"properties":{"connection_id":{"type":"string"},"content":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"metrics":{"type":"object","required":["comments","impressions","likes","quotes","reach","replies","reposts","saves","shares","views"],"properties":{"comments":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"impressions":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"likes":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"quotes":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"reach":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"replies":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"reposts":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"saves":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"shares":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"views":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]}}},"permalink":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"provider_platform":{"type":"string"},"provider_post_id":{"type":"string"},"published_at":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"sns_post_id":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"sns_type":{"type":"string"},"unsupported_metrics":{"type":"array","items":{"type":"string"}}}}},"totals":{"type":"object","required":["current","previous"],"properties":{"current":{"type":"object","required":["comments","impressions","likes","quotes","reach","replies","reposts","saves","shares","views","exposures","followers","following","posts"],"properties":{"comments":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"impressions":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"likes":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"quotes":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"reach":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"replies":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"reposts":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"saves":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"shares":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"views":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"exposures":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"followers":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"following":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"posts":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]}}},"previous":{"type":"object","required":["comments","impressions","likes","quotes","reach","replies","reposts","saves","shares","views","exposures","followers","following","posts"],"properties":{"comments":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"impressions":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"likes":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"quotes":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"reach":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"replies":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"reposts":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"saves":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"shares":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"views":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"exposures":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"followers":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"following":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"posts":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]}}}}}},"additionalProperties":false}}}},"400":{"description":"Response for status 400","content":{"application/json":{"schema":{"type":"object","required":["error","message","param"],"properties":{"error":{"const":"invalid_id_format","type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Response for status 403","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string","enum":["analytics_range_exceeded","analytics_unavailable","entitlement_blocked"]},"limit_days":{"type":"number"},"message":{"type":"string"},"reason":{"type":"string"},"requested_days":{"type":"number"},"stale_after":{"type":"string"}},"additionalProperties":false}}}}},"operationId":"getV1BrandAnalytics"}},"/v1/brand/analytics/overview":{"get":{"tags":["Analytics"],"summary":"Get social analytics overview","description":"Returns compact brand-level counters from the same analytics projection source and date range semantics as Get analytics. Without from/to, the range defaults to the last 30 days.","parameters":[{"name":"from","in":"query","required":false,"schema":{"type":"string"}},{"name":"to","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["reply_count","comment_count"],"properties":{"reply_count":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"comment_count":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false}}}},"403":{"description":"Response for status 403","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string","enum":["analytics_range_exceeded","analytics_unavailable","entitlement_blocked"]},"limit_days":{"type":"number"},"message":{"type":"string"},"reason":{"type":"string"},"requested_days":{"type":"number"},"stale_after":{"type":"string"}},"additionalProperties":false}}}}},"operationId":"getV1BrandAnalyticsOverview"}},"/v1/brand":{"get":{"summary":"Get the Brand bound to the API key","tags":["Brands"],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["brand_ref","is_locked","name","role","slug"],"properties":{"brand_ref":{"description":"Canonical public API brand reference. This is the Better Auth organization id.","type":"string"},"is_locked":{"type":"boolean"},"name":{"type":"string"},"role":{"type":"string","enum":["owner","admin","member"]},"slug":{"description":"Human-readable brand slug.","type":"string"}},"additionalProperties":false}}}}},"operationId":"getV1Brand"}},"/v1/brands":{"get":{"summary":"Get the key-bound Brand as a compatibility list","tags":["Brands"],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"type":"object","required":["brand_ref","is_locked","name","role","slug"],"properties":{"brand_ref":{"description":"Canonical public API brand reference. This is the Better Auth organization id.","type":"string"},"is_locked":{"type":"boolean"},"name":{"type":"string"},"role":{"type":"string","enum":["owner","admin","member"]},"slug":{"description":"Human-readable brand slug.","type":"string"}},"additionalProperties":false}}},"additionalProperties":false}}}}},"operationId":"getV1Brands"}},"/v1/brand/connections":{"get":{"tags":["Connections"],"summary":"List provider connections","parameters":[{"name":"sns_type","in":"query","required":false,"schema":{"type":"string","enum":["bluesky","facebook_page","instagram","threads","tiktok","youtube"]}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"type":"object","required":["connection_id","brand_ref","sns_type","provider_platform","sns_account_id","username","display_name","lang","profile_image_url","status","is_locked"],"properties":{"connection_id":{"type":"string"},"brand_ref":{"type":"string"},"sns_type":{"type":"string","enum":["bluesky","facebook_page","instagram","threads","tiktok","youtube"]},"provider_platform":{"type":"string","enum":["bluesky","meta.facebook_pages","meta.instagram","meta.threads","tiktok","youtube.channel"]},"sns_account_id":{"type":"string"},"username":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"display_name":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"lang":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"profile_image_url":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["connected","reconnect_required"]},"is_locked":{"type":"boolean"}}}}},"additionalProperties":false}}}}},"operationId":"getV1BrandConnections"}},"/v1/brand/connections/{connection_id}":{"get":{"tags":["Connections"],"summary":"Get provider connection","parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["connection_id","brand_ref","sns_type","provider_platform","sns_account_id","username","display_name","lang","profile_image_url","status","is_locked","connected_by_id","metadata","publish_availability","publish_recovery","operations","token_expires_at","last_synced_at","created_at","updated_at"],"properties":{"connection_id":{"type":"string"},"brand_ref":{"type":"string"},"sns_type":{"type":"string","enum":["bluesky","facebook_page","instagram","threads","tiktok","youtube"]},"provider_platform":{"type":"string","enum":["bluesky","meta.facebook_pages","meta.instagram","meta.threads","tiktok","youtube.channel"]},"sns_account_id":{"type":"string"},"username":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"display_name":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"lang":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"profile_image_url":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["connected","reconnect_required"]},"is_locked":{"type":"boolean"},"connected_by_id":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"type":"object","properties":{"pageId":{"type":"string"}}},"publish_availability":{"nullable":true,"anyOf":[{"anyOf":[{"const":"available","type":"string"},{"const":"review_disabled","type":"string"},{"const":"permission_unverified","type":"string"},{"const":"permission_required","type":"string"},{"const":"unsupported","type":"string"}]},{"type":"null"}]},"publish_recovery":{"nullable":true,"anyOf":[{"anyOf":[{"const":"reauthorize","type":"string"},{"const":"contact_support","type":"string"}]},{"type":"null"}]},"operations":{"type":"array","items":{"type":"object","required":["operation","support","authorization","exposure","entitlement","capacity","health","executable","action"],"properties":{"operation":{"enum":["publish","publish_limit","publish_status","media_upload","account_profile","posts","interaction_discovery","comment_sync","reply","post_metrics","account_metrics","ingress","token_refresh","token_validation","token_revoke","post_delete","comment_delete","comment_moderation","webhook_subscription","public_lookup"],"type":"string"},"variant":{"type":"string"},"support":{"enum":["supported","unsupported","unknown"],"type":"string"},"authorization":{"enum":["scope_authorized","scope_review_disabled","scope_permission_unverified","scope_permission_missing","unsupported"],"type":"string"},"exposure":{"enum":["hidden","coming_soon","released"],"type":"string"},"entitlement":{"enum":["allowed","blocked","unknown"],"type":"string"},"capacity":{"enum":["available","cooldown","exhausted","unknown"],"type":"string"},"health":{"enum":["healthy","degraded","unavailable","unknown"],"type":"string"},"executable":{"type":"boolean"},"action":{"enum":["execute","connect","reconnect","wait","upgrade","coming_soon","unavailable"],"type":"string"},"retry_at":{"type":"string"}}}},"token_expires_at":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"last_synced_at":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"additionalProperties":false}}}},"400":{"description":"Response for status 400","content":{"application/json":{"schema":{"type":"object","required":["error","message","param"],"properties":{"error":{"const":"invalid_id_format","type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"additionalProperties":false}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"const":"not_found","type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"operationId":"getV1BrandConnectionsByConnection_id"}},"/v1/brand/contents/uploads":{"post":{"description":"Returns a presigned PUT URL for media referenced directly by an SNS content publish request. No reusable media asset is created.","summary":"Prepare an SNS content media upload","tags":["Contents"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["content_type","filename","size"],"properties":{"content_type":{"type":"string"},"filename":{"type":"string"},"size":{"type":"number"}},"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["content_type","filename","size"],"properties":{"content_type":{"type":"string"},"filename":{"type":"string"},"size":{"type":"number"}},"additionalProperties":false}},"multipart/form-data":{"schema":{"type":"object","required":["content_type","filename","size"],"properties":{"content_type":{"type":"string"},"filename":{"type":"string"},"size":{"type":"number"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["asset_ref","content_type","expires_in_seconds","method","object_key","size","upload_url"],"properties":{"asset_ref":{"type":"string"},"content_type":{"type":"string"},"expires_in_seconds":{"type":"number"},"method":{"const":"PUT","type":"string"},"object_key":{"type":"string"},"size":{"type":"number"},"upload_url":{"type":"string"}},"additionalProperties":false}}}},"400":{"description":"Response for status 400","content":{"application/json":{"schema":{"type":"object","required":["error","message","param"],"properties":{"error":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"additionalProperties":false}}}}},"operationId":"postV1BrandContentsUploads"}},"/v1/brand/contents":{"post":{"tags":["SNS Contents"],"summary":"Publish or schedule SNS content","description":"Accepts one logical SNS content item for one connection and creates one publish job. Threads thread_posts remains one logical content item and one publish job even though the provider publishes a chained thread. Asynchronous write: accepted means auth, scope, entitlement, quota, validation, persistence, and scheduling passed. It does not mean provider publish succeeded.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["connection_id","idempotency_key"],"properties":{"connection_id":{"type":"string"},"idempotency_key":{"type":"string"},"sns_type":{"type":"string"},"title":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"text":{"type":"string"},"thread_posts":{"type":"array","items":{"type":"object","required":["text"],"properties":{"text":{"type":"string"},"media":{"type":"array","items":{"type":"object","patternProperties":{"^(.*)$":{}}}}}}},"media":{"type":"array","items":{"type":"object","patternProperties":{"^(.*)$":{}}}},"hashtags":{"type":"array","items":{"type":"string"}},"provider_settings":{"type":"object","patternProperties":{"^(.*)$":{}}},"scheduled_for":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["connection_id","idempotency_key"],"properties":{"connection_id":{"type":"string"},"idempotency_key":{"type":"string"},"sns_type":{"type":"string"},"title":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"text":{"type":"string"},"thread_posts":{"type":"array","items":{"type":"object","required":["text"],"properties":{"text":{"type":"string"},"media":{"type":"array","items":{"type":"object","patternProperties":{"^(.*)$":{}}}}}}},"media":{"type":"array","items":{"type":"object","patternProperties":{"^(.*)$":{}}}},"hashtags":{"type":"array","items":{"type":"string"}},"provider_settings":{"type":"object","patternProperties":{"^(.*)$":{}}},"scheduled_for":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false}},"multipart/form-data":{"schema":{"type":"object","required":["connection_id","idempotency_key"],"properties":{"connection_id":{"type":"string"},"idempotency_key":{"type":"string"},"sns_type":{"type":"string"},"title":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"text":{"type":"string"},"thread_posts":{"type":"array","items":{"type":"object","required":["text"],"properties":{"text":{"type":"string"},"media":{"type":"array","items":{"type":"object","patternProperties":{"^(.*)$":{}}}}}}},"media":{"type":"array","items":{"type":"object","patternProperties":{"^(.*)$":{}}}},"hashtags":{"type":"array","items":{"type":"string"}},"provider_settings":{"type":"object","patternProperties":{"^(.*)$":{}}},"scheduled_for":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false}}}},"responses":{"202":{"description":"Response for status 202","content":{"application/json":{"schema":{"type":"object","required":["content_id","publish_job_id","scheduled_for","status","duplicate"],"properties":{"content_id":{"type":"string"},"publish_job_id":{"type":"string"},"scheduled_for":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string"},"duplicate":{"type":"boolean"}},"additionalProperties":false}}}},"400":{"description":"Response for status 400","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"axis":{"type":"string"},"details":{"type":"array","items":{"type":"object","required":["error","message","param"],"properties":{"error":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"},"platform":{"type":"string"}}}},"error":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"},"platform":{"type":"string"},"publish_job_id":{"type":"string"},"reason":{"type":"string"},"stale_after":{"type":"string"},"status":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Response for status 403","content":{"application/json":{"schema":{"anyOf":[{"type":"object","required":["error"],"properties":{"axis":{"type":"string"},"details":{"type":"array","items":{"type":"object","required":["error","message","param"],"properties":{"error":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"},"platform":{"type":"string"}}}},"error":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"},"platform":{"type":"string"},"publish_job_id":{"type":"string"},"reason":{"type":"string"},"stale_after":{"type":"string"},"status":{"type":"string"}},"additionalProperties":false},{"type":"object","required":["action","availability","error","message"],"properties":{"action":{"type":"string"},"availability":{"anyOf":[{"const":"review_disabled","type":"string"},{"const":"permission_unverified","type":"string"},{"const":"permission_required","type":"string"},{"const":"unsupported","type":"string"}]},"error":{"const":"publish_authorization_blocked","type":"string"},"message":{"type":"string"},"recovery":{"anyOf":[{"const":"reauthorize","type":"string"},{"const":"contact_support","type":"string"}]}}}]}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"const":"connection_not_found","type":"string"}},"additionalProperties":false}}}},"409":{"description":"Response for status 409","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"axis":{"type":"string"},"details":{"type":"array","items":{"type":"object","required":["error","message","param"],"properties":{"error":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"},"platform":{"type":"string"}}}},"error":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"},"platform":{"type":"string"},"publish_job_id":{"type":"string"},"reason":{"type":"string"},"stale_after":{"type":"string"},"status":{"type":"string"}},"additionalProperties":false}}}},"429":{"description":"Response for status 429","content":{"application/json":{"schema":{"type":"object","required":["count","error","limit"],"properties":{"count":{"type":"number"},"error":{"type":"string","enum":["quota_exceeded","scheduled_post_limit_exceeded"]},"limit":{"type":"number"}},"additionalProperties":false}}}}},"operationId":"postV1BrandContents"},"get":{"tags":["SNS Contents"],"summary":"List Ankk SNS content work items","description":"Lists Ankk-managed content records, including drafts of publish work, scheduled content, failed publish attempts, and published content linked to provider post identity when available.","parameters":[{"name":"connection_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"has_provider_post","in":"query","required":false,"schema":{"type":"string"}},{"name":"provider_post_status","in":"query","required":false,"schema":{"type":"string"}},{"name":"source","in":"query","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"type":"object","required":["content_id","brand_ref","connection_id","sns_type","source","status","title","text","media","hashtags","provider_settings","provider_post_id","provider_post_status","permalink","published_at","created_by_user_id","created_at","updated_at","latest_publish_job","latest_delete_job"],"properties":{"content_id":{"type":"string"},"brand_ref":{"type":"string"},"connection_id":{"type":"string"},"sns_type":{"type":"string"},"source":{"type":"string"},"status":{"type":"string"},"title":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"text":{"type":"string"},"media":{"type":"array","items":{"type":"object","patternProperties":{"^(.*)$":{}}}},"hashtags":{"type":"array","items":{"type":"string"}},"provider_settings":{"type":"object","patternProperties":{"^(.*)$":{}}},"provider_post_id":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"provider_post_status":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"permalink":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"published_at":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"created_by_user_id":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"latest_publish_job":{"nullable":true,"anyOf":[{"type":"object","required":["last_error_code","last_error_message","publish_availability","publish_recovery","publish_job_id","status","scheduled_for"],"properties":{"last_error_code":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"last_error_message":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"publish_availability":{"nullable":true,"anyOf":[{"anyOf":[{"const":"review_disabled","type":"string"},{"const":"permission_unverified","type":"string"},{"const":"permission_required","type":"string"},{"const":"unsupported","type":"string"}]},{"type":"null"}]},"publish_recovery":{"nullable":true,"anyOf":[{"anyOf":[{"const":"reauthorize","type":"string"},{"const":"contact_support","type":"string"}]},{"type":"null"}]},"publish_job_id":{"type":"string"},"status":{"type":"string"},"scheduled_for":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]}}},{"type":"null"}]},"latest_delete_job":{"nullable":true,"anyOf":[{"type":"object","required":["delete_job_id","last_error_code","last_error_message","scheduled_for","status"],"properties":{"delete_job_id":{"type":"string"},"last_error_code":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"last_error_message":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"scheduled_for":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string"}}},{"type":"null"}]}},"additionalProperties":false}}},"additionalProperties":false}}}},"400":{"description":"Response for status 400","content":{"application/json":{"schema":{"type":"object","required":["error","message","param"],"properties":{"error":{"const":"invalid_id_format","type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"additionalProperties":false}}}}},"operationId":"getV1BrandContents"}},"/v1/brand/contents/{content_id}":{"get":{"tags":["SNS Contents"],"summary":"Get Ankk SNS content work item","description":"Returns one Ankk-managed content record with publish job state and provider post identity fields when the content has reached the provider.","parameters":[{"name":"content_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["content_id","brand_ref","connection_id","sns_type","source","status","title","text","media","hashtags","provider_settings","provider_post_id","provider_post_status","permalink","published_at","created_by_user_id","created_at","updated_at","latest_publish_job","latest_delete_job"],"properties":{"content_id":{"type":"string"},"brand_ref":{"type":"string"},"connection_id":{"type":"string"},"sns_type":{"type":"string"},"source":{"type":"string"},"status":{"type":"string"},"title":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"text":{"type":"string"},"media":{"type":"array","items":{"type":"object","patternProperties":{"^(.*)$":{}}}},"hashtags":{"type":"array","items":{"type":"string"}},"provider_settings":{"type":"object","patternProperties":{"^(.*)$":{}}},"provider_post_id":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"provider_post_status":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"permalink":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"published_at":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"created_by_user_id":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"latest_publish_job":{"nullable":true,"anyOf":[{"type":"object","required":["last_error_code","last_error_message","publish_availability","publish_recovery","publish_job_id","status","scheduled_for"],"properties":{"last_error_code":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"last_error_message":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"publish_availability":{"nullable":true,"anyOf":[{"anyOf":[{"const":"review_disabled","type":"string"},{"const":"permission_unverified","type":"string"},{"const":"permission_required","type":"string"},{"const":"unsupported","type":"string"}]},{"type":"null"}]},"publish_recovery":{"nullable":true,"anyOf":[{"anyOf":[{"const":"reauthorize","type":"string"},{"const":"contact_support","type":"string"}]},{"type":"null"}]},"publish_job_id":{"type":"string"},"status":{"type":"string"},"scheduled_for":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]}}},{"type":"null"}]},"latest_delete_job":{"nullable":true,"anyOf":[{"type":"object","required":["delete_job_id","last_error_code","last_error_message","scheduled_for","status"],"properties":{"delete_job_id":{"type":"string"},"last_error_code":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"last_error_message":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"scheduled_for":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string"}}},{"type":"null"}]}},"additionalProperties":false}}}},"400":{"description":"Response for status 400","content":{"application/json":{"schema":{"type":"object","required":["error","message","param"],"properties":{"error":{"const":"invalid_id_format","type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"additionalProperties":false}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"const":"sns_content_not_found","type":"string"}},"additionalProperties":false}}}}},"operationId":"getV1BrandContentsByContent_id"}},"/v1/brand/contents/{content_id}/cancel":{"post":{"tags":["SNS Contents"],"summary":"Cancel scheduled SNS content","description":"Cancels content that is still scheduled and has not been sent to the provider by removing its pending publish job and marking the content deleted.","parameters":[{"name":"content_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["status","message"],"properties":{"status":{"const":"accepted","type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"400":{"description":"Response for status 400","content":{"application/json":{"schema":{"type":"object","required":["error","message","param"],"properties":{"error":{"const":"invalid_id_format","type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"additionalProperties":false}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"const":"sns_content_not_found","type":"string"}},"additionalProperties":false}}}},"409":{"description":"Response for status 409","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"const":"sns_content_not_cancellable","type":"string"}},"additionalProperties":false}}}}},"operationId":"postV1BrandContentsByContent_idCancel"}},"/v1/brand/comments":{"get":{"tags":["Comments"],"summary":"List comments","parameters":[{"name":"content_id","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"type":"object","required":["comment_id","content_id","provider_comment_id","text_preview"],"properties":{"comment_id":{"type":"string"},"content_id":{"type":"string"},"provider_comment_id":{"type":"string"},"text_preview":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false}}}},"400":{"description":"Response for status 400","content":{"application/json":{"schema":{"anyOf":[{"type":"object","required":["error","message","param"],"properties":{"error":{"const":"invalid_id_format","type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"additionalProperties":false},{"type":"object","required":["error","message"],"properties":{"error":{"type":"string"},"message":{"type":"string"}}}]}}}},"403":{"description":"Response for status 403","content":{"application/json":{"schema":{"type":"object","required":["action","availability","error","message"],"properties":{"action":{"type":"string"},"availability":{"type":"string","enum":["review_disabled","permission_unverified","permission_required","unsupported"]},"error":{"const":"conversation_authorization_blocked","type":"string"},"message":{"type":"string"},"recovery":{"type":"string","enum":["reauthorize","contact_support"]}},"additionalProperties":false}}}}},"operationId":"getV1BrandComments"},"post":{"tags":["Comments"],"summary":"Create top-level comment","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["idempotency_key","target","text"],"properties":{"idempotency_key":{"type":"string"},"target":{"type":"object","required":["content_id"],"properties":{"content_id":{"type":"string"}}},"text":{"type":"string"},"scheduled_for":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["idempotency_key","target","text"],"properties":{"idempotency_key":{"type":"string"},"target":{"type":"object","required":["content_id"],"properties":{"content_id":{"type":"string"}}},"text":{"type":"string"},"scheduled_for":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false}},"multipart/form-data":{"schema":{"type":"object","required":["idempotency_key","target","text"],"properties":{"idempotency_key":{"type":"string"},"target":{"type":"object","required":["content_id"],"properties":{"content_id":{"type":"string"}}},"text":{"type":"string"},"scheduled_for":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false}}}},"responses":{"202":{"description":"Response for status 202","content":{"application/json":{"schema":{"type":"object","required":["brand_ref","comment_id","comment_job_id","content_id","duplicate","provider_comment_id","status"],"properties":{"brand_ref":{"type":"string"},"comment_id":{"type":"string"},"comment_job_id":{"type":"string"},"content_id":{"type":"string"},"duplicate":{"type":"boolean"},"provider_comment_id":{"type":"string"},"status":{"type":"string"}},"additionalProperties":false}}}},"400":{"description":"Response for status 400","content":{"application/json":{"schema":{"anyOf":[{"type":"object","required":["error","message","param"],"properties":{"error":{"const":"invalid_id_format","type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"additionalProperties":false},{"type":"object","required":["error","message"],"properties":{"error":{"type":"string"},"message":{"type":"string"}}}]}}}},"403":{"description":"Response for status 403","content":{"application/json":{"schema":{"anyOf":[{"type":"object","required":["error","reason"],"properties":{"error":{"const":"entitlement_blocked","type":"string"},"reason":{"anyOf":[{"const":"missing_projection","type":"string"},{"const":"stale_projection","type":"string"}]},"stale_after":{"type":"string"}}},{"type":"object","required":["action","availability","error","message"],"properties":{"action":{"type":"string"},"availability":{"anyOf":[{"const":"review_disabled","type":"string"},{"const":"permission_unverified","type":"string"},{"const":"permission_required","type":"string"},{"const":"unsupported","type":"string"}]},"error":{"const":"conversation_authorization_blocked","type":"string"},"message":{"type":"string"},"recovery":{"anyOf":[{"const":"reauthorize","type":"string"},{"const":"contact_support","type":"string"}]}},"additionalProperties":false}]}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"type":"object","required":["error","message","content_id"],"properties":{"error":{"type":"string","enum":["sns_content_not_found","sns_content_not_commentable","sns_conversation_collection_unavailable"]},"message":{"type":"string"},"content_id":{"type":"string"}},"additionalProperties":false}}}},"409":{"description":"Response for status 409","content":{"application/json":{"schema":{"anyOf":[{"type":"object","required":["error","message","content_id"],"properties":{"error":{"anyOf":[{"const":"sns_content_not_found","type":"string"},{"const":"sns_content_not_commentable","type":"string"},{"const":"sns_conversation_collection_unavailable","type":"string"}]},"message":{"type":"string"},"content_id":{"type":"string"}},"additionalProperties":false},{"type":"object","required":["error","message","comment_job_id"],"properties":{"error":{"const":"idempotency_conflict","type":"string"},"message":{"type":"string"},"comment_job_id":{"type":"string"}}}]}}}},"429":{"description":"Response for status 429","content":{"application/json":{"schema":{"type":"object","required":["count","counter_name","error","limit"],"properties":{"count":{"type":"number"},"counter_name":{"type":"string","enum":["publish_jobs","reply_jobs"]},"error":{"const":"quota_exceeded","type":"string"},"limit":{"type":"number"}},"additionalProperties":false}}}}},"operationId":"postV1BrandComments"}},"/v1/brand/comment-refresh-jobs":{"post":{"tags":["Comments"],"summary":"Create comment refresh job","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["content_id"],"properties":{"content_id":{"type":"string"}},"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["content_id"],"properties":{"content_id":{"type":"string"}},"additionalProperties":false}},"multipart/form-data":{"schema":{"type":"object","required":["content_id"],"properties":{"content_id":{"type":"string"}},"additionalProperties":false}}}},"responses":{"202":{"description":"Response for status 202","content":{"application/json":{"schema":{"type":"object","required":["available_at","brand_ref","comment_refresh_job_id","content_id","last_error_code","last_error_message","last_synced_at","reason","status"],"properties":{"available_at":{"type":"string"},"brand_ref":{"type":"string"},"comment_refresh_job_id":{"type":"string"},"content_id":{"type":"string"},"last_error_code":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"last_error_message":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"last_synced_at":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"reason":{"type":"string"},"status":{"type":"string"}},"additionalProperties":false}}}},"400":{"description":"Response for status 400","content":{"application/json":{"schema":{"anyOf":[{"type":"object","required":["error","message","param"],"properties":{"error":{"const":"invalid_id_format","type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"additionalProperties":false},{"type":"object","required":["error","message"],"properties":{"error":{"type":"string"},"message":{"type":"string"}}}]}}}},"403":{"description":"Response for status 403","content":{"application/json":{"schema":{"type":"object","required":["action","availability","error","message"],"properties":{"action":{"type":"string"},"availability":{"type":"string","enum":["review_disabled","permission_unverified","permission_required","unsupported"]},"error":{"const":"conversation_authorization_blocked","type":"string"},"message":{"type":"string"},"recovery":{"type":"string","enum":["reauthorize","contact_support"]}},"additionalProperties":false}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"type":"object","required":["error","message","content_id"],"properties":{"error":{"type":"string","enum":["sns_content_not_found","sns_content_not_commentable","sns_conversation_collection_unavailable"]},"message":{"type":"string"},"content_id":{"type":"string"}},"additionalProperties":false}}}},"409":{"description":"Response for status 409","content":{"application/json":{"schema":{"type":"object","required":["error","message","content_id"],"properties":{"error":{"type":"string","enum":["sns_content_not_found","sns_content_not_commentable","sns_conversation_collection_unavailable"]},"message":{"type":"string"},"content_id":{"type":"string"}},"additionalProperties":false}}}}},"operationId":"postV1BrandComment-refresh-jobs"}},"/v1/brand/comment-refresh-jobs/{comment_refresh_job_id}":{"get":{"tags":["Comments"],"summary":"Get comment refresh job","parameters":[{"name":"comment_refresh_job_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["available_at","brand_ref","comment_refresh_job_id","content_id","last_error_code","last_error_message","last_synced_at","reason","status"],"properties":{"available_at":{"type":"string"},"brand_ref":{"type":"string"},"comment_refresh_job_id":{"type":"string"},"content_id":{"type":"string"},"last_error_code":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"last_error_message":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"last_synced_at":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"reason":{"type":"string"},"status":{"type":"string"}},"additionalProperties":false}}}},"400":{"description":"Response for status 400","content":{"application/json":{"schema":{"type":"object","required":["error","message","param"],"properties":{"error":{"const":"invalid_id_format","type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"additionalProperties":false}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"const":"comment_refresh_job_not_found","type":"string"}},"additionalProperties":false}}}}},"operationId":"getV1BrandComment-refresh-jobsByComment_refresh_job_id"}},"/v1/brand/comments/{comment_id}":{"get":{"tags":["Comments"],"summary":"Get comment","parameters":[{"name":"comment_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["comment_id","content_id","provider_comment_id","text_preview"],"properties":{"comment_id":{"type":"string"},"content_id":{"type":"string"},"provider_comment_id":{"type":"string"},"text_preview":{"type":"string"}},"additionalProperties":false}}}},"400":{"description":"Response for status 400","content":{"application/json":{"schema":{"anyOf":[{"type":"object","required":["error","message","param"],"properties":{"error":{"const":"invalid_id_format","type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"additionalProperties":false},{"type":"object","required":["error","message"],"properties":{"error":{"type":"string"},"message":{"type":"string"}}}]}}}},"403":{"description":"Response for status 403","content":{"application/json":{"schema":{"type":"object","required":["action","availability","error","message"],"properties":{"action":{"type":"string"},"availability":{"type":"string","enum":["review_disabled","permission_unverified","permission_required","unsupported"]},"error":{"const":"conversation_authorization_blocked","type":"string"},"message":{"type":"string"},"recovery":{"type":"string","enum":["reauthorize","contact_support"]}},"additionalProperties":false}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"const":"comment_not_found","type":"string"}},"additionalProperties":false}}}}},"operationId":"getV1BrandCommentsByComment_id"}},"/v1/brand/comment-moderation-jobs/{job_id}":{"get":{"tags":["Comments"],"summary":"Get comment moderation job","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["id","comment_id","action","status","error_code"],"properties":{"id":{"type":"string"},"comment_id":{"type":"string"},"action":{"type":"string","enum":["hide","unhide","delete"]},"status":{"type":"string"},"error_code":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false}}}},"400":{"description":"Response for status 400","content":{"application/json":{"schema":{"type":"object","required":["error","message","param"],"properties":{"error":{"const":"invalid_id_format","type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"additionalProperties":false}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"const":"moderation_job_not_found","type":"string"}},"additionalProperties":false}}}}},"operationId":"getV1BrandComment-moderation-jobsByJob_id"}},"/v1/brand/comments/{comment_id}/moderation-actions":{"post":{"tags":["Comments"],"summary":"Create comment moderation action","parameters":[{"name":"comment_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["action","idempotency_key"],"properties":{"action":{"type":"string","enum":["hide","unhide","delete"]},"idempotency_key":{"minLength":1,"maxLength":200,"type":"string"}},"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["action","idempotency_key"],"properties":{"action":{"type":"string","enum":["hide","unhide","delete"]},"idempotency_key":{"minLength":1,"maxLength":200,"type":"string"}},"additionalProperties":false}},"multipart/form-data":{"schema":{"type":"object","required":["action","idempotency_key"],"properties":{"action":{"type":"string","enum":["hide","unhide","delete"]},"idempotency_key":{"minLength":1,"maxLength":200,"type":"string"}},"additionalProperties":false}}}},"responses":{"202":{"description":"Response for status 202","content":{"application/json":{"schema":{"type":"object","allOf":[{"type":"object","required":["id","comment_id","action","status","error_code"],"properties":{"id":{"type":"string"},"comment_id":{"type":"string"},"action":{"anyOf":[{"const":"hide","type":"string"},{"const":"unhide","type":"string"},{"const":"delete","type":"string"}]},"status":{"type":"string"},"error_code":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false},{"type":"object","required":["duplicate"],"properties":{"duplicate":{"type":"boolean"}}}],"additionalProperties":false}}}},"400":{"description":"Response for status 400","content":{"application/json":{"schema":{"anyOf":[{"type":"object","required":["error","message","param"],"properties":{"error":{"const":"invalid_id_format","type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"additionalProperties":false},{"type":"object","required":["error","message"],"properties":{"error":{"type":"string"},"message":{"type":"string"}}}]}}}},"403":{"description":"Response for status 403","content":{"application/json":{"schema":{"type":"object","required":["action","availability","error","message"],"properties":{"action":{"type":"string"},"availability":{"type":"string","enum":["review_disabled","permission_unverified","permission_required","unsupported"]},"error":{"const":"conversation_authorization_blocked","type":"string"},"message":{"type":"string"},"recovery":{"type":"string","enum":["reauthorize","contact_support"]}},"additionalProperties":false}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"const":"comment_not_found","type":"string"}},"additionalProperties":false}}}},"409":{"description":"Response for status 409","content":{"application/json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"operationId":"postV1BrandCommentsByComment_idModeration-actions"}},"/v1/brand/reply-jobs":{"post":{"tags":["Reply Jobs"],"summary":"Create reply job","description":"Asynchronous write: accepted means the reply job was validated, persisted, and scheduled.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["comment_id","idempotency_key","text"],"properties":{"comment_id":{"type":"string"},"idempotency_key":{"type":"string"},"text":{"type":"string"},"scheduled_for":{"type":"string"}},"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["comment_id","idempotency_key","text"],"properties":{"comment_id":{"type":"string"},"idempotency_key":{"type":"string"},"text":{"type":"string"},"scheduled_for":{"type":"string"}},"additionalProperties":false}},"multipart/form-data":{"schema":{"type":"object","required":["comment_id","idempotency_key","text"],"properties":{"comment_id":{"type":"string"},"idempotency_key":{"type":"string"},"text":{"type":"string"},"scheduled_for":{"type":"string"}},"additionalProperties":false}}}},"responses":{"202":{"description":"Response for status 202","content":{"application/json":{"schema":{"type":"object","required":["reply_job_id","brand_ref","comment_id","content_id","duplicate","last_error_code","last_error_message","reply_availability","reply_recovery","status"],"properties":{"reply_job_id":{"type":"string"},"brand_ref":{"type":"string"},"comment_id":{"type":"string"},"content_id":{"type":"string"},"duplicate":{"type":"boolean"},"last_error_code":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"last_error_message":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"reply_availability":{"nullable":true,"anyOf":[{"anyOf":[{"const":"review_disabled","type":"string"},{"const":"permission_unverified","type":"string"},{"const":"permission_required","type":"string"},{"const":"unsupported","type":"string"}]},{"type":"null"}]},"reply_recovery":{"nullable":true,"anyOf":[{"anyOf":[{"const":"reauthorize","type":"string"},{"const":"contact_support","type":"string"}]},{"type":"null"}]},"status":{"type":"string"}},"additionalProperties":false}}}},"400":{"description":"Response for status 400","content":{"application/json":{"schema":{"anyOf":[{"type":"object","required":["error","message","param"],"properties":{"error":{"const":"invalid_id_format","type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"additionalProperties":false},{"type":"object","required":["error","message"],"properties":{"error":{"type":"string"},"message":{"type":"string"}}}]}}}},"403":{"description":"Response for status 403","content":{"application/json":{"schema":{"anyOf":[{"type":"object","required":["error","reason"],"properties":{"error":{"const":"entitlement_blocked","type":"string"},"reason":{"anyOf":[{"const":"missing_projection","type":"string"},{"const":"stale_projection","type":"string"}]},"stale_after":{"type":"string"}}},{"type":"object","required":["action","availability","error","message"],"properties":{"action":{"type":"string"},"availability":{"anyOf":[{"const":"review_disabled","type":"string"},{"const":"permission_unverified","type":"string"},{"const":"permission_required","type":"string"},{"const":"unsupported","type":"string"}]},"error":{"const":"conversation_authorization_blocked","type":"string"},"message":{"type":"string"},"recovery":{"anyOf":[{"const":"reauthorize","type":"string"},{"const":"contact_support","type":"string"}]}},"additionalProperties":false}]}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"type":"object","required":["comment_id","error","message"],"properties":{"comment_id":{"type":"string"},"error":{"const":"comment_not_found","type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"409":{"description":"Response for status 409","content":{"application/json":{"schema":{"anyOf":[{"type":"object","required":["error","message","reply_job_id"],"properties":{"error":{"const":"idempotency_conflict","type":"string"},"message":{"type":"string"},"reply_job_id":{"type":"string"}}},{"type":"object","required":["code","error","message"],"properties":{"code":{"anyOf":[{"const":"comment_not_found","type":"string"},{"const":"content_not_found","type":"string"},{"const":"permission_required","type":"string"}]},"error":{"const":"reply_target_unavailable","type":"string"},"message":{"type":"string"}}}]}}}},"429":{"description":"Response for status 429","content":{"application/json":{"schema":{"type":"object","required":["count","counter_name","error","limit"],"properties":{"count":{"type":"number"},"counter_name":{"type":"string","enum":["publish_jobs","reply_jobs"]},"error":{"const":"quota_exceeded","type":"string"},"limit":{"type":"number"}},"additionalProperties":false}}}}},"operationId":"postV1BrandReply-jobs"},"get":{"tags":["Reply Jobs"],"summary":"List reply jobs","responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"type":"object","required":["reply_job_id","brand_ref","comment_id","content_id","duplicate","last_error_code","last_error_message","reply_availability","reply_recovery","status"],"properties":{"reply_job_id":{"type":"string"},"brand_ref":{"type":"string"},"comment_id":{"type":"string"},"content_id":{"type":"string"},"duplicate":{"type":"boolean"},"last_error_code":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"last_error_message":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"reply_availability":{"nullable":true,"anyOf":[{"anyOf":[{"const":"review_disabled","type":"string"},{"const":"permission_unverified","type":"string"},{"const":"permission_required","type":"string"},{"const":"unsupported","type":"string"}]},{"type":"null"}]},"reply_recovery":{"nullable":true,"anyOf":[{"anyOf":[{"const":"reauthorize","type":"string"},{"const":"contact_support","type":"string"}]},{"type":"null"}]},"status":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false}}}}},"operationId":"getV1BrandReply-jobs"}},"/v1/brand/reply-jobs/{reply_job_id}":{"get":{"tags":["Reply Jobs"],"summary":"Get reply job","parameters":[{"name":"reply_job_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["reply_job_id","brand_ref","comment_id","content_id","duplicate","last_error_code","last_error_message","reply_availability","reply_recovery","status"],"properties":{"reply_job_id":{"type":"string"},"brand_ref":{"type":"string"},"comment_id":{"type":"string"},"content_id":{"type":"string"},"duplicate":{"type":"boolean"},"last_error_code":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"last_error_message":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"reply_availability":{"nullable":true,"anyOf":[{"anyOf":[{"const":"review_disabled","type":"string"},{"const":"permission_unverified","type":"string"},{"const":"permission_required","type":"string"},{"const":"unsupported","type":"string"}]},{"type":"null"}]},"reply_recovery":{"nullable":true,"anyOf":[{"anyOf":[{"const":"reauthorize","type":"string"},{"const":"contact_support","type":"string"}]},{"type":"null"}]},"status":{"type":"string"}},"additionalProperties":false}}}},"400":{"description":"Response for status 400","content":{"application/json":{"schema":{"type":"object","required":["error","message","param"],"properties":{"error":{"const":"invalid_id_format","type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"additionalProperties":false}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"const":"reply_job_not_found","type":"string"}},"additionalProperties":false}}}}},"operationId":"getV1BrandReply-jobsByReply_job_id"}},"/v1/brand/webhooks":{"get":{"tags":["Webhook Subscriptions"],"summary":"List webhook subscriptions","responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"type":"object","required":["webhook_id","brand_ref","event_types","target_url","status"],"properties":{"webhook_id":{"type":"string"},"brand_ref":{"type":"string"},"event_types":{"type":"array","items":{"type":"string"}},"target_url":{"type":"string"},"status":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false}}}}},"operationId":"getV1BrandWebhooks"},"post":{"tags":["Webhook Subscriptions"],"summary":"Create webhook subscription","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["target_url","event_types"],"properties":{"target_url":{"type":"string"},"event_types":{"minItems":1,"type":"array","items":{"type":"string"}}},"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["target_url","event_types"],"properties":{"target_url":{"type":"string"},"event_types":{"minItems":1,"type":"array","items":{"type":"string"}}},"additionalProperties":false}},"multipart/form-data":{"schema":{"type":"object","required":["target_url","event_types"],"properties":{"target_url":{"type":"string"},"event_types":{"minItems":1,"type":"array","items":{"type":"string"}}},"additionalProperties":false}}}},"responses":{"201":{"description":"Response for status 201","content":{"application/json":{"schema":{"type":"object","required":["webhook_id","brand_ref","event_types","target_url","status"],"properties":{"webhook_id":{"type":"string"},"brand_ref":{"type":"string"},"event_types":{"type":"array","items":{"type":"string"}},"target_url":{"type":"string"},"status":{"type":"string"}},"additionalProperties":false}}}},"400":{"description":"Response for status 400","content":{"application/json":{"schema":{"anyOf":[{"type":"object","required":["error","supported_event_types"],"properties":{"error":{"const":"unsupported_webhook_event_type","type":"string"},"supported_event_types":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["error","message","reason"],"properties":{"error":{"const":"invalid_webhook_target_url","type":"string"},"message":{"type":"string"},"reason":{"type":"string"}}}]}}}},"403":{"description":"Response for status 403","content":{"application/json":{"schema":{"type":"object","required":["error","reason"],"properties":{"error":{"const":"entitlement_blocked","type":"string"},"reason":{"type":"string"},"stale_after":{"type":"string"}},"additionalProperties":false}}}},"429":{"description":"Response for status 429","content":{"application/json":{"schema":{"type":"object","required":["count","error","limit","quota_name"],"properties":{"count":{"type":"number"},"error":{"const":"quota_exceeded","type":"string"},"limit":{"type":"number"},"quota_name":{"const":"customer_webhook_endpoints","type":"string"}},"additionalProperties":false}}}}},"operationId":"postV1BrandWebhooks"}},"/v1/brand/webhooks/{webhook_id}":{"get":{"tags":["Webhook Subscriptions"],"summary":"Get webhook subscription","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["webhook_id","brand_ref","event_types","target_url","status"],"properties":{"webhook_id":{"type":"string"},"brand_ref":{"type":"string"},"event_types":{"type":"array","items":{"type":"string"}},"target_url":{"type":"string"},"status":{"type":"string"}},"additionalProperties":false}}}},"400":{"description":"Response for status 400","content":{"application/json":{"schema":{"type":"object","required":["error","message","param"],"properties":{"error":{"const":"invalid_id_format","type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"additionalProperties":false}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"const":"webhook_subscription_not_found","type":"string"}},"additionalProperties":false}}}}},"operationId":"getV1BrandWebhooksByWebhook_id"},"patch":{"tags":["Webhook Subscriptions"],"summary":"Update webhook subscription","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"target_url":{"type":"string"},"event_types":{"minItems":1,"type":"array","items":{"type":"string"}},"status":{"type":"string","enum":["active","paused"]}},"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"target_url":{"type":"string"},"event_types":{"minItems":1,"type":"array","items":{"type":"string"}},"status":{"type":"string","enum":["active","paused"]}},"additionalProperties":false}},"multipart/form-data":{"schema":{"type":"object","properties":{"target_url":{"type":"string"},"event_types":{"minItems":1,"type":"array","items":{"type":"string"}},"status":{"type":"string","enum":["active","paused"]}},"additionalProperties":false}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["webhook_id","brand_ref","event_types","target_url","status"],"properties":{"webhook_id":{"type":"string"},"brand_ref":{"type":"string"},"event_types":{"type":"array","items":{"type":"string"}},"target_url":{"type":"string"},"status":{"type":"string"}},"additionalProperties":false}}}},"400":{"description":"Response for status 400","content":{"application/json":{"schema":{"anyOf":[{"type":"object","required":["error","supported_event_types"],"properties":{"error":{"const":"unsupported_webhook_event_type","type":"string"},"supported_event_types":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["error","message","param"],"properties":{"error":{"const":"invalid_id_format","type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"additionalProperties":false},{"type":"object","required":["error","message","reason"],"properties":{"error":{"const":"invalid_webhook_target_url","type":"string"},"message":{"type":"string"},"reason":{"type":"string"}}}]}}}},"403":{"description":"Response for status 403","content":{"application/json":{"schema":{"type":"object","required":["error","reason"],"properties":{"error":{"const":"entitlement_blocked","type":"string"},"reason":{"type":"string"},"stale_after":{"type":"string"}},"additionalProperties":false}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"const":"webhook_subscription_not_found","type":"string"}},"additionalProperties":false}}}},"429":{"description":"Response for status 429","content":{"application/json":{"schema":{"type":"object","required":["count","error","limit","quota_name"],"properties":{"count":{"type":"number"},"error":{"const":"quota_exceeded","type":"string"},"limit":{"type":"number"},"quota_name":{"const":"customer_webhook_endpoints","type":"string"}},"additionalProperties":false}}}}},"operationId":"patchV1BrandWebhooksByWebhook_id"},"delete":{"tags":["Webhook Subscriptions"],"summary":"Delete webhook subscription","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["status","message"],"properties":{"status":{"const":"accepted","type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"400":{"description":"Response for status 400","content":{"application/json":{"schema":{"type":"object","required":["error","message","param"],"properties":{"error":{"const":"invalid_id_format","type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"additionalProperties":false}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"const":"webhook_subscription_not_found","type":"string"}},"additionalProperties":false}}}}},"operationId":"deleteV1BrandWebhooksByWebhook_id"}},"/":{"get":{"security":[],"operationId":"getIndex"}},"/v1/health":{"get":{"security":[],"tags":["Health"],"summary":"Check service health","operationId":"getV1Health"}}}}