{"info":{"title":"Schedulin API","version":"0.1.0","description":"Schedulin API for social media management.\n\n## Authentication\n\nAll API requests require authentication via the `x-api-key` header.\n\nYou can generate an API key from your [Schedulin dashboard](https://dashboard.schedulin.app/settings/api-keys).\n\n```\nx-api-key: your-api-key\n```"},"servers":[{"url":"https://api.schedulin.app"}],"security":[{"apiKey":[]}],"openapi":"3.1.1","components":{"schemas":{"Post":{"type":"object","properties":{"id":{"type":"string"},"externalId":{"anyOf":[{"type":"string"},{"type":"null"}]},"caption":{"type":"string"},"status":{"$ref":"#/components/schemas/PostStatus"},"approvalStatus":{"$ref":"#/components/schemas/PostApprovalStatus"},"approvalRequestedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"approvalRequestedBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"approvedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"approvedBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"rejectionReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"scheduledAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"platformConfiguration":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"socialAccountId":{"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","externalId","caption","status","approvalStatus","approvalRequestedAt","approvalRequestedBy","approvedAt","approvedBy","rejectionReason","scheduledAt","platformConfiguration","socialAccountId","url","createdAt","updatedAt"]},"PostWithRelations":{"type":"object","properties":{"id":{"type":"string"},"externalId":{"anyOf":[{"type":"string"},{"type":"null"}]},"caption":{"type":"string"},"status":{"$ref":"#/components/schemas/PostStatus"},"approvalStatus":{"$ref":"#/components/schemas/PostApprovalStatus"},"approvalRequestedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"approvalRequestedBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"approvedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"approvedBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"rejectionReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"scheduledAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"platformConfiguration":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"socialAccountId":{"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"socialAccount":{"$ref":"#/components/schemas/SocialAccount"},"media":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"thumbnail_timestamp_ms":{"anyOf":[{"type":"number"},{"type":"null"}]},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"enum":["user","business"],"type":"string"},"platform":{"enum":["bluesky","facebook","google_business_profile","instagram","linkedin","pinterest","reddit","snapchat","threads","tiktok","twitter","youtube","mastodon","telegram","devto","hashnode","medium","wordpress","lemmy","nostr","discord","dribbble","farcaster","kick","listmonk","mewe","moltbook","skool","slack","twitch","vk","whop"],"type":"string"},"x":{"type":"number","minimum":0,"maximum":1},"y":{"type":"number","minimum":0,"maximum":1}},"required":["id","type","platform"]}},"alt":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"skip_processing":{"type":"boolean","default":false}},"required":["url"]}},"tags":{"type":"array","items":{"$ref":"#/components/schemas/Tag"}}},"required":["id","externalId","caption","status","approvalStatus","approvalRequestedAt","approvalRequestedBy","approvedAt","approvedBy","rejectionReason","scheduledAt","platformConfiguration","socialAccountId","url","createdAt","updatedAt","socialAccount","media","tags"]},"Media":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"name":{"type":"string"},"mimeType":{"type":"string"},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"duration":{"anyOf":[{"type":"number"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"bucket":{"type":"string"},"key":{"type":"string"},"size":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","url","name","mimeType","width","height","duration","createdAt","updatedAt","bucket","key","size"]},"PresignedPost":{"type":"object","properties":{"url":{"type":"string"},"key":{"type":"string"},"method":{"const":"PUT"}},"required":["url","key","method"]},"Tag":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"color":{"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","name","color","createdAt","updatedAt"]},"SocialAccount":{"type":"object","properties":{"id":{"type":"string"},"platform":{"$ref":"#/components/schemas/SocialPlatform"},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageProcessingStatus":{"$ref":"#/components/schemas/ImageProcessingStatus"},"username":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["connected","disconnected"],"type":"string"},"disconnectedReason":{"$ref":"#/components/schemas/SocialAccountDisconnectedReason"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"refreshTokenValid":{"type":"boolean"}},"required":["id","platform","imageUrl","imageProcessingStatus","username","status","disconnectedReason","createdAt","updatedAt","refreshTokenValid"]},"SocialAccountPublic":{"type":"object","properties":{"id":{"type":"string"},"platform":{"$ref":"#/components/schemas/SocialPlatform"},"username":{"anyOf":[{"type":"string"},{"type":"null"}]},"userId":{"type":"string"},"profilePhotoUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["connected","disconnected"],"type":"string"},"externalId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","platform","username","userId","profilePhotoUrl","status","externalId"]},"PostStatus":{"enum":["SCHEDULED","PROCESSING","COMPLETED","DRAFT","FAILED"],"type":"string"},"PostApprovalStatus":{"enum":["DRAFT","PENDING_APPROVAL","APPROVED","REJECTED"],"type":"string"},"AnalyticsStatus":{"enum":["IDLE","PROCESSING","FAILED"],"type":"string"},"SocialPlatform":{"enum":["bluesky","facebook","google_business_profile","instagram","linkedin","pinterest","reddit","snapchat","threads","tiktok","twitter","youtube","mastodon","telegram","devto","hashnode","medium","wordpress","lemmy","nostr","discord","dribbble","farcaster","kick","listmonk","mewe","moltbook","skool","slack","twitch","vk","whop"],"type":"string"},"ImageProcessingStatus":{"enum":["PENDING","PROCESSING","PROCESSED","FAILED"],"type":"string"},"SocialAccountDisconnectedReason":{"anyOf":[{"enum":["TOKEN_EXPIRED","TOKEN_INVALID","TOKEN_REVOKED","REFRESH_FAILED","ACCOUNT_SUSPENDED","PERMISSION_DENIED","EMAIL_UNCONFIRMED"],"type":"string"},{"type":"null"}]},"PostCreate":{"type":"object","properties":{"caption":{"type":"string","maxLength":5000},"title":{"type":"string","maxLength":100},"scheduledAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"socialAccountId":{"type":"string"},"media":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"thumbnail_timestamp_ms":{"anyOf":[{"type":"number"},{"type":"null"}]},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"enum":["user","business"],"type":"string"},"platform":{"enum":["bluesky","facebook","google_business_profile","instagram","linkedin","pinterest","reddit","snapchat","threads","tiktok","twitter","youtube","mastodon","telegram","devto","hashnode","medium","wordpress","lemmy","nostr","discord","dribbble","farcaster","kick","listmonk","mewe","moltbook","skool","slack","twitch","vk","whop"],"type":"string"},"x":{"type":"number","minimum":0,"maximum":1},"y":{"type":"number","minimum":0,"maximum":1}},"required":["id","type","platform"]}},"alt":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"skip_processing":{"type":"boolean","default":false},"name":{"type":"string"},"mimeType":{"type":"string"},"width":{"type":"number"},"height":{"type":"number"},"size":{"type":"number"},"duration":{"type":"number","minimum":0}},"required":["url"]},"default":[]},"thumbnail":{"type":"object","properties":{"url":{"type":"string"},"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"thumbnail_timestamp_ms":{"anyOf":[{"type":"number"},{"type":"null"}]},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"enum":["user","business"],"type":"string"},"platform":{"enum":["bluesky","facebook","google_business_profile","instagram","linkedin","pinterest","reddit","snapchat","threads","tiktok","twitter","youtube","mastodon","telegram","devto","hashnode","medium","wordpress","lemmy","nostr","discord","dribbble","farcaster","kick","listmonk","mewe","moltbook","skool","slack","twitch","vk","whop"],"type":"string"},"x":{"type":"number","minimum":0,"maximum":1},"y":{"type":"number","minimum":0,"maximum":1}},"required":["id","type","platform"]}},"alt":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"skip_processing":{"type":"boolean","default":false},"name":{"type":"string"},"mimeType":{"type":"string"},"width":{"type":"number"},"height":{"type":"number"},"size":{"type":"number"},"duration":{"type":"number","minimum":0}},"required":["url"]},"platformConfiguration":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"tagIds":{"type":"array","items":{"type":"string"}},"action":{"enum":["schedule","queue","draft","now"],"type":"string"},"parts":{"type":"array","minItems":1,"maxItems":25,"items":{"type":"object","properties":{"caption":{"type":"string","minLength":1,"maxLength":25000},"media":{"type":"array","maxItems":4,"items":{"type":"object","properties":{"url":{"type":"string"},"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"thumbnail_timestamp_ms":{"anyOf":[{"type":"number"},{"type":"null"}]},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"enum":["user","business"],"type":"string"},"platform":{"enum":["bluesky","facebook","google_business_profile","instagram","linkedin","pinterest","reddit","snapchat","threads","tiktok","twitter","youtube","mastodon","telegram","devto","hashnode","medium","wordpress","lemmy","nostr","discord","dribbble","farcaster","kick","listmonk","mewe","moltbook","skool","slack","twitch","vk","whop"],"type":"string"},"x":{"type":"number","minimum":0,"maximum":1},"y":{"type":"number","minimum":0,"maximum":1}},"required":["id","type","platform"]}},"alt":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"skip_processing":{"type":"boolean","default":false},"name":{"type":"string"},"mimeType":{"type":"string"},"width":{"type":"number"},"height":{"type":"number"},"size":{"type":"number"},"duration":{"type":"number","minimum":0}},"required":["url"]}}},"required":["caption"]}}},"required":["caption","socialAccountId"]},"PostSearch":{"type":"object","properties":{"page":{"type":"integer","minimum":1,"maximum":100000},"status":{"enum":["SCHEDULED","PROCESSING","COMPLETED","DRAFT","FAILED"],"type":"string"},"statuses":{"type":"array","minItems":1,"maxItems":5,"items":{"enum":["SCHEDULED","PROCESSING","COMPLETED","DRAFT","FAILED"],"type":"string"}},"approvalStatus":{"enum":["DRAFT","PENDING_APPROVAL","APPROVED","REJECTED"],"type":"string"},"scheduledAt":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}}},"tagIds":{"type":"array","maxItems":100,"items":{"type":"string"}},"tagMode":{"enum":["ANY","ALL"],"type":"string"},"socialAccountIds":{"type":"array","maxItems":100,"items":{"type":"string"}},"limit":{"type":"number","minimum":1,"maximum":200,"default":200}}},"PostPublishDraft":{"type":"object","properties":{"id":{"type":"string"},"scheduledAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["id"]},"MediaUpdate":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"url":{"type":"string","format":"uri"},"mimeType":{"type":"string"},"width":{"type":"integer","minimum":0,"maximum":9007199254740991},"height":{"type":"integer","minimum":0,"maximum":9007199254740991},"size":{"type":"integer","minimum":0,"maximum":9007199254740991},"duration":{"type":"number","minimum":0}},"required":["id","url"]},"MediaSearch":{"type":"object","properties":{"page":{"type":"integer","minimum":1,"maximum":9007199254740991,"default":1},"limit":{"type":"number","minimum":1,"maximum":100,"default":10},"q":{"type":"string","maxLength":200},"type":{"enum":["image","video","all"],"type":"string"},"tagIds":{"type":"array","maxItems":100,"items":{"type":"string"}},"tagMode":{"enum":["ANY","ALL"],"type":"string"}}},"MediaSetTags":{"type":"object","properties":{"mediaId":{"type":"string","format":"uuid"},"tagIds":{"type":"array","maxItems":100,"items":{"type":"string"}}},"required":["mediaId","tagIds"]},"SocialAccountUpdate":{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["connected","disconnected"],"type":"string"}},"required":["id"]},"TagUpsert":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","minLength":1,"maxLength":50},"color":{"type":"string","pattern":"^#[0-9a-fA-F]{3,8}$"}},"required":["name","color"]},"TagSearch":{"type":"object","properties":{"q":{"type":"string"},"limit":{"type":"number","minimum":1,"maximum":50,"default":25}}},"CreatePresignedPost":{"type":"object","properties":{"contentType":{"type":"string","minLength":1,"maxLength":255},"key":{"type":"string","minLength":1,"maxLength":255},"size":{"type":"integer","minimum":0,"maximum":9007199254740991},"intent":{"enum":["post","clip-source","public-asset"],"type":"string","default":"post"}},"required":["contentType","key"]},"ErrorResponse":{"type":"object","description":"Error envelope. The machine-readable `code` and HTTP `status` are always present; the human-readable reason is in `data.message` (or `data.fieldErrors` for 422 validation errors).","properties":{"code":{"type":"string","description":"e.g. \"BAD_REQUEST\", \"UNAUTHORIZED\", \"NOT_FOUND\"."},"status":{"type":"integer"},"message":{"type":"string"},"data":{"type":"object","additionalProperties":true}},"required":["code","status"]}},"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"x-api-key","description":"API key for authentication"},"oauth2":{"type":"oauth2","description":"OAuth2 authorization code flow (PKCE supported). Each operation lists the scope it requires.","flows":{"authorizationCode":{"authorizationUrl":"https://api.schedulin.app/oauth/authorize","tokenUrl":"https://api.schedulin.app/oauth/token","scopes":{"posts:read":"View posts and drafts","posts:write":"Create, edit, and delete posts","tags:read":"View tags","tags:write":"Create, edit, and delete tags","social-accounts:read":"View connected social accounts","social-accounts:write":"Update and disconnect social accounts","channels:read":"View channels","media:read":"View media files","media:write":"Upload and delete media files","analytics:read":"View analytics data","org:read":"View organization details","ai:read":"View AI generation jobs and available voices","ai:write":"Generate AI images and videos (spends AI credits)","webhooks:read":"View webhook endpoints and delivery history","webhooks:write":"Create, edit, and delete webhook endpoints"}}}}}},"paths":{"/v0/posts":{"get":{"operationId":"v0.post.findMany","summary":"List posts","description":"Search and filter posts with various criteria including status, date range, social accounts, and tags","tags":["Posts"],"parameters":[{"name":"page","in":"query","schema":{"type":"integer","minimum":1,"maximum":100000},"allowEmptyValue":true,"allowReserved":true},{"name":"status","in":"query","schema":{"enum":["SCHEDULED","PROCESSING","COMPLETED","DRAFT","FAILED"],"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"statuses","in":"query","schema":{"type":"array","minItems":1,"maxItems":5,"items":{"enum":["SCHEDULED","PROCESSING","COMPLETED","DRAFT","FAILED"],"type":"string"}},"style":"deepObject","explode":true,"allowEmptyValue":true,"allowReserved":true},{"name":"approvalStatus","in":"query","schema":{"enum":["DRAFT","PENDING_APPROVAL","APPROVED","REJECTED"],"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"scheduledAt","in":"query","schema":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}}},"style":"deepObject","explode":true,"allowEmptyValue":true,"allowReserved":true},{"name":"tagIds","in":"query","schema":{"type":"array","maxItems":100,"items":{"type":"string"}},"style":"deepObject","explode":true,"allowEmptyValue":true,"allowReserved":true},{"name":"tagMode","in":"query","schema":{"enum":["ANY","ALL"],"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"socialAccountIds","in":"query","schema":{"type":"array","maxItems":100,"items":{"type":"string"}},"style":"deepObject","explode":true,"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","schema":{"type":"number","minimum":1,"maximum":200,"default":200},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"posts":{"type":"array","items":{"$ref":"#/components/schemas/PostWithRelations"}},"page":{"type":"number"},"totalPages":{"type":"number"},"total":{"type":"number"}},"required":["posts","page","totalPages","total"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"UNAUTHORIZED","status":401,"message":"Unauthorized","data":{"message":"UNAUTHORIZED"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"INTERNAL_SERVER_ERROR","status":500,"message":"Internal Server Error","data":{"message":"Internal Server Error"}}}}}},"x-fern-sdk-group-name":"posts","x-fern-sdk-method-name":"list","security":[{"apiKey":[]},{"oauth2":["posts:read"]}]},"post":{"operationId":"v0.post.create","summary":"Create a post","description":"Create a new post with media, tags, and scheduling options. Media items may reference a stored library URL or any publicly reachable image/video URL — external URLs are downloaded into the media library automatically, so clients that cannot issue a raw presigned PUT can attach media in one call.","tags":["Posts"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostCreate"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"externalId":{"anyOf":[{"type":"string"},{"type":"null"}]},"caption":{"type":"string"},"status":{"$ref":"#/components/schemas/PostStatus"},"scheduledAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"platformConfiguration":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"media":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"thumbnail_timestamp_ms":{"anyOf":[{"type":"number"},{"type":"null"}]},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"enum":["user","business"],"type":"string"},"platform":{"enum":["bluesky","facebook","google_business_profile","instagram","linkedin","pinterest","reddit","snapchat","threads","tiktok","twitter","youtube","mastodon","telegram","devto","hashnode","medium","wordpress","lemmy","nostr","discord","dribbble","farcaster","kick","listmonk","mewe","moltbook","skool","slack","twitch","vk","whop"],"type":"string"},"x":{"type":"number","minimum":0,"maximum":1},"y":{"type":"number","minimum":0,"maximum":1}},"required":["id","type","platform"]}},"alt":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"skip_processing":{"type":"boolean","default":false}},"required":["url"]}},"socialAccounts":{"type":"array","items":{"$ref":"#/components/schemas/SocialAccountPublic"}},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","externalId","caption","status","scheduledAt","platformConfiguration","media","socialAccounts","createdAt","updatedAt"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"UNAUTHORIZED","status":401,"message":"Unauthorized","data":{"message":"UNAUTHORIZED"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"INTERNAL_SERVER_ERROR","status":500,"message":"Internal Server Error","data":{"message":"Internal Server Error"}}}}}},"x-fern-sdk-group-name":"posts","x-fern-sdk-method-name":"create","security":[{"apiKey":[]},{"oauth2":["posts:write"]}]}},"/v0/posts/counts/by-tab":{"get":{"operationId":"v0.post.countByTab","summary":"Get post counts grouped by UI tab","description":"Returns counts of posts for the Queue, Drafts, Approvals, and Sent tabs","tags":["Posts"],"parameters":[{"name":"socialAccountIds","in":"query","schema":{"type":"array","items":{"type":"string"}},"style":"deepObject","explode":true,"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"UNAUTHORIZED","status":401,"message":"Unauthorized","data":{"message":"UNAUTHORIZED"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"INTERNAL_SERVER_ERROR","status":500,"message":"Internal Server Error","data":{"message":"Internal Server Error"}}}}}},"x-fern-sdk-group-name":"posts","x-fern-sdk-method-name":"countByTab","security":[{"apiKey":[]},{"oauth2":["posts:read"]}]}},"/v0/posts/{id}":{"get":{"operationId":"v0.post.findUnique","summary":"Get a post","description":"Retrieve a single post by its ID with all relations","tags":["Posts"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostWithRelations"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"UNAUTHORIZED","status":401,"message":"Unauthorized","data":{"message":"UNAUTHORIZED"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"INTERNAL_SERVER_ERROR","status":500,"message":"Internal Server Error","data":{"message":"Internal Server Error"}}}}}},"x-fern-sdk-group-name":"posts","x-fern-sdk-method-name":"retrieve","security":[{"apiKey":[]},{"oauth2":["posts:read"]}]},"put":{"operationId":"v0.post.update","summary":"Update a post","description":"Update an existing post by its ID","tags":["Posts"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"caption":{"type":"string","minLength":1,"maxLength":5000},"scheduledAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"media":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"},"mimeType":{"type":"string"},"bucket":{"type":"string"},"key":{"type":"string"}},"required":["id","name","url","mimeType","key"]}},"platformConfiguration":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"status":{"enum":["DRAFT","SCHEDULED","PROCESSING","COMPLETED","FAILED"],"type":"string"},"tagIds":{"type":"array","items":{"type":"string"}}},"required":[]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Post"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"UNAUTHORIZED","status":401,"message":"Unauthorized","data":{"message":"UNAUTHORIZED"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"INTERNAL_SERVER_ERROR","status":500,"message":"Internal Server Error","data":{"message":"Internal Server Error"}}}}}},"x-fern-sdk-group-name":"posts","x-fern-sdk-method-name":"update","security":[{"apiKey":[]},{"oauth2":["posts:write"]}]},"delete":{"operationId":"v0.post.delete","summary":"Delete a post","description":"Delete a post by its ID","tags":["Posts"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Post"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"UNAUTHORIZED","status":401,"message":"Unauthorized","data":{"message":"UNAUTHORIZED"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"INTERNAL_SERVER_ERROR","status":500,"message":"Internal Server Error","data":{"message":"Internal Server Error"}}}}}},"x-fern-sdk-group-name":"posts","x-fern-sdk-method-name":"delete","security":[{"apiKey":[]},{"oauth2":["posts:write"]}]}},"/v0/posts/{id}/analytics/summary":{"get":{"operationId":"v0.post.analyticsSummary","summary":"Get post analytics summary","description":"Retrieve the latest analytics snapshot for a post","tags":["Posts"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"analyticsLatest":{"anyOf":[{},{"type":"null"}]},"analyticsLastFetchedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"analyticsNextFetchAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["analyticsLastFetchedAt","analyticsNextFetchAt","updatedAt"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"UNAUTHORIZED","status":401,"message":"Unauthorized","data":{"message":"UNAUTHORIZED"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"INTERNAL_SERVER_ERROR","status":500,"message":"Internal Server Error","data":{"message":"Internal Server Error"}}}}}},"x-fern-sdk-group-name":"posts","x-fern-sdk-method-name":"analyticsSummary","security":[{"apiKey":[]},{"oauth2":["analytics:read"]}]}},"/v0/posts/{id}/analytics/series":{"get":{"operationId":"v0.post.analyticsSeries","summary":"Get post analytics time series","description":"Retrieve time series analytics metrics for a post","tags":["Posts"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":1000},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"collectedAt":{"type":"string","format":"date-time","x-native-type":"date"},"platform":{"$ref":"#/components/schemas/SocialPlatform"},"metrics":{"anyOf":[{},{"type":"null"}]}},"required":["id","collectedAt","platform"]}}},"required":["data"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"UNAUTHORIZED","status":401,"message":"Unauthorized","data":{"message":"UNAUTHORIZED"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"INTERNAL_SERVER_ERROR","status":500,"message":"Internal Server Error","data":{"message":"Internal Server Error"}}}}}},"x-fern-sdk-group-name":"posts","x-fern-sdk-method-name":"analyticsSeries","security":[{"apiKey":[]},{"oauth2":["analytics:read"]}]}},"/v0/posts/{id}/publish":{"post":{"operationId":"v0.post.publishDraft","summary":"Publish a draft post","description":"Publish a draft post to connected social media accounts","tags":["Posts"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"scheduledAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":[]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Post"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"UNAUTHORIZED","status":401,"message":"Unauthorized","data":{"message":"UNAUTHORIZED"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"INTERNAL_SERVER_ERROR","status":500,"message":"Internal Server Error","data":{"message":"Internal Server Error"}}}}}},"x-fern-sdk-group-name":"posts","x-fern-sdk-method-name":"publishDraft","security":[{"apiKey":[]},{"oauth2":["posts:write"]}]}},"/v0/posts/{id}/tags":{"put":{"operationId":"v0.post.updateTags","summary":"Update post tags","description":"Replace all tags on a post. No status restrictions apply.","tags":["Posts"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tagIds":{"type":"array","items":{"type":"string"}}},"required":["tagIds"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Post"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"UNAUTHORIZED","status":401,"message":"Unauthorized","data":{"message":"UNAUTHORIZED"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"INTERNAL_SERVER_ERROR","status":500,"message":"Internal Server Error","data":{"message":"Internal Server Error"}}}}}},"x-fern-sdk-group-name":"posts","x-fern-sdk-method-name":"updateTags","security":[{"apiKey":[]},{"oauth2":["posts:write"]}]}},"/v0/social-accounts":{"get":{"operationId":"v0.socialAccount.findMany","summary":"List social accounts","description":"Retrieve all connected social media accounts for the authenticated user","tags":["Social Accounts"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"platform":{"enum":["bluesky","facebook","google_business_profile","instagram","linkedin","pinterest","reddit","snapchat","threads","tiktok","twitter","youtube","mastodon","telegram","devto","hashnode","medium","wordpress","lemmy","nostr","discord","dribbble","farcaster","kick","listmonk","mewe","moltbook","skool","slack","twitch","vk","whop"],"type":"string"},"status":{"enum":["connected","disconnected"],"type":"string"},"username":{"anyOf":[{"type":"string"},{"type":"null"}]},"displayName":{"anyOf":[{"type":"string"},{"type":"null"}]},"profileImageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"refreshTokenValid":{"type":"boolean"},"analyticsDisabledAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"webhookSubscriptionFailedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","platform","status","username","displayName","profileImageUrl","refreshTokenValid","analyticsDisabledAt","webhookSubscriptionFailedAt","createdAt","updatedAt"]}}},"required":["data"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"UNAUTHORIZED","status":401,"message":"Unauthorized","data":{"message":"UNAUTHORIZED"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"INTERNAL_SERVER_ERROR","status":500,"message":"Internal Server Error","data":{"message":"Internal Server Error"}}}}}},"x-fern-sdk-group-name":"socialAccounts","x-fern-sdk-method-name":"list","security":[{"apiKey":[]},{"oauth2":["social-accounts:read"]}]}},"/v0/social-accounts/{id}/whop-companies":{"get":{"operationId":"v0.socialAccount.whopCompanies","summary":"List Whop companies","description":"List companies available to a connected Whop account. Select one before requesting its forum experiences.","tags":["Social Accounts"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]}}},"required":["items"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"UNAUTHORIZED","status":401,"message":"Unauthorized","data":{"message":"UNAUTHORIZED"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"INTERNAL_SERVER_ERROR","status":500,"message":"Internal Server Error","data":{"message":"Internal Server Error"}}}}}},"x-fern-sdk-group-name":"socialAccounts","x-fern-sdk-method-name":"listWhopCompanies","security":[{"apiKey":[]},{"oauth2":["social-accounts:read"]}]}},"/v0/social-accounts/{id}/whop-forums":{"get":{"operationId":"v0.socialAccount.whopForums","summary":"List Whop forum experiences","description":"List forum experiences for a Whop company. Use an item id as platformConfiguration.experience.","tags":["Social Accounts"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"companyId","in":"query","required":true,"schema":{"type":"string","minLength":1},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]}}},"required":["items"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"UNAUTHORIZED","status":401,"message":"Unauthorized","data":{"message":"UNAUTHORIZED"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"INTERNAL_SERVER_ERROR","status":500,"message":"Internal Server Error","data":{"message":"Internal Server Error"}}}}}},"x-fern-sdk-group-name":"socialAccounts","x-fern-sdk-method-name":"listWhopForums","security":[{"apiKey":[]},{"oauth2":["social-accounts:read"]}]}},"/v0/social-accounts/{id}":{"put":{"operationId":"v0.socialAccount.update","summary":"Update social account","description":"Update social media account settings and information","tags":["Social Accounts"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"enum":["connected","disconnected"],"type":"string"}},"required":[]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"UNAUTHORIZED","status":401,"message":"Unauthorized","data":{"message":"UNAUTHORIZED"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"INTERNAL_SERVER_ERROR","status":500,"message":"Internal Server Error","data":{"message":"Internal Server Error"}}}}}},"x-fern-sdk-group-name":"socialAccounts","x-fern-sdk-method-name":"update","security":[{"apiKey":[]},{"oauth2":["social-accounts:write"]}]},"delete":{"operationId":"v0.socialAccount.delete","summary":"Delete social account","description":"Remove a connected social media account","tags":["Social Accounts"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"UNAUTHORIZED","status":401,"message":"Unauthorized","data":{"message":"UNAUTHORIZED"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"INTERNAL_SERVER_ERROR","status":500,"message":"Internal Server Error","data":{"message":"Internal Server Error"}}}}}},"x-fern-sdk-group-name":"socialAccounts","x-fern-sdk-method-name":"delete","security":[{"apiKey":[]},{"oauth2":["social-accounts:write"]}]}},"/v0/social-accounts/{id}/timezone":{"put":{"operationId":"v0.socialAccount.updateTimezone","summary":"Update social account timezone","description":"Set the IANA timezone (e.g. 'America/Los_Angeles') used to interpret queue times for this account.","tags":["Social Accounts"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"timezone":{"type":"string","minLength":1,"maxLength":64}},"required":["timezone"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"UNAUTHORIZED","status":401,"message":"Unauthorized","data":{"message":"UNAUTHORIZED"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"INTERNAL_SERVER_ERROR","status":500,"message":"Internal Server Error","data":{"message":"Internal Server Error"}}}}}},"x-fern-sdk-group-name":"socialAccounts","x-fern-sdk-method-name":"updateTimezone","security":[{"apiKey":[]},{"oauth2":["social-accounts:write"]}]}},"/v0/social-accounts/{id}/next-slots":{"get":{"operationId":"v0.socialAccount.nextSlots","summary":"Get next queue slots","description":"Return the next available queue slot times (UTC) for a social account, computed from its queue schedule, per-slot capacity, and timezone. Empty when the account has no queue times configured. Use a slot as `scheduledAt`, or pass `action: \"queue\"` when creating a post to take the next slot automatically.","tags":["Social Accounts"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":50,"default":5},"allowEmptyValue":true,"allowReserved":true},{"name":"after","in":"query","required":false,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"slots":{"type":"array","items":{"type":"string","format":"date-time","x-native-type":"date"}}},"required":["slots"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"UNAUTHORIZED","status":401,"message":"Unauthorized","data":{"message":"UNAUTHORIZED"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"INTERNAL_SERVER_ERROR","status":500,"message":"Internal Server Error","data":{"message":"Internal Server Error"}}}}}},"x-fern-sdk-group-name":"socialAccounts","x-fern-sdk-method-name":"nextSlots","security":[{"apiKey":[]},{"oauth2":["social-accounts:read"]}]}},"/v0/social-accounts/{id}/pinterest-boards":{"get":{"operationId":"v0.socialAccount.pinterestBoards","summary":"List Pinterest boards","description":"List the boards for a connected Pinterest account. Use a board id in `platformConfiguration.board_ids` when creating a Pinterest post.","tags":["Social Accounts"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"privacy":{"enum":["PUBLIC","PROTECTED","SECRET"],"type":"string"}},"required":["id","name"]}}},"required":["data"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"UNAUTHORIZED","status":401,"message":"Unauthorized","data":{"message":"UNAUTHORIZED"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"INTERNAL_SERVER_ERROR","status":500,"message":"Internal Server Error","data":{"message":"Internal Server Error"}}}}}},"x-fern-sdk-group-name":"socialAccounts","x-fern-sdk-method-name":"pinterestBoards","security":[{"apiKey":[]},{"oauth2":["social-accounts:read"]}]}},"/v0/social-accounts/{id}/tiktok-creator-info":{"get":{"operationId":"v0.socialAccount.tiktokCreatorInfo","summary":"Get TikTok creator info","description":"Fetch the privacy-level options, duration limits, and interaction settings for a connected TikTok account — required to build a valid `platformConfiguration` when creating a TikTok post.","tags":["Social Accounts"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"log_id":{"type":"string"}},"required":["code","message","log_id"]},"data":{"type":"object","properties":{"creator_avatar_url":{"type":"string"},"creator_username":{"type":"string"},"creator_nickname":{"type":"string"},"privacy_level_options":{"type":"array","items":{"type":"string"}},"comment_disabled":{"type":"boolean"},"duet_disabled":{"type":"boolean"},"stitch_disabled":{"type":"boolean"},"max_video_post_duration_sec":{"type":"number"}},"required":["creator_avatar_url","creator_username","creator_nickname","privacy_level_options","comment_disabled","duet_disabled","stitch_disabled","max_video_post_duration_sec"]}},"required":["error","data"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"UNAUTHORIZED","status":401,"message":"Unauthorized","data":{"message":"UNAUTHORIZED"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"INTERNAL_SERVER_ERROR","status":500,"message":"Internal Server Error","data":{"message":"Internal Server Error"}}}}}},"x-fern-sdk-group-name":"socialAccounts","x-fern-sdk-method-name":"tiktokCreatorInfo","security":[{"apiKey":[]},{"oauth2":["social-accounts:read"]}]}},"/v0/tags":{"get":{"operationId":"v0.tags.list","summary":"List user tags","description":"Retrieve a list of tags for the authenticated user with optional search filtering","tags":["Tags"],"parameters":[{"name":"q","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","schema":{"type":"number","minimum":1,"maximum":50,"default":25},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Tag"}}},"required":["data"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"UNAUTHORIZED","status":401,"message":"Unauthorized","data":{"message":"UNAUTHORIZED"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"INTERNAL_SERVER_ERROR","status":500,"message":"Internal Server Error","data":{"message":"Internal Server Error"}}}}}},"x-fern-sdk-group-name":"tags","x-fern-sdk-method-name":"list","security":[{"apiKey":[]},{"oauth2":["tags:read"]}]},"post":{"operationId":"v0.tags.create","summary":"Create a new tag","description":"Create a new tag. Users can have up to 5 tags.","tags":["Tags"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":50},"color":{"type":"string","pattern":"^#[0-9a-fA-F]{3,8}$"}},"required":["name","color"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tag"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"UNAUTHORIZED","status":401,"message":"Unauthorized","data":{"message":"UNAUTHORIZED"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"INTERNAL_SERVER_ERROR","status":500,"message":"Internal Server Error","data":{"message":"Internal Server Error"}}}}}},"x-fern-sdk-group-name":"tags","x-fern-sdk-method-name":"create","security":[{"apiKey":[]},{"oauth2":["tags:write"]}]}},"/v0/tags/{id}":{"put":{"operationId":"v0.tags.update","summary":"Update a tag","description":"Update an existing tag by its ID. Only the tag owner can update their tags.","tags":["Tags"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":50},"color":{"type":"string","pattern":"^#[0-9a-fA-F]{3,8}$"}},"required":[]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tag"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"UNAUTHORIZED","status":401,"message":"Unauthorized","data":{"message":"UNAUTHORIZED"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"INTERNAL_SERVER_ERROR","status":500,"message":"Internal Server Error","data":{"message":"Internal Server Error"}}}}}},"x-fern-sdk-group-name":"tags","x-fern-sdk-method-name":"update","security":[{"apiKey":[]},{"oauth2":["tags:write"]}]},"delete":{"operationId":"v0.tags.delete","summary":"Delete a tag","description":"Delete a tag by its ID. Only the tag owner can delete their tags.","tags":["Tags"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tag"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"UNAUTHORIZED","status":401,"message":"Unauthorized","data":{"message":"UNAUTHORIZED"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"INTERNAL_SERVER_ERROR","status":500,"message":"Internal Server Error","data":{"message":"Internal Server Error"}}}}}},"x-fern-sdk-group-name":"tags","x-fern-sdk-method-name":"delete","security":[{"apiKey":[]},{"oauth2":["tags:write"]}]}},"/v0/media/from-url":{"post":{"operationId":"v0.media.createFromUrl","summary":"Import media from a URL","description":"Downloads a publicly reachable image or video into the media library and returns the media record. Use the returned `url` in `media[].url` when creating a post. Prefer this over the presign flow whenever your client cannot issue a raw HTTP PUT (e.g. an AI agent). The source URL must be public (no auth), http(s), and at most the post upload limit (250 MB); SVG and other active content is rejected.","tags":["Media"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","maxLength":2048,"format":"uri"},"name":{"type":"string","minLength":1,"maxLength":255},"alt":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"contentType":{"type":"string","minLength":1,"maxLength":255}},"required":["url"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"UNAUTHORIZED","status":401,"message":"Unauthorized","data":{"message":"UNAUTHORIZED"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"INTERNAL_SERVER_ERROR","status":500,"message":"Internal Server Error","data":{"message":"Internal Server Error"}}}}}},"x-fern-sdk-group-name":"media","x-fern-sdk-method-name":"createFromUrl","security":[{"apiKey":[]},{"oauth2":["media:write"]}]}},"/v0/media/upload-link":{"post":{"operationId":"v0.media.createUploadLink","summary":"Create a device upload link","description":"Returns a short-lived URL to a page where the user uploads files from their device (or a pasted attachment) straight into the media library. Hand the URL to the user; once they've uploaded, call GET /v0/media (list media, newest first) and reference the returned `url` when creating a post. Use this whenever the file isn't already at a public URL.","tags":["Media"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expiresInHours":{"type":"integer","minimum":1,"maximum":168}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"UNAUTHORIZED","status":401,"message":"Unauthorized","data":{"message":"UNAUTHORIZED"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"INTERNAL_SERVER_ERROR","status":500,"message":"Internal Server Error","data":{"message":"Internal Server Error"}}}}}},"x-fern-sdk-group-name":"media","x-fern-sdk-method-name":"createUploadLink","security":[{"apiKey":[]},{"oauth2":["media:write"]}]}},"/v0/media/upload":{"post":{"operationId":"v0.media.uploadFile","summary":"Upload a file","description":"Upload raw image, video, or audio bytes directly as multipart/form-data. The file is stored in your media library and the record is returned; use its `url` in `media[].url` when creating a post. Max 250 MB; SVG and other active content is rejected. For a file already hosted at a public URL, prefer POST /v0/media/from-url.","tags":["Media"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"file":{"type":"string","contentMediaType":"*/*"},"name":{"type":"string","minLength":1,"maxLength":255},"alt":{"type":"string","maxLength":1000},"contentType":{"type":"string","maxLength":255}},"required":["file"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","contentMediaType":"*/*"},"name":{"type":"string","minLength":1,"maxLength":255},"alt":{"type":"string","maxLength":1000},"contentType":{"type":"string","maxLength":255}},"required":["file"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"UNAUTHORIZED","status":401,"message":"Unauthorized","data":{"message":"UNAUTHORIZED"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"INTERNAL_SERVER_ERROR","status":500,"message":"Internal Server Error","data":{"message":"Internal Server Error"}}}}}},"x-fern-sdk-group-name":"media","x-fern-sdk-method-name":"upload","security":[{"apiKey":[]},{"oauth2":["media:write"]}]}},"/v0/media/{id}":{"get":{"operationId":"v0.media.findById","summary":"Get media","description":"Retrieve media information by its ID","tags":["Media"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Media"},{"type":"null"}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"UNAUTHORIZED","status":401,"message":"Unauthorized","data":{"message":"UNAUTHORIZED"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"INTERNAL_SERVER_ERROR","status":500,"message":"Internal Server Error","data":{"message":"Internal Server Error"}}}}}},"x-fern-sdk-group-name":"media","x-fern-sdk-method-name":"retrieve","security":[{"apiKey":[]},{"oauth2":["media:read"]}]},"put":{"operationId":"v0.media.update","summary":"Update media","description":"Update media information and metadata","tags":["Media"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"mimeType":{"type":"string"},"width":{"type":"integer","minimum":0,"maximum":9007199254740991},"height":{"type":"integer","minimum":0,"maximum":9007199254740991},"size":{"type":"integer","minimum":0,"maximum":9007199254740991},"duration":{"type":"number","minimum":0}},"required":["url"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Media"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"UNAUTHORIZED","status":401,"message":"Unauthorized","data":{"message":"UNAUTHORIZED"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"INTERNAL_SERVER_ERROR","status":500,"message":"Internal Server Error","data":{"message":"Internal Server Error"}}}}}},"x-fern-sdk-group-name":"media","x-fern-sdk-method-name":"update","security":[{"apiKey":[]},{"oauth2":["media:write"]}]},"delete":{"operationId":"v0.media.delete","summary":"Delete media","description":"Delete a media object and remove its files from storage. Fails with a conflict when the media is attached to any post — remove it from those posts (or delete them) first.","tags":["Media"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"UNAUTHORIZED","status":401,"message":"Unauthorized","data":{"message":"UNAUTHORIZED"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"INTERNAL_SERVER_ERROR","status":500,"message":"Internal Server Error","data":{"message":"Internal Server Error"}}}}}},"security":[{"apiKey":[]},{"oauth2":["media:write"]}]}},"/v0/media":{"get":{"operationId":"v0.media.list","summary":"List media","description":"List media for the organization with page pagination, search, type and tag filters","tags":["Media"],"parameters":[{"name":"page","in":"query","schema":{"type":"integer","minimum":1,"maximum":9007199254740991,"default":1},"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","schema":{"type":"number","minimum":1,"maximum":100,"default":10},"allowEmptyValue":true,"allowReserved":true},{"name":"q","in":"query","schema":{"type":"string","maxLength":200},"allowEmptyValue":true,"allowReserved":true},{"name":"type","in":"query","schema":{"enum":["image","video","all"],"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"tagIds","in":"query","schema":{"type":"array","maxItems":100,"items":{"type":"string"}},"style":"deepObject","explode":true,"allowEmptyValue":true,"allowReserved":true},{"name":"tagMode","in":"query","schema":{"enum":["ANY","ALL"],"type":"string"},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Media"}},"page":{"type":"number"},"total":{"type":"number"},"totalPages":{"type":"number"}},"required":["items","page","total","totalPages"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"UNAUTHORIZED","status":401,"message":"Unauthorized","data":{"message":"UNAUTHORIZED"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"INTERNAL_SERVER_ERROR","status":500,"message":"Internal Server Error","data":{"message":"Internal Server Error"}}}}}},"x-fern-sdk-group-name":"media","x-fern-sdk-method-name":"list","security":[{"apiKey":[]},{"oauth2":["media:read"]}]}},"/v0/media/{mediaId}/tags":{"put":{"operationId":"v0.media.setTags","summary":"Set media tags","description":"Replace the set of tags attached to a media item with the provided tag IDs","tags":["Media"],"parameters":[{"name":"mediaId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tagIds":{"type":"array","maxItems":100,"items":{"type":"string"}}},"required":["tagIds"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"UNAUTHORIZED","status":401,"message":"Unauthorized","data":{"message":"UNAUTHORIZED"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"INTERNAL_SERVER_ERROR","status":500,"message":"Internal Server Error","data":{"message":"Internal Server Error"}}}}}},"x-fern-sdk-group-name":"media","x-fern-sdk-method-name":"setTags","security":[{"apiKey":[]},{"oauth2":["media:write"]}]}},"/v0/media/tag-counts":{"get":{"operationId":"v0.media.countByTag","summary":"Media counts by tag","description":"Return media counts grouped by tag for the organization","tags":["Media"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"tagId":{"type":"string"},"count":{"type":"number"}},"required":["tagId","count"]}}},"required":["data"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"UNAUTHORIZED","status":401,"message":"Unauthorized","data":{"message":"UNAUTHORIZED"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"INTERNAL_SERVER_ERROR","status":500,"message":"Internal Server Error","data":{"message":"Internal Server Error"}}}}}},"x-fern-sdk-group-name":"media","x-fern-sdk-method-name":"countByTag","security":[{"apiKey":[]},{"oauth2":["media:read"]}]}},"/v0/media/presign":{"post":{"operationId":"v0.file.createPresignedPost","summary":"Create a presigned upload URL","description":"Returns a presigned PUT URL. Upload by issuing an HTTP PUT of the raw file bytes to `url` with a `Content-Type` header matching `contentType`, then reference the returned `key` when creating a post.","tags":["Media"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePresignedPost"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PresignedPost"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"UNAUTHORIZED","status":401,"message":"Unauthorized","data":{"message":"UNAUTHORIZED"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"INTERNAL_SERVER_ERROR","status":500,"message":"Internal Server Error","data":{"message":"Internal Server Error"}}}}}},"x-fern-sdk-group-name":"media","x-fern-sdk-method-name":"createPresignedPost","security":[{"apiKey":[]},{"oauth2":["media:write"]}]}},"/v0/platforms":{"get":{"operationId":"v0.platform.list","summary":"List platform posting requirements","description":"Per-platform posting requirements: caption length limits, media count/type rules, whether `platformConfiguration` is required, its JSON Schema when server-validated, and helper endpoints for fetching dynamic values (e.g. Pinterest boards). Platforms marked `comingSoon` cannot be posted to yet.","tags":["Platforms"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"platform":{"type":"string"},"name":{"type":"string"},"comingSoon":{"type":"boolean"},"captionMaxLength":{"type":"number"},"mediaRules":{"type":"object","properties":{"min":{"type":"number"},"max":{"type":"number"},"allowedTypes":{"type":"array","items":{"enum":["IMAGE","VIDEO","GIF"],"type":"string"}},"allowedDimensions":{"type":"array","items":{"type":"object","properties":{"width":{"type":"number"},"height":{"type":"number"}},"required":["width","height"]}}},"required":["max"]},"platformConfiguration":{"type":"object","properties":{"required":{"type":"boolean"},"validated":{"type":"boolean"},"schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["required","validated"]},"helperEndpoints":{"type":"array","items":{"type":"object","properties":{"method":{"type":"string"},"path":{"type":"string"},"description":{"type":"string"}},"required":["method","path","description"]}}},"required":["platform","name","platformConfiguration"]}}},"required":["data"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"UNAUTHORIZED","status":401,"message":"Unauthorized","data":{"message":"UNAUTHORIZED"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"INTERNAL_SERVER_ERROR","status":500,"message":"Internal Server Error","data":{"message":"Internal Server Error"}}}}}},"x-fern-sdk-group-name":"platforms","x-fern-sdk-method-name":"list","security":[{"apiKey":[]},{"oauth2":["posts:read"]}]}},"/v0/studio/generateImage":{"post":{"operationId":"v0.studio.generateImage","summary":"Generate an image with AI","description":"Submit an AI image generation job","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string","minLength":1,"maxLength":2000},"modelKey":{"enum":["flux_schnell","flux_dev","flux_pro_ultra"],"type":"string","default":"flux_schnell"},"width":{"type":"integer","minimum":256,"maximum":2048},"height":{"type":"integer","minimum":256,"maximum":2048}},"required":["prompt"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"UNAUTHORIZED","status":401,"message":"Unauthorized","data":{"message":"UNAUTHORIZED"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"INTERNAL_SERVER_ERROR","status":500,"message":"Internal Server Error","data":{"message":"Internal Server Error"}}}}}},"x-fern-sdk-group-name":"ai","x-fern-sdk-method-name":"generateImage","security":[{"apiKey":[]},{"oauth2":["ai:write"]}]}},"/v0/studio/getGeneration":{"get":{"operationId":"v0.studio.getGeneration","summary":"Get a single generation","description":"Get the status and details of a generation job","parameters":[{"name":"id","in":"query","required":true,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"UNAUTHORIZED","status":401,"message":"Unauthorized","data":{"message":"UNAUTHORIZED"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"INTERNAL_SERVER_ERROR","status":500,"message":"Internal Server Error","data":{"message":"Internal Server Error"}}}}}},"x-fern-sdk-group-name":"ai","x-fern-sdk-method-name":"getGeneration","security":[{"apiKey":[]},{"oauth2":["ai:read"]}]}},"/v0/webhooks":{"get":{"operationId":"v0.webhooks.list","summary":"List webhook endpoints","description":"List the organization's webhook endpoints. Signing secrets are masked.","tags":["Webhooks"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"UNAUTHORIZED","status":401,"message":"Unauthorized","data":{"message":"UNAUTHORIZED"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"INTERNAL_SERVER_ERROR","status":500,"message":"Internal Server Error","data":{"message":"Internal Server Error"}}}}}},"x-fern-sdk-group-name":"webhooks","x-fern-sdk-method-name":"list","security":[{"apiKey":[]},{"oauth2":["webhooks:read"]}]},"post":{"operationId":"v0.webhooks.create","summary":"Create a webhook endpoint","description":"Register an HTTPS endpoint for event deliveries. The response includes the signing secret ONCE — store it; later reads return a masked value.","tags":["Webhooks"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","maxLength":2048,"format":"uri"},"events":{"type":"array","minItems":1,"maxItems":4,"items":{"enum":["post.published","post.failed","generation.completed","generation.failed"],"type":"string"}},"description":{"type":"string","maxLength":500}},"required":["url","events"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"UNAUTHORIZED","status":401,"message":"Unauthorized","data":{"message":"UNAUTHORIZED"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"INTERNAL_SERVER_ERROR","status":500,"message":"Internal Server Error","data":{"message":"Internal Server Error"}}}}}},"x-fern-sdk-group-name":"webhooks","x-fern-sdk-method-name":"create","security":[{"apiKey":[]},{"oauth2":["webhooks:write"]}]}},"/v0/webhooks/{id}":{"get":{"operationId":"v0.webhooks.retrieve","summary":"Get a webhook endpoint","description":"Retrieve one webhook endpoint, including failure counters. The signing secret is masked.","tags":["Webhooks"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"UNAUTHORIZED","status":401,"message":"Unauthorized","data":{"message":"UNAUTHORIZED"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"INTERNAL_SERVER_ERROR","status":500,"message":"Internal Server Error","data":{"message":"Internal Server Error"}}}}}},"x-fern-sdk-group-name":"webhooks","x-fern-sdk-method-name":"retrieve","security":[{"apiKey":[]},{"oauth2":["webhooks:read"]}]},"patch":{"operationId":"v0.webhooks.update","summary":"Update a webhook endpoint","description":"Update URL, subscribed events, description, or enabled state. Re-enabling resets the failure streak.","tags":["Webhooks"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","maxLength":2048,"format":"uri"},"events":{"type":"array","minItems":1,"maxItems":4,"items":{"enum":["post.published","post.failed","generation.completed","generation.failed"],"type":"string"}},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"enabled":{"type":"boolean"}},"required":[]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"UNAUTHORIZED","status":401,"message":"Unauthorized","data":{"message":"UNAUTHORIZED"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"INTERNAL_SERVER_ERROR","status":500,"message":"Internal Server Error","data":{"message":"Internal Server Error"}}}}}},"x-fern-sdk-group-name":"webhooks","x-fern-sdk-method-name":"update","security":[{"apiKey":[]},{"oauth2":["webhooks:write"]}]},"delete":{"operationId":"v0.webhooks.delete","summary":"Delete a webhook endpoint","description":"Delete a webhook endpoint and its delivery history. Deliveries already in flight are dropped.","tags":["Webhooks"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"UNAUTHORIZED","status":401,"message":"Unauthorized","data":{"message":"UNAUTHORIZED"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"INTERNAL_SERVER_ERROR","status":500,"message":"Internal Server Error","data":{"message":"Internal Server Error"}}}}}},"x-fern-sdk-group-name":"webhooks","x-fern-sdk-method-name":"delete","security":[{"apiKey":[]},{"oauth2":["webhooks:write"]}]}},"/v0/webhooks/{id}/rotate-secret":{"post":{"operationId":"v0.webhooks.rotateSecret","summary":"Rotate the signing secret","description":"Generate a new signing secret for the endpoint and return it ONCE. The old secret stops signing immediately.","tags":["Webhooks"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"UNAUTHORIZED","status":401,"message":"Unauthorized","data":{"message":"UNAUTHORIZED"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"INTERNAL_SERVER_ERROR","status":500,"message":"Internal Server Error","data":{"message":"Internal Server Error"}}}}}},"x-fern-sdk-group-name":"webhooks","x-fern-sdk-method-name":"rotateSecret","security":[{"apiKey":[]},{"oauth2":["webhooks:write"]}]}},"/v0/webhooks/{id}/test":{"post":{"operationId":"v0.webhooks.test","summary":"Send a test delivery","description":"Send a signed `ping` event to the endpoint URL and record it in the delivery history.","tags":["Webhooks"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"UNAUTHORIZED","status":401,"message":"Unauthorized","data":{"message":"UNAUTHORIZED"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"INTERNAL_SERVER_ERROR","status":500,"message":"Internal Server Error","data":{"message":"Internal Server Error"}}}}}},"x-fern-sdk-group-name":"webhooks","x-fern-sdk-method-name":"test","security":[{"apiKey":[]},{"oauth2":["webhooks:write"]}]}},"/v0/webhooks/{id}/deliveries":{"get":{"operationId":"v0.webhooks.listDeliveries","summary":"List deliveries for an endpoint","description":"Delivery history for a webhook endpoint: event, status, attempts, last response code, and payload.","tags":["Webhooks"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":25},"allowEmptyValue":true,"allowReserved":true},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":9007199254740991,"default":1},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"UNAUTHORIZED","status":401,"message":"Unauthorized","data":{"message":"UNAUTHORIZED"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"INTERNAL_SERVER_ERROR","status":500,"message":"Internal Server Error","data":{"message":"Internal Server Error"}}}}}},"x-fern-sdk-group-name":"webhooks","x-fern-sdk-method-name":"listDeliveries","security":[{"apiKey":[]},{"oauth2":["webhooks:read"]}]}}}}