{"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"}]},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"postedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"errorMessage":{"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","title","postedAt","errorMessage","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"}]},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"postedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"errorMessage":{"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":{"$ref":"#/components/schemas/PostMedia"}},"thumbnail":{"anyOf":[{"$ref":"#/components/schemas/PostMedia"},{"type":"null"}]},"tags":{"type":"array","items":{"$ref":"#/components/schemas/Tag"}},"parts":{"type":"array","items":{"$ref":"#/components/schemas/PostThreadPart"}}},"required":["id","externalId","caption","status","approvalStatus","approvalRequestedAt","approvalRequestedBy","approvedAt","approvedBy","rejectionReason","scheduledAt","platformConfiguration","socialAccountId","url","title","postedAt","errorMessage","createdAt","updatedAt","socialAccount","media","thumbnail","tags","parts"]},"PostMedia":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"name":{"type":"string"},"mimeType":{"type":"string"},"width":{"anyOf":[{"type":"integer"},{"type":"null"}]},"height":{"anyOf":[{"type":"integer"},{"type":"null"}]},"duration":{"anyOf":[{"type":"integer"},{"type":"null"}]},"size":{"anyOf":[{"type":"integer"},{"type":"null"}]},"alt":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"thumbnailUrl":{"anyOf":[{"type":"string"},{"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"]}},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","url","name","mimeType","width","height","duration","size","alt","thumbnailUrl","createdAt","updatedAt"]},"PostThreadPart":{"type":"object","properties":{"caption":{"type":"string"},"media":{"type":"array","items":{"$ref":"#/components/schemas/PostMedia"}}},"required":["caption","media"]},"Media":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"name":{"type":"string"},"mimeType":{"type":"string"},"width":{"anyOf":[{"type":"integer"},{"type":"null"}]},"height":{"anyOf":[{"type":"integer"},{"type":"null"}]},"duration":{"anyOf":[{"type":"integer"},{"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":"integer"},{"type":"null"}]},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"thumbnailUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"tags":{"type":"array","items":{"$ref":"#/components/schemas/Tag"}}},"required":["id","url","name","mimeType","width","height","duration","createdAt","updatedAt","bucket","key","size","alt","thumbnailUrl"]},"PresignedPost":{"type":"object","properties":{"url":{"type":"string"},"key":{"type":"string"},"method":{"const":"PUT","type":"string"}},"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"]},"ClientProfile":{"type":"object","properties":{"id":{"type":"string"},"externalId":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"string"},"socialAccounts":{"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"},"disconnectedReason":{"$ref":"#/components/schemas/SocialAccountDisconnectedReason"},"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"}]},"profileId":{"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","platform","status","disconnectedReason","username","displayName","profileImageUrl","refreshTokenValid","analyticsDisabledAt","webhookSubscriptionFailedAt","profileId","createdAt","updatedAt"]}},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","externalId","name","socialAccounts","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"]},"WebhookEndpoint":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"secret":{"type":"string"},"events":{"type":"array","items":{"enum":["post.published","post.failed","generation.completed","generation.failed","social_account.connected"],"type":"string"}},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"enabled":{"type":"boolean"},"consecutiveFailures":{"type":"integer"},"lastSuccessAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"lastFailureAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"disabledAt":{"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","url","secret","events","description","enabled","consecutiveFailures","lastSuccessAt","lastFailureAt","disabledAt","createdAt","updatedAt"]},"WebhookDelivery":{"type":"object","properties":{"id":{"type":"string"},"endpointId":{"type":"string"},"event":{"type":"string"},"payload":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"status":{"enum":["PENDING","SUCCESS","FAILED"],"type":"string"},"attempts":{"type":"integer"},"responseStatus":{"anyOf":[{"type":"integer"},{"type":"null"}]},"lastError":{"anyOf":[{"type":"string"},{"type":"null"}]},"deliveredAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","endpointId","event","payload","status","attempts","responseStatus","lastError","deliveredAt","createdAt"]},"AiGeneration":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"status":{"enum":["PENDING","PROCESSING","COMPLETED","FAILED","CANCELLED"],"type":"string"},"modelKey":{"type":"string"},"prompt":{"type":"string"},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"resultUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"width":{"anyOf":[{"type":"integer"},{"type":"null"}]},"height":{"anyOf":[{"type":"integer"},{"type":"null"}]},"durationSeconds":{"anyOf":[{"type":"integer"},{"type":"null"}]},"costMicros":{"type":"integer"},"estimatedCostMicros":{"type":"integer"},"errorMessage":{"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","type","status","modelKey","prompt","imageUrl","resultUrl","width","height","durationSeconds","costMicros","estimatedCostMicros","errorMessage","createdAt","updatedAt"]},"PostStatus":{"enum":["SCHEDULED","PROCESSING","COMPLETED","DRAFT","FAILED","DELETED"],"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":100000},"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":"integer","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"]},"PostRetry":{"type":"object","properties":{"id":{"type":"string"},"force":{"type":"boolean","description":"Confirm the retry after a publish attempt whose outcome is unknown. Check the platform first — the post may already be live."},"scheduledAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}],"description":"Future time to re-schedule the post for; omit to publish immediately."}},"required":["id"]},"MediaUpdate":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"url":{"type":"string","format":"uri"},"mimeType":{"type":"string"},"width":{"type":"integer","minimum":0},"height":{"type":"integer","minimum":0},"size":{"type":"integer","minimum":0},"duration":{"type":"number","minimum":0}},"required":["id"]},"MediaSearch":{"type":"object","properties":{"page":{"type":"integer","minimum":1,"default":1},"limit":{"type":"integer","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"]},"MediaRegister":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":2048,"description":"The `key` returned by POST /v0/media/presign, after the bytes were PUT to its `url`. The stored media URL for that key is also accepted."},"name":{"type":"string","minLength":1,"maxLength":255},"alt":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]}},"required":["key"]},"SocialAccountUpdate":{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["connected","disconnected"],"type":"string"},"profileId":{"anyOf":[{"type":"string","minLength":1,"maxLength":128},{"type":"null"}],"description":"Move the account into a client profile (profile id or externalId), or null to remove it from its profile."}},"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":"integer","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},"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 `message` / `data.message`.","properties":{"code":{"type":"string","description":"e.g. \"BAD_REQUEST\", \"UNAUTHORIZED\", \"NOT_FOUND\"."},"status":{"type":"integer"},"message":{"type":"string"},"defined":{"type":"boolean"},"data":{"type":"object","additionalProperties":true,"properties":{"message":{"type":"string"},"userMessage":{"type":"string","description":"End-user-safe explanation, when available."},"errorTag":{"type":"string"},"isRetryable":{"type":"boolean"}}}},"required":["code","status"]},"ValidationErrorResponse":{"type":"object","description":"422 error. `data.fieldErrors` maps each invalid field to its messages; `data.formErrors` holds errors not tied to one field. `code` is \"INPUT_VALIDATION_FAILED\" for schema validation and \"UNPROCESSABLE_CONTENT\" for business-rule rejections, whose reason is also in `data.message`.","properties":{"code":{"type":"string","description":"\"INPUT_VALIDATION_FAILED\" or \"UNPROCESSABLE_CONTENT\""},"status":{"type":"integer"},"message":{"type":"string"},"defined":{"type":"boolean"},"data":{"type":"object","properties":{"message":{"type":"string","description":"Human-readable reason (business-rule rejections only)."},"formErrors":{"type":"array","items":{"type":"string"}},"fieldErrors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}}}},"required":["code","status","data"]},"RateLimitErrorResponse":{"type":"object","description":"429 rate-limit error. Per-key request limits return `code: \"RATE_LIMITED\"` (also mirrored under `error`); the per-user limiter returns `code: \"TOO_MANY_REQUESTS\"`. Honor the `Retry-After` header.","properties":{"code":{"type":"string"},"status":{"type":"integer"},"message":{"type":"string"},"defined":{"type":"boolean"},"data":{"type":"object","additionalProperties":true},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["code","status"]}},"responses":{"BadRequest":{"description":"Bad Request — the request isn't allowed in the resource's current state (e.g. editing a published post).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"defined":false,"code":"BAD_REQUEST","status":400,"message":"Bad Request","data":{"message":"Bad Request"}}}}},"Unauthorized":{"description":"Unauthorized — missing or invalid API key / access token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"defined":false,"code":"UNAUTHORIZED","status":401,"message":"Unauthorized","data":{"message":"Unauthorized"}}}}},"PaymentRequired":{"description":"Payment Required — an active plan (and a connected social account) is required, or a free trial has used its post allowance.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"defined":false,"code":"PAYMENT_REQUIRED","status":402,"message":"An active Schedulin plan is required to create posts.","data":{"message":"An active Schedulin plan is required to create posts."}}}}},"Forbidden":{"description":"Forbidden — the credential lacks the required scope or access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"defined":false,"code":"FORBIDDEN","status":403,"message":"Forbidden","data":{"message":"Forbidden"}}}}},"NotFound":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"defined":false,"code":"NOT_FOUND","status":404,"message":"Not Found","data":{"message":"Not Found"}}}}},"Conflict":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"defined":false,"code":"CONFLICT","status":409,"message":"Conflict","data":{"message":"Conflict"}}}}},"ValidationFailed":{"description":"Unprocessable request. Schema validation failures have `code: \"INPUT_VALIDATION_FAILED\"` and `data.fieldErrors` mapping each invalid field to its messages (nested issues name their full path, e.g. `media[0].url: ...`). Business-rule rejections (e.g. a `scheduledAt` in the past) have `code: \"UNPROCESSABLE_CONTENT\"` and carry the reason in `data.message` and `data.formErrors`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"},"example":{"defined":false,"code":"INPUT_VALIDATION_FAILED","status":422,"message":"Input validation failed","data":{"formErrors":[],"fieldErrors":{"caption":["Too small: expected string to have >=1 characters"]}}}}}},"RateLimited":{"description":"Rate limit exceeded. Wait `Retry-After` seconds before retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitErrorResponse"},"example":{"code":"RATE_LIMITED","status":429,"message":"Rate limit exceeded. Retry after 12s.","error":{"code":"RATE_LIMITED","message":"Rate limit exceeded. Retry after 12s."}}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"InternalServerError":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"defined":false,"code":"INTERNAL_SERVER_ERROR","status":500,"message":"Internal Server Error","data":{"message":"Internal Server Error"}}}}}},"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":"integer","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":"integer"},"totalPages":{"type":"integer"},"total":{"type":"integer"}},"required":["posts","page","totalPages","total"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalServerError"}},"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"]}},"socialAccountId":{"type":"string"},"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","socialAccountId","socialAccounts","createdAt","updatedAt"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalServerError"}},"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":{"type":"object","properties":{"queue":{"type":"integer"},"drafts":{"type":"integer"},"approvals":{"type":"integer"},"sent":{"type":"integer"},"failed":{"type":"integer"}},"required":["queue","drafts","approvals","sent","failed"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalServerError"}},"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"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalServerError"}},"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 draft or scheduled post by its ID. `title` sets the post-level title; on Facebook it's an alias for `platformConfiguration.title` (the video title), and either one updates both. Send null or an empty string to clear it. `status` may be DRAFT, SCHEDULED (requires a future `scheduledAt`, either in this request or already on the post), or PROCESSING (publish now). COMPLETED and FAILED are set only by the publisher. A new `scheduledAt` must not be in the past, whatever the status (422). `media` replaces the post's media and accepts the same items as create — a stored or public URL (`{ url }`) or a media library id (`{ id }`), so the `media` array from `GET /v0/posts/{id}` can be sent back as-is. `parts` (X and Mastodon only) replaces the post's thread with the same items create accepts — part media may also be a library `{ id }`, so the `parts` array from `GET /v0/posts/{id}` round-trips — and an empty array removes the thread. On X, parts[0] is the opening tweet: sending `parts` without `caption` sets the caption to parts[0], and changing `caption` or `media` without `parts` updates parts[0] when it matched the old value. Posts that are already publishing, published, or failed can't be edited (409).","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":100000},"title":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"scheduledAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"media":{"type":"array","items":{"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"}]},"size":{"anyOf":[{"type":"number"},{"type":"null"}]},"duration":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"alt":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"tags":{"anyOf":[{"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"]}},{"type":"null"}]},"bucket":{"type":"string"},"key":{"type":"string"}}}},"platformConfiguration":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"status":{"enum":["DRAFT","SCHEDULED","PROCESSING"],"type":"string"},"tagIds":{"type":"array","items":{"type":"string"}},"parts":{"type":"array","maxItems":25,"items":{"type":"object","properties":{"caption":{"type":"string","minLength":1,"maxLength":25000},"media":{"type":"array","maxItems":4,"items":{"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"}]},"size":{"anyOf":[{"type":"number"},{"type":"null"}]},"duration":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"alt":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"tags":{"anyOf":[{"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"]}},{"type":"null"}]},"bucket":{"type":"string"},"key":{"type":"string"}}}}},"required":["caption"]}}},"required":[]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Post"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalServerError"}},"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"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalServerError"}},"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"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalServerError"}},"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"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalServerError"}},"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"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-fern-sdk-group-name":"posts","x-fern-sdk-method-name":"publishDraft","security":[{"apiKey":[]},{"oauth2":["posts:write"]}]}},"/v0/posts/{id}/retry":{"post":{"operationId":"v0.post.retry","summary":"Retry a failed post","description":"Re-queue a FAILED post for publishing, immediately or at a future scheduledAt. Refuses posts that were already published. If the last attempt's outcome is unknown (it may have posted), responds 412 until called again with force: true — check the platform first.","tags":["Posts"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"force":{"type":"boolean","description":"Confirm the retry after a publish attempt whose outcome is unknown. Check the platform first — the post may already be live."},"scheduledAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}],"description":"Future time to re-schedule the post for; omit to publish immediately."}},"required":[]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Post"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-fern-sdk-group-name":"posts","x-fern-sdk-method-name":"retry","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"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalServerError"}},"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"],"parameters":[{"name":"profileId","in":"query","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Only return accounts belonging to this client profile (profile id or externalId)."},"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"},"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"},"disconnectedReason":{"$ref":"#/components/schemas/SocialAccountDisconnectedReason"},"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"}]},"profileId":{"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","platform","status","disconnectedReason","username","displayName","profileImageUrl","refreshTokenValid","analyticsDisabledAt","webhookSubscriptionFailedAt","profileId","createdAt","updatedAt"]}}},"required":["data"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalServerError"}},"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"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalServerError"}},"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"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-fern-sdk-group-name":"socialAccounts","x-fern-sdk-method-name":"listWhopForums","security":[{"apiKey":[]},{"oauth2":["social-accounts:read"]}]}},"/v0/social-accounts/{id}/discord-channels":{"get":{"operationId":"v0.socialAccount.discordChannels","summary":"List Discord channels","description":"List the text and announcement channels the Schedulin bot can post into for a connected Discord server — only channels where the bot's effective permissions (its roles plus the channel's permission overwrites) include View Channel and Send Messages; channels it can't post in are omitted. Use an item id as `platformConfiguration.channel` when creating a Discord 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":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]}}},"required":["items"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-fern-sdk-group-name":"socialAccounts","x-fern-sdk-method-name":"listDiscordChannels","security":[{"apiKey":[]},{"oauth2":["social-accounts:read"]}]}},"/v0/social-accounts/{id}/slack-channels":{"get":{"operationId":"v0.socialAccount.slackChannels","summary":"List Slack channels","description":"List the channels in a connected Slack workspace that the Schedulin bot can post into (public channels, plus private channels it was invited to). Use an item id as `platformConfiguration.channel` when creating a Slack 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":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]}}},"required":["items"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-fern-sdk-group-name":"socialAccounts","x-fern-sdk-method-name":"listSlackChannels","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"},"profileId":{"anyOf":[{"type":"string","minLength":1,"maxLength":128},{"type":"null"}],"description":"Move the account into a client profile (profile id or externalId), or null to remove it from its profile."}},"required":[]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-fern-sdk-group-name":"socialAccounts","x-fern-sdk-method-name":"update","security":[{"apiKey":[]},{"oauth2":["social-accounts:write"]}]},"delete":{"operationId":"v0.socialAccount.delete","summary":"Disconnect (or permanently delete) a social account","description":"Disconnect a social account. By default this is a soft disconnect: the stored credentials are wiped, the account stops counting toward your plan's account limit, and it stays in `GET /v0/social-accounts` with `status: \"disconnected\"` and `disconnectedReason: \"TOKEN_REVOKED\"` until it is reconnected from the dashboard. All of its posts, analytics, and history are kept; scheduled posts that come due while it is disconnected fail with a \"reconnect\" error instead of publishing. Pass `permanent=true` to delete the account instead — this **permanently deletes every post** (scheduled, draft, and published history) of the account and cannot be undone.","tags":["Social Accounts"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"permanent","in":"query","required":false,"schema":{"type":"boolean","description":"Delete the account instead of disconnecting it. PERMANENTLY deletes every post (scheduled, draft, and published history) of the account. Default false."}}],"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"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalServerError"}},"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. Unknown names and UTC-offset strings (e.g. '+05:00') are rejected with 422.","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"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalServerError"}},"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"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-fern-sdk-group-name":"socialAccounts","x-fern-sdk-method-name":"nextSlots","security":[{"apiKey":[]},{"oauth2":["social-accounts:read"]}]}},"/v0/social-accounts/{id}/queue-schedule":{"get":{"operationId":"v0.socialAccount.queueSchedule","summary":"Get queue schedule","description":"Return the weekly posting schedule that `action: \"queue\"` fills: each slot's weekday (0 = Sunday), wall-clock `time` (HH:MM) and `capacity`, interpreted in the account's `timezone`. Empty `times` means the account has no queue configured.","tags":["Social Accounts"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"timezone":{"type":"string"},"times":{"type":"array","items":{"type":"object","properties":{"weekday":{"type":"integer","minimum":0,"maximum":6,"description":"Day of week in the account's timezone, 0 = Sunday … 6 = Saturday"},"time":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"Wall-clock time in the account's timezone, 24h HH:MM"},"capacity":{"type":"integer","minimum":1,"maximum":10,"default":1,"description":"How many posts this slot can hold (1-10, default 1)"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["weekday","time","label"]}}},"required":["timezone","times"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-fern-sdk-group-name":"socialAccounts","x-fern-sdk-method-name":"getQueueSchedule","security":[{"apiKey":[]},{"oauth2":["social-accounts:read"]}]},"put":{"operationId":"v0.socialAccount.replaceQueueSchedule","summary":"Replace queue schedule","description":"Replace the account's whole weekly posting schedule with `times` (send an empty array to clear it). Times are wall-clock HH:MM in the account's timezone — change that with `PUT /v0/social-accounts/{id}/timezone`. Posts already scheduled keep their times; only future `action: \"queue\"` placements use the new schedule. Returns the saved schedule.","tags":["Social Accounts"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"times":{"type":"array","maxItems":200,"items":{"type":"object","properties":{"weekday":{"type":"integer","minimum":0,"maximum":6,"description":"Day of week in the account's timezone, 0 = Sunday … 6 = Saturday"},"time":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"Wall-clock time in the account's timezone, 24h HH:MM"},"capacity":{"type":"integer","minimum":1,"maximum":10,"default":1,"description":"How many posts this slot can hold (1-10, default 1)"},"label":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]}},"required":["weekday","time"]}}},"required":["times"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"timezone":{"type":"string"},"times":{"type":"array","items":{"type":"object","properties":{"weekday":{"type":"integer","minimum":0,"maximum":6,"description":"Day of week in the account's timezone, 0 = Sunday … 6 = Saturday"},"time":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"Wall-clock time in the account's timezone, 24h HH:MM"},"capacity":{"type":"integer","minimum":1,"maximum":10,"default":1,"description":"How many posts this slot can hold (1-10, default 1)"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["weekday","time","label"]}}},"required":["timezone","times"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-fern-sdk-group-name":"socialAccounts","x-fern-sdk-method-name":"replaceQueueSchedule","security":[{"apiKey":[]},{"oauth2":["social-accounts:write"]}]}},"/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"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalServerError"}},"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":"integer"}},"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"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalServerError"}},"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":"integer","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"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalServerError"}},"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"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalServerError"}},"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"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalServerError"}},"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"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalServerError"}},"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":{"$ref":"#/components/schemas/Media"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-fern-sdk-group-name":"media","x-fern-sdk-method-name":"createFromUrl","security":[{"apiKey":[]},{"oauth2":["media:write"]}]}},"/v0/media/register":{"post":{"operationId":"v0.media.register","summary":"Register a presigned upload","description":"Adds a file you uploaded with POST /v0/media/presign (intent `post`) + HTTP PUT to the media library in place — no second copy is stored — and returns the media record. Pass the presign `key`. The object's type and size are read from storage and must be an allowed image/video/audio type within the post upload limit (250 MB). Idempotent: registering the same key again returns the existing record. Returns 404 when no uploaded object exists for the key in your workspace.","tags":["Media"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaRegister"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Media"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-fern-sdk-group-name":"media","x-fern-sdk-method-name":"register","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":{"type":"object","properties":{"url":{"type":"string"},"expiresAt":{"type":"string","format":"date-time"}},"required":["url","expiresAt"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalServerError"}},"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. When the file part's type is missing or generic (`application/octet-stream`, `text/plain`), the type is detected from the file's bytes, then its filename extension. 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":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","contentMediaType":"*/*","format":"binary"},"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":{"$ref":"#/components/schemas/Media"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalServerError"}},"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":{"$ref":"#/components/schemas/Media"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalServerError"}},"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":false,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"mimeType":{"type":"string"},"width":{"type":"integer","minimum":0},"height":{"type":"integer","minimum":0},"size":{"type":"integer","minimum":0},"duration":{"type":"number","minimum":0}},"required":[]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Media"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalServerError"}},"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":{"type":"object","properties":{"id":{"type":"string"},"deleted":{"const":true,"type":"boolean"}},"required":["id","deleted"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-fern-sdk-group-name":"media","x-fern-sdk-method-name":"delete","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,"default":1},"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","schema":{"type":"integer","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":"integer"},"total":{"type":"integer"},"totalPages":{"type":"integer"}},"required":["items","page","total","totalPages"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalServerError"}},"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":{"type":"object","properties":{"mediaId":{"type":"string"},"tagIds":{"type":"array","items":{"type":"string"}}},"required":["mediaId","tagIds"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalServerError"}},"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":"integer"}},"required":["tagId","count"]}}},"required":["data"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalServerError"}},"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"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalServerError"}},"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":"integer"},"captionLengthUnit":{"enum":["characters","graphemes","characters_emoji_bytes"],"type":"string"},"captionMaxLengthWithMedia":{"type":"integer"},"mediaRules":{"type":"object","properties":{"min":{"type":"integer"},"max":{"type":"integer"},"allowedTypes":{"type":"array","items":{"enum":["IMAGE","VIDEO","GIF"],"type":"string"}},"allowedDimensions":{"type":"array","items":{"type":"object","properties":{"width":{"type":"integer"},"height":{"type":"integer"}},"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"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalServerError"}},"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":{"type":"object","properties":{"generationId":{"type":"string"}},"required":["generationId"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalServerError"}},"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":{"$ref":"#/components/schemas/AiGeneration"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalServerError"}},"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":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEndpoint"}}},"required":["data"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalServerError"}},"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":5,"items":{"enum":["post.published","post.failed","generation.completed","generation.failed","social_account.connected"],"type":"string"}},"description":{"type":"string","maxLength":500}},"required":["url","events"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpoint"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalServerError"}},"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":{"$ref":"#/components/schemas/WebhookEndpoint"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalServerError"}},"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":5,"items":{"enum":["post.published","post.failed","generation.completed","generation.failed","social_account.connected"],"type":"string"}},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"enabled":{"type":"boolean"}},"required":[]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpoint"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalServerError"}},"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":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalServerError"}},"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":{"$ref":"#/components/schemas/WebhookEndpoint"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalServerError"}},"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":{"type":"object","properties":{"deliveryId":{"type":"string"}},"required":["deliveryId"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalServerError"}},"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,"default":1},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookDelivery"}}},"required":["data"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-fern-sdk-group-name":"webhooks","x-fern-sdk-method-name":"listDeliveries","security":[{"apiKey":[]},{"oauth2":["webhooks:read"]}]}},"/v0/profiles":{"get":{"operationId":"v0.clientProfiles.list","summary":"List client profiles","description":"List the client profiles in your organization, each with the social accounts connected to it.","tags":["Client Profiles"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ClientProfile"}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-fern-sdk-group-name":"profiles","x-fern-sdk-method-name":"list","security":[{"apiKey":[]},{"oauth2":["social-accounts:read"]}]},"post":{"operationId":"v0.clientProfiles.create","summary":"Create a client profile","description":"Create a profile for one of your clients. Their social accounts are grouped under it so you can post on their behalf.","tags":["Client Profiles"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"externalId":{"type":"string","minLength":1,"maxLength":128,"description":"Your own identifier for this client (e.g. the user id in your system). Unique per organization; usable in place of the profile id."}},"required":["name"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientProfile"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-fern-sdk-group-name":"profiles","x-fern-sdk-method-name":"create","security":[{"apiKey":[]},{"oauth2":["social-accounts:write"]}]}},"/v0/profiles/{id}":{"get":{"operationId":"v0.clientProfiles.get","summary":"Get a client profile","description":"Get a client profile by its id or by the externalId you assigned, with its connected social accounts.","tags":["Client Profiles"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"description":"The profile id or the externalId you assigned to it."}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientProfile"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-fern-sdk-group-name":"profiles","x-fern-sdk-method-name":"retrieve","security":[{"apiKey":[]},{"oauth2":["social-accounts:read"]}]},"patch":{"operationId":"v0.clientProfiles.update","summary":"Update a client profile","description":"Rename a client profile or change its externalId.","tags":["Client Profiles"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"description":"The profile id or the externalId you assigned to it."}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"externalId":{"anyOf":[{"type":"string","minLength":1,"maxLength":128,"description":"Your own identifier for this client (e.g. the user id in your system). Unique per organization; usable in place of the profile id."},{"type":"null"}]}},"required":[]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientProfile"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-fern-sdk-group-name":"profiles","x-fern-sdk-method-name":"update","security":[{"apiKey":[]},{"oauth2":["social-accounts:write"]}]},"delete":{"operationId":"v0.clientProfiles.delete","summary":"Delete a client profile","description":"Delete a client profile. Its social accounts stay connected to your organization; they are just no longer grouped under the profile.","tags":["Client Profiles"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"description":"The profile id or the externalId you assigned to it."}}],"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"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-fern-sdk-group-name":"profiles","x-fern-sdk-method-name":"delete","security":[{"apiKey":[]},{"oauth2":["social-accounts:write"]}]}},"/v0/profiles/{id}/connect-link":{"post":{"operationId":"v0.clientProfiles.createConnectLink","summary":"Create a client connect link","description":"Returns a hosted link to send your client. They open it, sign in to their social platforms (no Schedulin account needed), and the accounts connect to your organization under this profile, ready to post to via the API. Links expire; create a new one any time. Accounts your client connects count toward your plan's channel limit.","tags":["Client Profiles"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"description":"The profile id or the externalId you assigned to it."}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"platforms":{"type":"array","minItems":1,"maxItems":50,"items":{"type":"string","minLength":1,"maxLength":64},"description":"Platform slugs the client may connect (e.g. instagram, tiktok). Omit to offer every platform."},"expiresInHours":{"type":"integer","minimum":1,"maximum":168,"description":"How long the link works. Defaults to 72 hours, max 7 days."},"redirectUrl":{"type":"string","maxLength":2048,"format":"uri","description":"Where the client's Done button takes them after connecting, e.g. back to your app."}},"required":[]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"Hosted page to send your client. No Schedulin login needed."},"expiresAt":{"type":"string"}},"required":["url","expiresAt"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-fern-sdk-group-name":"profiles","x-fern-sdk-method-name":"createConnectLink","security":[{"apiKey":[]},{"oauth2":["social-accounts:write"]}]}},"/v0/ideas":{"get":{"operationId":"v0.ideas.list","summary":"List ideas","description":"The workspace's Ideas board: its columns in order (the last column is Done) and every idea that isn't archived, ordered by column position.","tags":["Ideas"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"columns":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"order":{"type":"integer"},"isDone":{"type":"boolean","description":"The last column on the board; ideas moved here are marked completed"}},"required":["id","title","order","isDone"]}},"ideas":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"columnId":{"type":"string"},"order":{"type":"integer","description":"Position within its column, 0 = top"},"completedAt":{"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","title","description","columnId","order","completedAt","createdAt","updatedAt"]}}},"required":["columns","ideas"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-fern-sdk-group-name":"ideas","x-fern-sdk-method-name":"list","security":[{"apiKey":[]},{"oauth2":["posts:read"]}]},"post":{"operationId":"v0.ideas.create","summary":"Create an idea","description":"Add an idea to the bottom of a column (the first column when `columnId` is omitted). Creates the workspace's Ideas board if it doesn't exist yet.","tags":["Ideas"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":5000},"columnId":{"type":"string","minLength":1,"description":"Column to add the idea to; defaults to the first column"}},"required":["title"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"columnId":{"type":"string"},"order":{"type":"integer","description":"Position within its column, 0 = top"},"completedAt":{"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","title","description","columnId","order","completedAt","createdAt","updatedAt"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-fern-sdk-group-name":"ideas","x-fern-sdk-method-name":"create","security":[{"apiKey":[]},{"oauth2":["posts:write"]}]}},"/v0/ideas/{id}":{"patch":{"operationId":"v0.ideas.update","summary":"Update an idea","description":"Change an idea's title or description, or move it to the bottom of another column with `columnId`. Moving into the last (Done) column marks it completed; moving out clears that.","tags":["Ideas"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"description":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]},"columnId":{"type":"string","minLength":1,"description":"Move the idea to the bottom of this column"}},"required":[]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"columnId":{"type":"string"},"order":{"type":"integer","description":"Position within its column, 0 = top"},"completedAt":{"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","title","description","columnId","order","completedAt","createdAt","updatedAt"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-fern-sdk-group-name":"ideas","x-fern-sdk-method-name":"update","security":[{"apiKey":[]},{"oauth2":["posts:write"]}]},"delete":{"operationId":"v0.ideas.delete","summary":"Delete an idea","description":"Permanently delete an idea from the Ideas board.","tags":["Ideas"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"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"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-fern-sdk-group-name":"ideas","x-fern-sdk-method-name":"delete","security":[{"apiKey":[]},{"oauth2":["posts:write"]}]}},"/v0/workspace":{"get":{"operationId":"v0.workspace.get","summary":"Get the workspace","description":"The workspace the API key or OAuth token is scoped to: its name, the caller's role, whether posts need approval, the active plan, and usage against plan limits (connected channels, and posts used during a free trial). Check `plan.active` and `limits` before bulk scheduling to avoid `402` responses.","tags":["Workspace"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}]},"logo":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"requireApproval":{"type":"boolean","description":"When true, posts written by Members are held for approval before they publish"},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The caller's role in this workspace (owner, admin or member)"},"memberCount":{"type":"integer"},"plan":{"type":"object","properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Active plan id, or null when the workspace has no active plan"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Subscription status, e.g. active, trialing, past_due, canceled"},"active":{"type":"boolean","description":"Whether the workspace has an active plan, which scheduling and publishing require"}},"required":["id","name","status","active"]},"limits":{"type":"object","properties":{"channels":{"type":"object","properties":{"used":{"type":"integer","description":"Connected channels counting toward the limit"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Channel limit of the plan; null means unlimited or no plan"}},"required":["used","limit"]},"trialPosts":{"anyOf":[{"type":"object","properties":{"used":{"type":"integer"},"limit":{"type":"integer"}},"required":["used","limit"]},{"type":"null"}],"description":"During a free trial, how many of the trial's scheduled/published posts the caller has used; null outside a trial"}},"required":["channels","trialPosts"]}},"required":["id","name","slug","logo","createdAt","requireApproval","role","memberCount","plan","limits"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-fern-sdk-group-name":"workspace","x-fern-sdk-method-name":"retrieve","security":[{"apiKey":[]},{"oauth2":["org:read"]}]}},"/v0/analytics/overview":{"get":{"operationId":"v0.analytics.overview","summary":"Get workspace analytics totals","description":"Aggregate engagement totals (impressions, reach, likes, comments, shares, saves, video views, clicks, engagement), follower audience and posts published for the window, plus percent change vs the previous window of the same length. Covers posts published from the workspace's connected accounts. Filter with `platforms` and `socialAccountIds`; `from`/`to` may span up to 400 days. Metrics are collected periodically per post, so the most recent hours may still be filling in.","tags":["Analytics"],"parameters":[{"name":"from","in":"query","required":true,"schema":{"type":"string","description":"Start of the window (inclusive), ISO 8601. The window may span up to 400 days."},"allowEmptyValue":true,"allowReserved":true},{"name":"to","in":"query","required":true,"schema":{"type":"string","description":"End of the window (exclusive), ISO 8601"},"allowEmptyValue":true,"allowReserved":true},{"name":"platforms","in":"query","required":false,"schema":{"type":"array","maxItems":11,"items":{"enum":["bluesky","facebook","google_business_profile","instagram","linkedin","pinterest","reddit","threads","tiktok","twitter","youtube"],"type":"string"},"description":"Only include these platforms"},"style":"deepObject","explode":true,"allowEmptyValue":true,"allowReserved":true},{"name":"socialAccountIds","in":"query","required":false,"schema":{"type":"array","maxItems":100,"items":{"type":"string"},"description":"Only include these social accounts"},"style":"deepObject","explode":true,"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"totals":{"type":"object","properties":{"impressions":{"type":"integer"},"reach":{"type":"integer"},"likes":{"type":"integer"},"comments":{"type":"integer"},"shares":{"type":"integer"},"saves":{"type":"integer"},"videoViews":{"type":"integer"},"clicks":{"type":"integer"},"linkClicks":{"type":"integer"},"engagement":{"type":"integer"},"audience":{"type":"integer","description":"Sum of the latest follower count of each account at `to`"},"postsPublished":{"type":"integer"}},"required":["impressions","reach","likes","comments","shares","saves","videoViews","clicks","linkClicks","engagement","audience","postsPublished"]},"trend":{"type":"object","properties":{"impressions":{"anyOf":[{"type":"number"},{"type":"null"}]},"engagement":{"anyOf":[{"type":"number"},{"type":"null"}]},"likes":{"anyOf":[{"type":"number"},{"type":"null"}]},"audience":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["impressions","engagement","likes","audience"],"description":"Percent change vs the previous window of the same length; null when the previous window was zero"}},"required":["totals","trend"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-fern-sdk-group-name":"analytics","x-fern-sdk-method-name":"overview","security":[{"apiKey":[]},{"oauth2":["analytics:read"]}]}},"/v0/analytics/platforms":{"get":{"operationId":"v0.analytics.platformBreakdown","summary":"Get analytics totals by platform","description":"Engagement totals for the window grouped by platform, highest engagement first. Covers posts published from the workspace's connected accounts. Filter with `platforms` and `socialAccountIds`; `from`/`to` may span up to 400 days. Metrics are collected periodically per post, so the most recent hours may still be filling in.","tags":["Analytics"],"parameters":[{"name":"from","in":"query","required":true,"schema":{"type":"string","description":"Start of the window (inclusive), ISO 8601. The window may span up to 400 days."},"allowEmptyValue":true,"allowReserved":true},{"name":"to","in":"query","required":true,"schema":{"type":"string","description":"End of the window (exclusive), ISO 8601"},"allowEmptyValue":true,"allowReserved":true},{"name":"platforms","in":"query","required":false,"schema":{"type":"array","maxItems":11,"items":{"enum":["bluesky","facebook","google_business_profile","instagram","linkedin","pinterest","reddit","threads","tiktok","twitter","youtube"],"type":"string"},"description":"Only include these platforms"},"style":"deepObject","explode":true,"allowEmptyValue":true,"allowReserved":true},{"name":"socialAccountIds","in":"query","required":false,"schema":{"type":"array","maxItems":100,"items":{"type":"string"},"description":"Only include these social accounts"},"style":"deepObject","explode":true,"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"platforms":{"type":"array","items":{"type":"object","properties":{"platform":{"type":"string"},"impressions":{"type":"integer"},"likes":{"type":"integer"},"comments":{"type":"integer"},"shares":{"type":"integer"},"engagement":{"type":"integer"}},"required":["platform","impressions","likes","comments","shares","engagement"]}}},"required":["platforms"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-fern-sdk-group-name":"analytics","x-fern-sdk-method-name":"platformBreakdown","security":[{"apiKey":[]},{"oauth2":["analytics:read"]}]}},"/v0/analytics/top-posts":{"get":{"operationId":"v0.analytics.topPosts","summary":"List top-performing posts","description":"Posts ranked by `metric` (default `engagementTotal`) accumulated within the window. Covers posts published from the workspace's connected accounts. Filter with `platforms` and `socialAccountIds`; `from`/`to` may span up to 400 days. Metrics are collected periodically per post, so the most recent hours may still be filling in.","tags":["Analytics"],"parameters":[{"name":"from","in":"query","required":true,"schema":{"type":"string","description":"Start of the window (inclusive), ISO 8601. The window may span up to 400 days."},"allowEmptyValue":true,"allowReserved":true},{"name":"to","in":"query","required":true,"schema":{"type":"string","description":"End of the window (exclusive), ISO 8601"},"allowEmptyValue":true,"allowReserved":true},{"name":"platforms","in":"query","required":false,"schema":{"type":"array","maxItems":11,"items":{"enum":["bluesky","facebook","google_business_profile","instagram","linkedin","pinterest","reddit","threads","tiktok","twitter","youtube"],"type":"string"},"description":"Only include these platforms"},"style":"deepObject","explode":true,"allowEmptyValue":true,"allowReserved":true},{"name":"socialAccountIds","in":"query","required":false,"schema":{"type":"array","maxItems":100,"items":{"type":"string"},"description":"Only include these social accounts"},"style":"deepObject","explode":true,"allowEmptyValue":true,"allowReserved":true},{"name":"metric","in":"query","required":false,"schema":{"enum":["impressions","reach","likes","comments","shares","saves","videoViews","engagementTotal"],"type":"string","default":"engagementTotal","description":"Metric to rank by"},"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":50,"default":10},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"posts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"platform":{"type":"string"},"caption":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"value":{"type":"integer","description":"The ranking metric's total within the window"}},"required":["id","platform","caption","url","createdAt","value"]}}},"required":["posts"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-fern-sdk-group-name":"analytics","x-fern-sdk-method-name":"topPosts","security":[{"apiKey":[]},{"oauth2":["analytics:read"]}]}}}}