{"openapi":"3.1.0","info":{"title":"Api","version":"0.0.1","description":"Limits: a workspace may make 600 requests a minute (240 that are not GET or HEAD), 300 posts and 500 uploads (5 GB) in 24 hours, and 3000 scheduled posts waiting. A workspace with no plan may make 25 posts and upload 250 MB a day. On 429, stop and wait `retryAfter` seconds (also the Retry-After header) before the next call."},"paths":{"/v1/health":{"get":{"tags":["system"],"operationId":"system.health","parameters":[],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"signIn":{"type":"object","properties":{"github":{"type":"boolean"},"google":{"type":"boolean"}},"required":["github","google"],"additionalProperties":false},"mail":{"type":"boolean"},"networks":{"type":"object","properties":{"threads":{"type":"boolean"},"instagram":{"type":"boolean"},"tiktok":{"type":"boolean"},"x":{"type":"boolean"},"linkedin":{"type":"boolean"},"youtube":{"type":"boolean"},"discord":{"type":"boolean"},"telegram":{"type":"boolean"},"pinterest":{"type":"boolean"},"slack":{"type":"boolean"}},"required":["threads","instagram","tiktok","x","linkedin","youtube","discord","telegram","pinterest","slack"],"additionalProperties":false},"metaLive":{"type":"boolean"},"tiktokReads":{"type":"boolean"},"siteUrl":{"type":"string"},"testNetwork":{"type":"boolean"},"captchaSiteKey":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ok","signIn","mail","networks","metaLive","tiktokReads","siteUrl","testNetwork","captchaSiteKey"],"additionalProperties":false}}}}},"description":"Whether the instance is up, which sign-in methods and networks it has keys for, whether it can send mail, and whether the test network is on. Needs no sign-in.","summary":"Instance status"}},"/v1/me":{"get":{"tags":["account"],"operationId":"account.me","parameters":[],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"type":"string"},"email":{"type":"string"},"emailVerified":{"type":"boolean"},"name":{"type":"string"},"workspaceId":{"type":"string"},"workspaceName":{"type":"string"},"inReview":{"type":"array","items":{"type":"string"}}},"required":["userId","email","emailVerified","name","workspaceId","workspaceName","inReview"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"429":{"description":"TooManyRequests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsEncoded"}}}}},"description":"The user behind the session or API key, and their workspace.","summary":"Who is calling"}},"/v1/api-keys":{"get":{"tags":["account"],"operationId":"account.listKeys","parameters":[],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"prefix":{"type":"string"},"createdAt":{"type":"number"},"lastUsedAt":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","name","prefix","createdAt","lastUsedAt"],"additionalProperties":false}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"429":{"description":"TooManyRequests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsEncoded"}}}}},"description":"The workspace's API keys, without their secrets. Needs a signed-in session: an API key gets 403 Forbidden. Make the first key in the web app's Settings.","summary":"List API keys"},"post":{"tags":["account"],"operationId":"account.createKey","parameters":[],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"prefix":{"type":"string"},"createdAt":{"type":"number"},"lastUsedAt":{"anyOf":[{"type":"number"},{"type":"null"}]},"key":{"type":"string"}},"required":["id","name","prefix","createdAt","lastUsedAt","key"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidEncoded"}}}},"429":{"description":"TooManyRequests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsEncoded"}}}}},"description":"Answers the secret once, in `key`. Send it as a bearer token to /v1 and /mcp. A workspace has up to 25 API keys; past that, 422. Needs a signed-in session: an API key gets 403 Forbidden. Make the first key in the web app's Settings.","summary":"Create an API key","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200}},"required":["name"],"additionalProperties":false}}},"required":true}}},"/v1/connected-agents":{"get":{"tags":["account"],"operationId":"account.listConnectedAgents","parameters":[],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"approvedAt":{"type":"number"},"lastUsedAt":{"anyOf":[{"type":"number"},{"type":"null"}]},"softwareVersion":{"anyOf":[{"type":"string"},{"type":"null"}]},"uri":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","approvedAt","lastUsedAt","softwareVersion","uri"],"additionalProperties":false}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"429":{"description":"TooManyRequests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsEncoded"}}}}},"description":"Lists approved MCP clients and their recent use. Needs a signed-in session: an API key gets 403 Forbidden. Make the first key in the web app's Settings.","summary":"List connected agent apps"}},"/v1/api-keys/{id}":{"delete":{"tags":["account"],"operationId":"account.revokeKey","parameters":[{"name":"id","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"<No Content>"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"429":{"description":"TooManyRequests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsEncoded"}}}}},"description":"The key stops working at once. Needs a signed-in session: an API key gets 403 Forbidden. Make the first key in the web app's Settings.","summary":"Revoke an API key"}},"/v1/support":{"post":{"tags":["support"],"operationId":"support.send","parameters":[],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"receivedAt":{"type":"number"}},"required":["id","receivedAt"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidEncoded"}}}},"429":{"description":"TooManyRequests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsEncoded"}}}}},"description":"Sends a bug report (`bug`), a question (`question`) or an idea (`idea`) to the people who run PostJr. `message` is 1 to 5000 characters; `page` (the path the person was on, max 500) and `context` (build, userAgent, viewport) are optional. The request is stored, then emailed to the support inbox with the caller's email as Reply-To, so the answer comes by email. Never put tokens or passwords in `message`. The call answers 200 with an `id` and `receivedAt` even when the email could not be sent. At most 10 per user per hour, then 429; a blank message is 422.","summary":"Contact support","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["bug","question","idea"]},"message":{"type":"string","minLength":1,"maxLength":5000},"page":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"context":{"anyOf":[{"type":"object","properties":{"build":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"userAgent":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"viewport":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]}},"required":["kind","message"],"additionalProperties":false}}},"required":true}}},"/v1/billing":{"get":{"tags":["billing"],"operationId":"billing.status","parameters":[],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"exempt":{"type":"boolean"},"status":{"type":"string","enum":["none","trialing","active","past_due","canceled","incomplete"]},"trialEnd":{"anyOf":[{"type":"number"},{"type":"null"}]},"currentPeriodEnd":{"anyOf":[{"type":"number"},{"type":"null"}]},"cancelAtPeriodEnd":{"type":"boolean"},"graceEndsAt":{"anyOf":[{"type":"number"},{"type":"null"}]},"lapsed":{"type":"boolean"},"trialAvailable":{"type":"boolean"},"trialRefused":{"type":"boolean"},"accountsUsed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"accountLimit":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"plan":{"type":"string","enum":["starter","pro","agency"]},"interval":{"type":"string","enum":["month","year"]},"metricsRefreshMinutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"offered":{"type":"array","items":{"type":"object","properties":{"plan":{"type":"string","enum":["starter","pro","agency"]},"intervals":{"type":"array","items":{"type":"string","enum":["month","year"]}}},"required":["plan","intervals"],"additionalProperties":false}},"canSchedule":{"type":"boolean"},"canConnect":{"type":"boolean"}},"required":["enabled","exempt","status","trialEnd","currentPeriodEnd","cancelAtPeriodEnd","graceEndsAt","lapsed","trialAvailable","trialRefused","accountsUsed","accountLimit","plan","interval","metricsRefreshMinutes","offered","canSchedule","canConnect"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"429":{"description":"TooManyRequests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsEncoded"}}}}},"description":"The workspace's plan: status (none, trialing, active, past_due, canceled, incomplete), the trial end or next charge, accounts used of the plan's limit, the plan (starter, pro, agency) and interval (month, year), the plans on offer, and whether it can schedule and connect now. Posts already scheduled keep publishing while a payment is past due; after 7 days, and when cancelled, new scheduling and new connections are refused with 402. Written only from Stripe's signed webhooks.","summary":"Billing status"}},"/v1/billing/checkout":{"post":{"tags":["billing"],"operationId":"billing.checkout","parameters":[],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictEncoded"}}}},"429":{"description":"TooManyRequests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsEncoded"}}}},"502":{"description":"BadGateway","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadGatewayEncoded"}}}}},"description":"Answers the Stripe Checkout page to send the browser to, for `plan` (starter $29 a month, pro $49, agency $99; about 20% less a year) and `interval` (month or year). 7-day free trial (once per workspace and per card), card required. During the trial a workspace may connect as many different accounts as its plan's limit in all (disconnecting one does not free a place), 20 posts may go out per UTC day, X numbers are not read, and 20 alt texts a day are written with AI. 409 when this instance has no billing, the workspace is exempt, it already has a plan, or it does not sell that plan and interval.","summary":"Start a plan","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"plan":{"type":"string","enum":["starter","pro","agency"]},"interval":{"type":"string","enum":["month","year"]}},"required":["plan","interval"],"additionalProperties":false}}},"required":true}}},"/v1/billing/plan":{"post":{"tags":["billing"],"operationId":"billing.changePlan","parameters":[],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"exempt":{"type":"boolean"},"status":{"type":"string","enum":["none","trialing","active","past_due","canceled","incomplete"]},"trialEnd":{"anyOf":[{"type":"number"},{"type":"null"}]},"currentPeriodEnd":{"anyOf":[{"type":"number"},{"type":"null"}]},"cancelAtPeriodEnd":{"type":"boolean"},"graceEndsAt":{"anyOf":[{"type":"number"},{"type":"null"}]},"lapsed":{"type":"boolean"},"trialAvailable":{"type":"boolean"},"trialRefused":{"type":"boolean"},"accountsUsed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"accountLimit":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"plan":{"type":"string","enum":["starter","pro","agency"]},"interval":{"type":"string","enum":["month","year"]},"metricsRefreshMinutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"offered":{"type":"array","items":{"type":"object","properties":{"plan":{"type":"string","enum":["starter","pro","agency"]},"intervals":{"type":"array","items":{"type":"string","enum":["month","year"]}}},"required":["plan","intervals"],"additionalProperties":false}},"canSchedule":{"type":"boolean"},"canConnect":{"type":"boolean"}},"required":["enabled","exempt","status","trialEnd","currentPeriodEnd","cancelAtPeriodEnd","graceEndsAt","lapsed","trialAvailable","trialRefused","accountsUsed","accountLimit","plan","interval","metricsRefreshMinutes","offered","canSchedule","canConnect"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictEncoded"}}}},"429":{"description":"TooManyRequests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsEncoded"}}}},"502":{"description":"BadGateway","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadGatewayEncoded"}}}}},"description":"Moves a running plan to another plan or interval through Stripe, at once, prorated. Going up a plan charges the difference for what is left of the period straight away; going down, or changing interval, credits the unused time of the old price to the next invoice (Stripe's default). A plan in its free trial keeps the trial and is charged nothing yet. A card that is declined leaves the plan as it was (409). Nothing is disconnected on a downgrade: accounts stay connected, but one post may go to at most the new plan's accounts, and no account is added while the plan is full. Answers the new status. 409 when there is no running plan, it is already on that plan and interval, or this instance does not sell it.","summary":"Change plan","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"plan":{"type":"string","enum":["starter","pro","agency"]},"interval":{"type":"string","enum":["month","year"]}},"required":["plan","interval"],"additionalProperties":false}}},"required":true}}},"/v1/billing/trial/end":{"post":{"tags":["billing"],"operationId":"billing.endTrial","parameters":[],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"exempt":{"type":"boolean"},"status":{"type":"string","enum":["none","trialing","active","past_due","canceled","incomplete"]},"trialEnd":{"anyOf":[{"type":"number"},{"type":"null"}]},"currentPeriodEnd":{"anyOf":[{"type":"number"},{"type":"null"}]},"cancelAtPeriodEnd":{"type":"boolean"},"graceEndsAt":{"anyOf":[{"type":"number"},{"type":"null"}]},"lapsed":{"type":"boolean"},"trialAvailable":{"type":"boolean"},"trialRefused":{"type":"boolean"},"accountsUsed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"accountLimit":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"plan":{"type":"string","enum":["starter","pro","agency"]},"interval":{"type":"string","enum":["month","year"]},"metricsRefreshMinutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"offered":{"type":"array","items":{"type":"object","properties":{"plan":{"type":"string","enum":["starter","pro","agency"]},"intervals":{"type":"array","items":{"type":"string","enum":["month","year"]}}},"required":["plan","intervals"],"additionalProperties":false}},"canSchedule":{"type":"boolean"},"canConnect":{"type":"boolean"}},"required":["enabled","exempt","status","trialEnd","currentPeriodEnd","cancelAtPeriodEnd","graceEndsAt","lapsed","trialAvailable","trialRefused","accountsUsed","accountLimit","plan","interval","metricsRefreshMinutes","offered","canSchedule","canConnect"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictEncoded"}}}},"429":{"description":"TooManyRequests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsEncoded"}}}},"502":{"description":"BadGateway","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadGatewayEncoded"}}}}},"description":"Ends the free trial at once: Stripe charges the first period now, and the trial's limits stop. Answers the new status. 409 when the workspace is not in its free trial.","summary":"Start the plan now"}},"/v1/billing/portal":{"post":{"tags":["billing"],"operationId":"billing.portal","parameters":[],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictEncoded"}}}},"429":{"description":"TooManyRequests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsEncoded"}}}},"502":{"description":"BadGateway","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadGatewayEncoded"}}}}},"description":"Answers Stripe's customer portal, where the card changes and the plan cancels. 409 until the workspace has started a plan.","summary":"Manage billing"}},"/v1/channels":{"get":{"tags":["channels"],"operationId":"channels.list","parameters":[],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"network":{"type":"string","enum":["fake","bluesky","mastodon","threads","instagram","tiktok","x","linkedin","youtube","discord","telegram","pinterest","slack"]},"handle":{"type":"string"},"displayName":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatarUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"instanceDomain":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["active","needs_reconnect","disconnected"]},"lastCheckedAt":{"anyOf":[{"type":"number"},{"type":"null"}]},"lastError":{"anyOf":[{"type":"string"},{"type":"null"}]},"reconnectBy":{"anyOf":[{"type":"number"},{"type":"null"}]},"readsNumbers":{"type":"boolean"},"limits":{"type":"object","properties":{"maxChars":{"type":"number"},"maxImages":{"type":"number"},"urlLength":{"type":"number"},"imageBytes":{"type":"number"},"imagePixels":{"anyOf":[{"type":"number"},{"type":"null"}]},"videoBytes":{"type":"number"},"videoPixels":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["maxChars","maxImages","urlLength","imageBytes","imagePixels","videoBytes","videoPixels"],"additionalProperties":false}},"required":["id","network","handle","displayName","avatarUrl","instanceDomain","status","lastCheckedAt","lastError","reconnectBy","readsNumbers","limits"],"additionalProperties":false}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"429":{"description":"TooManyRequests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsEncoded"}}}}},"description":"Connected social accounts with their network, handle, status and text limits. A workspace can hold several accounts on one network.","summary":"List channels"}},"/v1/channels/fake":{"post":{"tags":["channels"],"operationId":"channels.connectFake","parameters":[],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"network":{"type":"string","enum":["fake","bluesky","mastodon","threads","instagram","tiktok","x","linkedin","youtube","discord","telegram","pinterest","slack"]},"handle":{"type":"string"},"displayName":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatarUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"instanceDomain":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["active","needs_reconnect","disconnected"]},"lastCheckedAt":{"anyOf":[{"type":"number"},{"type":"null"}]},"lastError":{"anyOf":[{"type":"string"},{"type":"null"}]},"reconnectBy":{"anyOf":[{"type":"number"},{"type":"null"}]},"readsNumbers":{"type":"boolean"},"limits":{"type":"object","properties":{"maxChars":{"type":"number"},"maxImages":{"type":"number"},"urlLength":{"type":"number"},"imageBytes":{"type":"number"},"imagePixels":{"anyOf":[{"type":"number"},{"type":"null"}]},"videoBytes":{"type":"number"},"videoPixels":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["maxChars","maxImages","urlLength","imageBytes","imagePixels","videoBytes","videoPixels"],"additionalProperties":false}},"required":["id","network","handle","displayName","avatarUrl","instanceDomain","status","lastCheckedAt","lastError","reconnectBy","readsNumbers","limits"],"additionalProperties":false}}}},"400":{"description":"ConnectFailed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectFailedEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"402":{"description":"PlanRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanRequiredEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"429":{"description":"TooManyRequests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsEncoded"}}}}},"description":"Local end-to-end runs only.","summary":"Connect a test channel","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"handle":{"type":"string","minLength":1}},"required":["handle"],"additionalProperties":false}}},"required":true}}},"/v1/channels/bluesky":{"post":{"tags":["channels"],"operationId":"channels.connectBluesky","parameters":[],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"network":{"type":"string","enum":["fake","bluesky","mastodon","threads","instagram","tiktok","x","linkedin","youtube","discord","telegram","pinterest","slack"]},"handle":{"type":"string"},"displayName":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatarUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"instanceDomain":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["active","needs_reconnect","disconnected"]},"lastCheckedAt":{"anyOf":[{"type":"number"},{"type":"null"}]},"lastError":{"anyOf":[{"type":"string"},{"type":"null"}]},"reconnectBy":{"anyOf":[{"type":"number"},{"type":"null"}]},"readsNumbers":{"type":"boolean"},"limits":{"type":"object","properties":{"maxChars":{"type":"number"},"maxImages":{"type":"number"},"urlLength":{"type":"number"},"imageBytes":{"type":"number"},"imagePixels":{"anyOf":[{"type":"number"},{"type":"null"}]},"videoBytes":{"type":"number"},"videoPixels":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["maxChars","maxImages","urlLength","imageBytes","imagePixels","videoBytes","videoPixels"],"additionalProperties":false}},"required":["id","network","handle","displayName","avatarUrl","instanceDomain","status","lastCheckedAt","lastError","reconnectBy","readsNumbers","limits"],"additionalProperties":false}}}},"400":{"description":"ConnectFailed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectFailedEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"402":{"description":"PlanRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanRequiredEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"429":{"description":"TooManyRequests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsEncoded"}}}}},"description":"Signs in with a handle and an app password, never the main password. With `channelId`, reconnects that channel on its own server and refuses a different account. A workspace without a plan (no subscription, a payment failed more than 7 days ago, or cancelled), or one at its plan's account limit, or a post to more accounts than its plan allows (Starter 6, Pro 30, Agency 100), is refused with 402 PlanRequired and nothing changes. In the free trial, connecting more different accounts than the plan's limit over the whole trial (disconnecting one frees no place; reconnecting the same account is fine) is refused the same way with reason trial_limit, and a schedule that would put more than 20 copies on one UTC day before the trial ends is refused with 422. See GET /v1/billing.","summary":"Connect Bluesky","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"identifier":{"type":"string","minLength":1},"appPassword":{"type":"string","minLength":1},"service":{"anyOf":[{"type":"string"},{"type":"null"}]},"channelId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["identifier","appPassword"],"additionalProperties":false}}},"required":true}}},"/v1/channels/telegram/connect":{"post":{"tags":["channels"],"operationId":"channels.startTelegram","parameters":[],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"botUsername":{"type":"string"},"channelLink":{"type":"string"},"groupLink":{"type":"string"},"expiresAt":{"type":"number"}},"required":["code","botUsername","channelLink","groupLink","expiresAt"],"additionalProperties":false}}}},"400":{"description":"ConnectFailed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectFailedEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"402":{"description":"PlanRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanRequiredEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"429":{"description":"TooManyRequests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsEncoded"}}}}},"description":"Answers a one-time code (valid 30 minutes) and PostJr's bot. Add the bot to the channel or group as an administrator who can post messages, then send `/connect <code>` there. PostJr learns the chat from Telegram's webhook and adds it as a channel, and open tabs refetch; poll GET /v1/channels to see it. One code connects one chat. With `channelId`, the code reconnects that channel and refuses a different chat. A workspace without a plan (no subscription, a payment failed more than 7 days ago, or cancelled), or one at its plan's account limit, or a post to more accounts than its plan allows (Starter 6, Pro 30, Agency 100), is refused with 402 PlanRequired and nothing changes. In the free trial, connecting more different accounts than the plan's limit over the whole trial (disconnecting one frees no place; reconnecting the same account is fine) is refused the same way with reason trial_limit, and a schedule that would put more than 20 copies on one UTC day before the trial ends is refused with 422. See GET /v1/billing.","summary":"Start connecting a Telegram channel or group","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"channelId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false}}},"required":true}}},"/v1/channels/mastodon/connect":{"post":{"tags":["channels"],"operationId":"channels.startMastodon","parameters":[],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"],"additionalProperties":false}}}},"400":{"description":"ConnectFailed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectFailedEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"402":{"description":"PlanRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanRequiredEncoded"}}}},"429":{"description":"TooManyRequests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsEncoded"}}}}},"description":"Registers PostJr with the server if needed and answers the consent page to send the browser to. The server signs in whoever the browser is signed in as there. A workspace without a plan (no subscription, a payment failed more than 7 days ago, or cancelled), or one at its plan's account limit, or a post to more accounts than its plan allows (Starter 6, Pro 30, Agency 100), is refused with 402 PlanRequired and nothing changes. In the free trial, connecting more different accounts than the plan's limit over the whole trial (disconnecting one frees no place; reconnecting the same account is fine) is refused the same way with reason trial_limit, and a schedule that would put more than 20 copies on one UTC day before the trial ends is refused with 422. See GET /v1/billing.","summary":"Start connecting Mastodon","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"instance":{"type":"string","minLength":1}},"required":["instance"],"additionalProperties":false}}},"required":true}}},"/v1/channels/mastodon/callback":{"get":{"tags":["channels"],"operationId":"channels.finishMastodon","parameters":[{"name":"code","in":"query","schema":{"type":"string"},"required":false},{"name":"state","in":"query","schema":{"type":"string"},"required":true},{"name":"error","in":"query","schema":{"type":"string"},"required":false}],"security":[],"responses":{"200":{"description":"<No Content>"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"429":{"description":"TooManyRequests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsEncoded"}}}}},"description":"Redirects to /accounts with `connected` (a new channel), `reconnected` (the same channel again), `choose` (a Slack workspace is signed in and its channels are waiting to be chosen, with `network=slack`) or `error`.","summary":"Mastodon callback"}},"/v1/channels/oauth/{network}/connect":{"post":{"tags":["channels"],"operationId":"channels.startOAuth","parameters":[{"name":"network","in":"path","schema":{"type":"string","enum":["threads","instagram","tiktok","x","linkedin","youtube","discord","pinterest","slack"]},"required":true}],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"],"additionalProperties":false}}}},"400":{"description":"ConnectFailed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectFailedEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"402":{"description":"PlanRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanRequiredEncoded"}}}},"429":{"description":"TooManyRequests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsEncoded"}}}}},"description":"Answers the network's consent page to send the browser to. Each network signs in whoever the browser is signed in as there. Threads and Instagram are refused with a \"coming soon\" message until the instance's Meta apps are live (/health `metaLive`). A network the instance lists in NETWORKS_IN_REVIEW is refused the same way for every workspace but the ones in REVIEW_WORKSPACES (`/me` `inReview` names them); reconnecting is refused too, and channels already connected keep working. A workspace without a plan (no subscription, a payment failed more than 7 days ago, or cancelled), or one at its plan's account limit, or a post to more accounts than its plan allows (Starter 6, Pro 30, Agency 100), is refused with 402 PlanRequired and nothing changes. In the free trial, connecting more different accounts than the plan's limit over the whole trial (disconnecting one frees no place; reconnecting the same account is fine) is refused the same way with reason trial_limit, and a schedule that would put more than 20 copies on one UTC day before the trial ends is refused with 422. See GET /v1/billing.","summary":"Start connecting Threads, Instagram, TikTok, X, LinkedIn, YouTube, Discord, Pinterest or Slack"}},"/v1/channels/oauth/{network}/callback":{"get":{"tags":["channels"],"operationId":"channels.finishOAuth","parameters":[{"name":"network","in":"path","schema":{"type":"string","enum":["threads","instagram","tiktok","x","linkedin","youtube","discord","pinterest","slack"]},"required":true},{"name":"code","in":"query","schema":{"type":"string"},"required":false},{"name":"state","in":"query","schema":{"type":"string"},"required":true},{"name":"error","in":"query","schema":{"type":"string"},"required":false},{"name":"error_description","in":"query","schema":{"type":"string"},"required":false},{"name":"guild_id","in":"query","schema":{"type":"string"},"required":false},{"name":"permissions","in":"query","schema":{"type":"string"},"required":false}],"security":[],"responses":{"200":{"description":"<No Content>"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"429":{"description":"TooManyRequests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsEncoded"}}}}},"description":"Redirects to /accounts with `connected` (a new channel), `reconnected` (the same channel again), `choose` (a Slack workspace is signed in and its channels are waiting to be chosen, with `network=slack`) or `error`. Discord redirects with `discordPick` instead of `connected`: the server is added and the channels are still to be chosen (GET /v1/channels/discord/:pick).","summary":"Network callback"}},"/v1/channels/discord/{pick}":{"get":{"tags":["channels"],"operationId":"channels.discordChannels","parameters":[{"name":"pick","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"server":{"type":"string"},"channels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"added":{"type":"boolean"}},"required":["id","name","added"],"additionalProperties":false}}},"required":["server","channels"],"additionalProperties":false}}}},"400":{"description":"ConnectFailed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectFailedEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"429":{"description":"TooManyRequests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsEncoded"}}}}},"description":"After the PostJr bot was added to a server, answers the server's name and the text and announcement channels the bot can post in, each with `added` (already a PostJr account). `pick` is the `discordPick` value of the callback; it works for 10 minutes.","summary":"List a Discord server's channels"},"post":{"tags":["channels"],"operationId":"channels.connectDiscord","parameters":[{"name":"pick","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"network":{"type":"string","enum":["fake","bluesky","mastodon","threads","instagram","tiktok","x","linkedin","youtube","discord","telegram","pinterest","slack"]},"handle":{"type":"string"},"displayName":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatarUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"instanceDomain":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["active","needs_reconnect","disconnected"]},"lastCheckedAt":{"anyOf":[{"type":"number"},{"type":"null"}]},"lastError":{"anyOf":[{"type":"string"},{"type":"null"}]},"reconnectBy":{"anyOf":[{"type":"number"},{"type":"null"}]},"readsNumbers":{"type":"boolean"},"limits":{"type":"object","properties":{"maxChars":{"type":"number"},"maxImages":{"type":"number"},"urlLength":{"type":"number"},"imageBytes":{"type":"number"},"imagePixels":{"anyOf":[{"type":"number"},{"type":"null"}]},"videoBytes":{"type":"number"},"videoPixels":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["maxChars","maxImages","urlLength","imageBytes","imagePixels","videoBytes","videoPixels"],"additionalProperties":false}},"required":["id","network","handle","displayName","avatarUrl","instanceDomain","status","lastCheckedAt","lastError","reconnectBy","readsNumbers","limits"],"additionalProperties":false}}}}},"400":{"description":"ConnectFailed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectFailedEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"402":{"description":"PlanRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanRequiredEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"429":{"description":"TooManyRequests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsEncoded"}}}}},"description":"Makes one account of each chosen channel of the server (handle `#channel`, name the server's). A channel that is already an account is kept. A workspace without a plan (no subscription, a payment failed more than 7 days ago, or cancelled), or one at its plan's account limit, or a post to more accounts than its plan allows (Starter 6, Pro 30, Agency 100), is refused with 402 PlanRequired and nothing changes. In the free trial, connecting more different accounts than the plan's limit over the whole trial (disconnecting one frees no place; reconnecting the same account is fine) is refused the same way with reason trial_limit, and a schedule that would put more than 20 copies on one UTC day before the trial ends is refused with 422. See GET /v1/billing.","summary":"Connect Discord channels","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"channelIds":{"type":"array","prefixItems":[{"type":"string"}],"minItems":1,"items":{"type":"string"}}},"required":["channelIds"],"additionalProperties":false}}},"required":true}}},"/v1/channels/oauth/{network}/choose/{state}":{"get":{"tags":["channels"],"operationId":"channels.pendingChoice","parameters":[{"name":"network","in":"path","schema":{"type":"string","enum":["threads","instagram","tiktok","x","linkedin","youtube","discord","pinterest","slack"]},"required":true},{"name":"state","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"type":"string"},"channels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"isPrivate":{"type":"boolean"},"connected":{"type":"boolean"}},"required":["id","name","isPrivate","connected"],"additionalProperties":false}}},"required":["workspace","channels"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"429":{"description":"TooManyRequests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsEncoded"}}}}},"description":"After Slack's consent page, its callback redirects to /accounts with `choose` and `network=slack`. This lists that workspace's channels (public ones, and private ones the PostJr app was invited to), valid for 10 minutes; `connected` marks channels that are already accounts.","summary":"List the channels to choose from"},"post":{"tags":["channels"],"operationId":"channels.choose","parameters":[{"name":"network","in":"path","schema":{"type":"string","enum":["threads","instagram","tiktok","x","linkedin","youtube","discord","pinterest","slack"]},"required":true},{"name":"state","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"network":{"type":"string","enum":["fake","bluesky","mastodon","threads","instagram","tiktok","x","linkedin","youtube","discord","telegram","pinterest","slack"]},"handle":{"type":"string"},"displayName":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatarUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"instanceDomain":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["active","needs_reconnect","disconnected"]},"lastCheckedAt":{"anyOf":[{"type":"number"},{"type":"null"}]},"lastError":{"anyOf":[{"type":"string"},{"type":"null"}]},"reconnectBy":{"anyOf":[{"type":"number"},{"type":"null"}]},"readsNumbers":{"type":"boolean"},"limits":{"type":"object","properties":{"maxChars":{"type":"number"},"maxImages":{"type":"number"},"urlLength":{"type":"number"},"imageBytes":{"type":"number"},"imagePixels":{"anyOf":[{"type":"number"},{"type":"null"}]},"videoBytes":{"type":"number"},"videoPixels":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["maxChars","maxImages","urlLength","imageBytes","imagePixels","videoBytes","videoPixels"],"additionalProperties":false}},"required":["id","network","handle","displayName","avatarUrl","instanceDomain","status","lastCheckedAt","lastError","reconnectBy","readsNumbers","limits"],"additionalProperties":false}}}}},"400":{"description":"ConnectFailed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectFailedEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"402":{"description":"PlanRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanRequiredEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"429":{"description":"TooManyRequests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsEncoded"}}}}},"description":"Makes one account of each chosen channel (a Slack channel is an account: its id is the account's id, its handle \"#name\"). A workspace without a plan (no subscription, a payment failed more than 7 days ago, or cancelled), or one at its plan's account limit, or a post to more accounts than its plan allows (Starter 6, Pro 30, Agency 100), is refused with 402 PlanRequired and nothing changes. In the free trial, connecting more different accounts than the plan's limit over the whole trial (disconnecting one frees no place; reconnecting the same account is fine) is refused the same way with reason trial_limit, and a schedule that would put more than 20 copies on one UTC day before the trial ends is refused with 422. See GET /v1/billing.","summary":"Connect the chosen channels","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"channelIds":{"type":"array","prefixItems":[{"type":"string"}],"minItems":1,"items":{"type":"string"}}},"required":["channelIds"],"additionalProperties":false}}},"required":true}}},"/v1/channels/{id}/reconnect":{"post":{"tags":["channels"],"operationId":"channels.reconnect","parameters":[{"name":"id","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"],"additionalProperties":false}}}},"400":{"description":"ConnectFailed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectFailedEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"402":{"description":"PlanRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanRequiredEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"429":{"description":"TooManyRequests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsEncoded"}}}}},"description":"Answers the consent page to sign the channel's account in again, for Mastodon and the OAuth networks. The callback refuses a different account instead of adding it. Bluesky reconnects through POST /v1/channels/bluesky with channelId.","summary":"Reconnect a channel"}},"/v1/channels/{id}/check":{"post":{"tags":["channels"],"operationId":"channels.check","parameters":[{"name":"id","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"network":{"type":"string","enum":["fake","bluesky","mastodon","threads","instagram","tiktok","x","linkedin","youtube","discord","telegram","pinterest","slack"]},"handle":{"type":"string"},"displayName":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatarUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"instanceDomain":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["active","needs_reconnect","disconnected"]},"lastCheckedAt":{"anyOf":[{"type":"number"},{"type":"null"}]},"lastError":{"anyOf":[{"type":"string"},{"type":"null"}]},"reconnectBy":{"anyOf":[{"type":"number"},{"type":"null"}]},"readsNumbers":{"type":"boolean"},"limits":{"type":"object","properties":{"maxChars":{"type":"number"},"maxImages":{"type":"number"},"urlLength":{"type":"number"},"imageBytes":{"type":"number"},"imagePixels":{"anyOf":[{"type":"number"},{"type":"null"}]},"videoBytes":{"type":"number"},"videoPixels":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["maxChars","maxImages","urlLength","imageBytes","imagePixels","videoBytes","videoPixels"],"additionalProperties":false}},"required":["id","network","handle","displayName","avatarUrl","instanceDomain","status","lastCheckedAt","lastError","reconnectBy","readsNumbers","limits"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"429":{"description":"TooManyRequests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsEncoded"}}}}},"description":"Asks the network whether the channel's sign-in still works, refreshing it first when it is about to expire, and records the result in its status.","summary":"Check a channel"}},"/v1/channels/{id}/tiktok":{"get":{"tags":["channels"],"operationId":"channels.tiktok","parameters":[{"name":"id","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"nickname":{"type":"string"},"username":{"type":"string"},"privacyOptions":{"type":"array","items":{"type":"string","enum":["PUBLIC_TO_EVERYONE","MUTUAL_FOLLOW_FRIENDS","FOLLOWER_OF_CREATOR","SELF_ONLY"]}},"commentDisabled":{"type":"boolean"},"duetDisabled":{"type":"boolean"},"stitchDisabled":{"type":"boolean"},"maxDurationSec":{"type":"number"},"canInbox":{"type":"boolean"}},"required":["nickname","username","privacyOptions","commentDisabled","duetDisabled","stitchDisabled","maxDurationSec","canInbox"],"additionalProperties":false}}}},"400":{"description":"ConnectFailed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectFailedEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"429":{"description":"TooManyRequests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsEncoded"}}}}},"description":"Read from TikTok now: the account's nickname, the privacy levels it offers, interactions it turned off, its longest video in seconds, and `canInbox` (whether PostJr holds the video.upload permission that sending a draft to its TikTok inbox needs; false for a channel connected before PostJr asked for it, which must reconnect). Show them to the person and let them choose before scheduling a TikTok post, as TikTok requires.","summary":"Read a TikTok channel's posting options"}},"/v1/channels/{id}/pinterest/boards":{"get":{"tags":["channels"],"operationId":"channels.pinterestBoards","parameters":[{"name":"id","in":"path","schema":{"type":"string"},"required":true},{"name":"boardId","in":"query","schema":{"type":"string"},"required":false}],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"boards":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"privacy":{"type":"string"}},"required":["id","name","privacy"],"additionalProperties":false}},"sections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}}},"required":["boards","sections"],"additionalProperties":false}}}},"400":{"description":"ConnectFailed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectFailedEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"429":{"description":"TooManyRequests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsEncoded"}}}}},"description":"Read from Pinterest now (PostJr does not keep them): the boards the account can pin to, with their privacy (PUBLIC, PROTECTED or SECRET), and, when `boardId` is given, that board's sections. Choose one board per Pinterest copy before scheduling; there is no default.","summary":"Read a Pinterest account's boards"}},"/v1/channels/{id}":{"delete":{"tags":["channels"],"operationId":"channels.disconnect","parameters":[{"name":"id","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"<No Content>"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"429":{"description":"TooManyRequests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsEncoded"}}}}},"description":"Deletes its credentials and cancels its scheduled publications.","summary":"Disconnect a channel"}},"/v1/groups":{"get":{"tags":["groups"],"operationId":"groups.list","parameters":[],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"publishTarget":{"type":"boolean"},"position":{"type":"number"},"channelIds":{"type":"array","items":{"type":"string"}},"startingText":{"anyOf":[{"type":"string","maxLength":100000},{"type":"null"}]},"startingVariants":{"type":"array","items":{"type":"object","properties":{"channelId":{"type":"string"},"body":{"anyOf":[{"type":"string","maxLength":100000},{"type":"null"}]},"xCommunityId":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"},{"type":"null"}]}},"required":["channelId","body"],"additionalProperties":false}},"revision":{"type":"number"},"createdAt":{"type":"number"},"updatedAt":{"type":"number"}},"required":["id","name","publishTarget","position","channelIds","startingText","startingVariants","revision","createdAt","updatedAt"],"additionalProperties":false}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"429":{"description":"TooManyRequests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsEncoded"}}}}},"description":"The workspace's channel groups in position order, each with its channel ids. A group marked publishTarget is offered as one choice when composing.","summary":"List groups"},"post":{"tags":["groups"],"operationId":"groups.create","parameters":[],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"publishTarget":{"type":"boolean"},"position":{"type":"number"},"channelIds":{"type":"array","items":{"type":"string"}},"startingText":{"anyOf":[{"type":"string","maxLength":100000},{"type":"null"}]},"startingVariants":{"type":"array","items":{"type":"object","properties":{"channelId":{"type":"string"},"body":{"anyOf":[{"type":"string","maxLength":100000},{"type":"null"}]},"xCommunityId":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"},{"type":"null"}]}},"required":["channelId","body"],"additionalProperties":false}},"revision":{"type":"number"},"createdAt":{"type":"number"},"updatedAt":{"type":"number"}},"required":["id","name","publishTarget","position","channelIds","startingText","startingVariants","revision","createdAt","updatedAt"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidEncoded"}}}},"429":{"description":"TooManyRequests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsEncoded"}}}}},"description":"A named set of this workspace's channels. `channelIds` must be connected channels of the workspace (otherwise 422, with the ids under `problems`); `position` defaults to after the last group.","summary":"Create a group","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"publishTarget":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"channelIds":{"anyOf":[{"type":"array","items":{"type":"string"},"maxItems":100},{"type":"null"}]},"position":{"anyOf":[{"type":"number"},{"type":"null"}]},"startingText":{"anyOf":[{"type":"string","maxLength":100000},{"type":"null"},{"type":"null"}]},"startingVariants":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"channelId":{"type":"string"},"body":{"anyOf":[{"type":"string","maxLength":100000},{"type":"null"}]},"xCommunityId":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"},{"type":"null"}]}},"required":["channelId","body"],"additionalProperties":false},"maxItems":100},{"type":"null"}]}},"required":["name"],"additionalProperties":false}}},"required":true}}},"/v1/groups/{id}":{"patch":{"tags":["groups"],"operationId":"groups.update","parameters":[{"name":"id","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"publishTarget":{"type":"boolean"},"position":{"type":"number"},"channelIds":{"type":"array","items":{"type":"string"}},"startingText":{"anyOf":[{"type":"string","maxLength":100000},{"type":"null"}]},"startingVariants":{"type":"array","items":{"type":"object","properties":{"channelId":{"type":"string"},"body":{"anyOf":[{"type":"string","maxLength":100000},{"type":"null"}]},"xCommunityId":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"},{"type":"null"}]}},"required":["channelId","body"],"additionalProperties":false}},"revision":{"type":"number"},"createdAt":{"type":"number"},"updatedAt":{"type":"number"}},"required":["id","name","publishTarget","position","channelIds","startingText","startingVariants","revision","createdAt","updatedAt"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictEncoded"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidEncoded"}}}},"429":{"description":"TooManyRequests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsEncoded"}}}}},"description":"Changes what is sent: `name`, `publishTarget`, `position`, or `channelIds` (which replaces the members in that order). With `expectedRevision`, a group edited since answers 409.","summary":"Edit a group","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}]},"publishTarget":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"channelIds":{"anyOf":[{"type":"array","items":{"type":"string"},"maxItems":100},{"type":"null"}]},"position":{"anyOf":[{"type":"number"},{"type":"null"}]},"startingText":{"anyOf":[{"type":"string","maxLength":100000},{"type":"null"},{"type":"null"}]},"startingVariants":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"channelId":{"type":"string"},"body":{"anyOf":[{"type":"string","maxLength":100000},{"type":"null"}]},"xCommunityId":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"},{"type":"null"}]}},"required":["channelId","body"],"additionalProperties":false},"maxItems":100},{"type":"null"}]},"expectedRevision":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"additionalProperties":false}}},"required":true}},"delete":{"tags":["groups"],"operationId":"groups.delete","parameters":[{"name":"id","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"<No Content>"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"429":{"description":"TooManyRequests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsEncoded"}}}}},"description":"Removes the group and its memberships. The channels stay connected.","summary":"Delete a group"}},"/v1/feeds":{"get":{"tags":["feeds"],"operationId":"feeds.list","parameters":[{"name":"view","in":"query","schema":{"type":"string","enum":["brief"],"description":"Return only ids, publication states, due times, external URLs, errors and actionable problems."},"required":false}],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"name":{"type":"string"},"template":{"type":"string"},"channelIds":{"type":"array","items":{"type":"string"}},"groupId":{"anyOf":[{"type":"string"},{"type":"null"}]},"firstFetch":{"type":"string","enum":["latest","none"]},"status":{"type":"string","enum":["active","paused"]},"lastCheckedAt":{"anyOf":[{"type":"number"},{"type":"null"}]},"lastSuccessAt":{"anyOf":[{"type":"number"},{"type":"null"}]},"nextCheckAt":{"type":"number"},"failures":{"type":"number"},"lastError":{"anyOf":[{"type":"string"},{"type":"null"}]},"latest":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"link":{"anyOf":[{"type":"string"},{"type":"null"}]},"publishedAt":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["title","link","publishedAt"],"additionalProperties":false}},"drafts":{"type":"number"},"revision":{"type":"number"},"createdAt":{"type":"number"},"updatedAt":{"type":"number"}},"required":["id","url","name","template","channelIds","groupId","firstFetch","status","lastCheckedAt","lastSuccessAt","nextCheckAt","failures","lastError","latest","drafts","revision","createdAt","updatedAt"],"additionalProperties":false}},{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"},"status":{"type":"string","enum":["active","paused"]},"failures":{"type":"number"},"lastError":{"anyOf":[{"type":"string"},{"type":"null"}]},"drafts":{"type":"number"}},"required":["id","name","url","status","failures","lastError","drafts"],"additionalProperties":false}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"429":{"description":"TooManyRequests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsEncoded"}}}}},"description":"The workspace's RSS and Atom feeds, newest first, each with its last error, back-off and the newest items it read. Set `view=brief` for ids, names, status and errors only.","summary":"List feeds"},"post":{"tags":["feeds"],"operationId":"feeds.create","parameters":[],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"name":{"type":"string"},"template":{"type":"string"},"channelIds":{"type":"array","items":{"type":"string"}},"groupId":{"anyOf":[{"type":"string"},{"type":"null"}]},"firstFetch":{"type":"string","enum":["latest","none"]},"status":{"type":"string","enum":["active","paused"]},"lastCheckedAt":{"anyOf":[{"type":"number"},{"type":"null"}]},"lastSuccessAt":{"anyOf":[{"type":"number"},{"type":"null"}]},"nextCheckAt":{"type":"number"},"failures":{"type":"number"},"lastError":{"anyOf":[{"type":"string"},{"type":"null"}]},"latest":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"link":{"anyOf":[{"type":"string"},{"type":"null"}]},"publishedAt":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["title","link","publishedAt"],"additionalProperties":false}},"drafts":{"type":"number"},"revision":{"type":"number"},"createdAt":{"type":"number"},"updatedAt":{"type":"number"}},"required":["id","url","name","template","channelIds","groupId","firstFetch","status","lastCheckedAt","lastSuccessAt","nextCheckAt","failures","lastError","latest","drafts","revision","createdAt","updatedAt"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"},"status":{"type":"string","enum":["active","paused"]},"failures":{"type":"number"},"lastError":{"anyOf":[{"type":"string"},{"type":"null"}]},"drafts":{"type":"number"}},"required":["id","name","url","status","failures","lastError","drafts"],"additionalProperties":false}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidEncoded"}}}},"429":{"description":"TooManyRequests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsEncoded"}}}}},"description":"Reads the feed once and follows it: up to 20 per workspace; each new item becomes a draft, never a published post. The URL must be https on a public host and answer RSS 2.0, RSS 1.0 or Atom, else 422. Drafts go to `channelIds` or to the members of `groupId` (not both), with text from `template` (default \"{title} {link}\"; {title}, {link}, {summary}, {author} and {feed} are filled in) and a note naming the feed and holding the item link. `firstFetch` \"latest\" (default) drafts the newest item now and none of the older ones; \"none\" drafts nothing until a new item appears. Feeds are checked about every 30 minutes (never sooner), a failing one backs off up to a day. Following a URL already followed returns that feed, so a retry is safe. `view: \"brief\"` answers ids, name, status and errors only.","summary":"Follow a feed","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","minLength":1,"maxLength":2048},"name":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}]},"template":{"anyOf":[{"type":"string","minLength":1,"maxLength":1000},{"type":"null"}]},"channelIds":{"anyOf":[{"type":"array","items":{"type":"string"},"maxItems":100},{"type":"null"}]},"groupId":{"anyOf":[{"type":"string"},{"type":"null"}]},"firstFetch":{"anyOf":[{"type":"string","enum":["latest","none"]},{"type":"null"}]},"view":{"anyOf":[{"type":"string","enum":["brief"],"description":"Return only ids, publication states, due times, external URLs, errors and actionable problems."},{"type":"null"}]}},"required":["url"],"additionalProperties":false}}},"required":true}}},"/v1/feeds/preview":{"post":{"tags":["feeds"],"operationId":"feeds.preview","parameters":[],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"link":{"anyOf":[{"type":"string"},{"type":"null"}]},"publishedAt":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["title","link","publishedAt"],"additionalProperties":false}}},"required":["title","items"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidEncoded"}}}},"429":{"description":"TooManyRequests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsEncoded"}}}}},"description":"Fetches a feed URL with the same checks as following it and answers its title and newest items. Saves nothing and creates no draft.","summary":"Preview a feed","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","minLength":1,"maxLength":2048}},"required":["url"],"additionalProperties":false}}},"required":true}}},"/v1/feeds/{id}":{"patch":{"tags":["feeds"],"operationId":"feeds.update","parameters":[{"name":"id","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"name":{"type":"string"},"template":{"type":"string"},"channelIds":{"type":"array","items":{"type":"string"}},"groupId":{"anyOf":[{"type":"string"},{"type":"null"}]},"firstFetch":{"type":"string","enum":["latest","none"]},"status":{"type":"string","enum":["active","paused"]},"lastCheckedAt":{"anyOf":[{"type":"number"},{"type":"null"}]},"lastSuccessAt":{"anyOf":[{"type":"number"},{"type":"null"}]},"nextCheckAt":{"type":"number"},"failures":{"type":"number"},"lastError":{"anyOf":[{"type":"string"},{"type":"null"}]},"latest":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"link":{"anyOf":[{"type":"string"},{"type":"null"}]},"publishedAt":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["title","link","publishedAt"],"additionalProperties":false}},"drafts":{"type":"number"},"revision":{"type":"number"},"createdAt":{"type":"number"},"updatedAt":{"type":"number"}},"required":["id","url","name","template","channelIds","groupId","firstFetch","status","lastCheckedAt","lastSuccessAt","nextCheckAt","failures","lastError","latest","drafts","revision","createdAt","updatedAt"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictEncoded"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidEncoded"}}}},"429":{"description":"TooManyRequests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsEncoded"}}}}},"description":"Changes `name`, `template`, the accounts or the group the drafts go to (setting one clears the other), or `status`: paused feeds are not checked, and resuming one checks it at the next run. Drafts already made keep their text. With `expectedRevision`, a feed edited since answers 409.","summary":"Edit a feed","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}]},"template":{"anyOf":[{"type":"string","minLength":1,"maxLength":1000},{"type":"null"}]},"channelIds":{"anyOf":[{"type":"array","items":{"type":"string"},"maxItems":100},{"type":"null"}]},"groupId":{"anyOf":[{"type":"string"},{"type":"null"},{"type":"null"}]},"status":{"anyOf":[{"type":"string","enum":["active","paused"]},{"type":"null"}]},"expectedRevision":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"additionalProperties":false}}},"required":true}},"delete":{"tags":["feeds"],"operationId":"feeds.remove","parameters":[{"name":"id","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"<No Content>"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"429":{"description":"TooManyRequests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsEncoded"}}}}},"description":"Removes the feed and its record of items seen. Drafts it made stay.","summary":"Stop following a feed"}},"/v1/feeds/{id}/check":{"post":{"tags":["feeds"],"operationId":"feeds.check","parameters":[{"name":"id","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"name":{"type":"string"},"template":{"type":"string"},"channelIds":{"type":"array","items":{"type":"string"}},"groupId":{"anyOf":[{"type":"string"},{"type":"null"}]},"firstFetch":{"type":"string","enum":["latest","none"]},"status":{"type":"string","enum":["active","paused"]},"lastCheckedAt":{"anyOf":[{"type":"number"},{"type":"null"}]},"lastSuccessAt":{"anyOf":[{"type":"number"},{"type":"null"}]},"nextCheckAt":{"type":"number"},"failures":{"type":"number"},"lastError":{"anyOf":[{"type":"string"},{"type":"null"}]},"latest":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"link":{"anyOf":[{"type":"string"},{"type":"null"}]},"publishedAt":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["title","link","publishedAt"],"additionalProperties":false}},"drafts":{"type":"number"},"revision":{"type":"number"},"createdAt":{"type":"number"},"updatedAt":{"type":"number"}},"required":["id","url","name","template","channelIds","groupId","firstFetch","status","lastCheckedAt","lastSuccessAt","nextCheckAt","failures","lastError","latest","drafts","revision","createdAt","updatedAt"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictEncoded"}}}},"429":{"description":"TooManyRequests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsEncoded"}}}}},"description":"Reads the feed now instead of waiting, and drafts its new items. One check a minute per feed: sooner answers 409. A feed that fails keeps its error in `lastError`; this call still answers it.","summary":"Check a feed now"}},"/v1/webhooks":{"get":{"tags":["webhooks"],"operationId":"webhooks.list","parameters":[],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"secretHint":{"type":"string"},"status":{"type":"string","enum":["active","disabled"]},"failures":{"type":"number"},"disabledReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastAttemptAt":{"anyOf":[{"type":"number"},{"type":"null"}]},"lastStatus":{"anyOf":[{"type":"number"},{"type":"null"}]},"lastError":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastSuccessAt":{"anyOf":[{"type":"number"},{"type":"null"}]},"notSent":{"type":"number"},"createdAt":{"type":"number"}},"required":["id","url","secretHint","status","failures","disabledReason","lastAttemptAt","lastStatus","lastError","lastSuccessAt","notSent","createdAt"],"additionalProperties":false}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"429":{"description":"TooManyRequests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsEncoded"}}}}},"description":"The workspace's endpoints, newest first (up to 5), with their status and last delivery result, never their secrets.","summary":"List webhook endpoints"},"post":{"tags":["webhooks"],"operationId":"webhooks.create","parameters":[],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"secretHint":{"type":"string"},"status":{"type":"string","enum":["active","disabled"]},"failures":{"type":"number"},"disabledReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastAttemptAt":{"anyOf":[{"type":"number"},{"type":"null"}]},"lastStatus":{"anyOf":[{"type":"number"},{"type":"null"}]},"lastError":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastSuccessAt":{"anyOf":[{"type":"number"},{"type":"null"}]},"notSent":{"type":"number"},"createdAt":{"type":"number"},"secret":{"type":"string"}},"required":["id","url","secretHint","status","failures","disabledReason","lastAttemptAt","lastStatus","lastError","lastSuccessAt","notSent","createdAt","secret"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"402":{"description":"PlanRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanRequiredEncoded"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictEncoded"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidEncoded"}}}},"429":{"description":"TooManyRequests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsEncoded"}}}}},"description":"Registers an HTTPS URL that receives publication.published, publication.failed, publication.unconfirmed, post.scheduled, post.deleted as POSTs signed with the endpoint's own secret: up to 5 per workspace. The URL must be on a public host, without credentials or a port (else 422); redirects are never followed. Answers the signing secret once, in `secret`. A URL already registered answers 409. Deliveries follow the plan: a workspace that may not schedule (402 PlanRequired) gets no new events, and cannot add an endpoint or send a test. Events already queued are still delivered.","summary":"Add a webhook endpoint","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","minLength":1,"maxLength":2048}},"required":["url"],"additionalProperties":false}}},"required":true}}},"/v1/webhooks/{id}/test":{"post":{"tags":["webhooks"],"operationId":"webhooks.test","parameters":[{"name":"id","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"status":{"anyOf":[{"type":"number"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"endpoint":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"secretHint":{"type":"string"},"status":{"type":"string","enum":["active","disabled"]},"failures":{"type":"number"},"disabledReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastAttemptAt":{"anyOf":[{"type":"number"},{"type":"null"}]},"lastStatus":{"anyOf":[{"type":"number"},{"type":"null"}]},"lastError":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastSuccessAt":{"anyOf":[{"type":"number"},{"type":"null"}]},"notSent":{"type":"number"},"createdAt":{"type":"number"}},"required":["id","url","secretHint","status","failures","disabledReason","lastAttemptAt","lastStatus","lastError","lastSuccessAt","notSent","createdAt"],"additionalProperties":false}},"required":["ok","status","error","endpoint"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"402":{"description":"PlanRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanRequiredEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"429":{"description":"TooManyRequests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsEncoded"}}}}},"description":"Sends one signed `webhook.test` event now, without retries, and answers what the endpoint replied. It does not count toward disabling the endpoint; a test the endpoint accepts enables a disabled endpoint again.","summary":"Send a test event"}},"/v1/webhooks/{id}":{"delete":{"tags":["webhooks"],"operationId":"webhooks.delete","parameters":[{"name":"id","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"<No Content>"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"429":{"description":"TooManyRequests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsEncoded"}}}}},"description":"Removes the endpoint and its pending deliveries at once.","summary":"Delete a webhook endpoint"}},"/v1/media/from-url":{"post":{"tags":["media"],"operationId":"media.fromUrl","parameters":[],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["image","video"]},"mime":{"type":"string"},"bytes":{"type":"number"},"width":{"type":"number"},"height":{"type":"number"},"durationMs":{"anyOf":[{"type":"number"},{"type":"null"}]},"url":{"type":"string"}},"required":["id","kind","mime","bytes","width","height","durationMs","url"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"413":{"description":"TooLarge","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooLargeEncoded"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidEncoded"}}}},"429":{"description":"TooManyRequests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsEncoded"}}}}},"description":"Fetches an HTTPS image or video from a public destination, validates and stores it just like a raw upload, with at most three redirects and a 20-second overall deadline.","summary":"Upload media from a URL","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["url"],"additionalProperties":false}}},"required":true}}},"/v1/media":{"post":{"tags":["media"],"operationId":"media.upload","parameters":[{"name":"x-media-width","in":"header","schema":{"type":"string"},"required":false},{"name":"x-media-height","in":"header","schema":{"type":"string"},"required":false},{"name":"x-media-duration-ms","in":"header","schema":{"type":"string"},"required":false}],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["image","video"]},"mime":{"type":"string"},"bytes":{"type":"number"},"width":{"type":"number"},"height":{"type":"number"},"durationMs":{"anyOf":[{"type":"number"},{"type":"null"}]},"url":{"type":"string"}},"required":["id","kind","mime","bytes","width","height","durationMs","url"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"413":{"description":"TooLarge","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooLargeEncoded"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidEncoded"}}}},"429":{"description":"TooManyRequests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsEncoded"}}}}},"description":"The raw file is the body, typed by Content-Type. Images: JPEG, PNG, WebP or GIF up to 20 MB. Video: MP4 or QuickTime up to 95 MB, with Content-Length and the headers x-media-width, x-media-height and x-media-duration-ms. PostJr does not process media: send files already sized for the networks you post to (the web composer does this).","summary":"Upload an image or video"}},"/v1/media/{id}":{"get":{"tags":["media"],"operationId":"media.get","parameters":[{"name":"id","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["image","video"]},"mime":{"type":"string"},"bytes":{"type":"number"},"width":{"type":"number"},"height":{"type":"number"},"durationMs":{"anyOf":[{"type":"number"},{"type":"null"}]},"url":{"type":"string"}},"required":["id","kind","mime","bytes","width","height","durationMs","url"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"429":{"description":"TooManyRequests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsEncoded"}}}}},"description":"An uploaded file's kind, type, size, dimensions and description.","summary":"Get media"}},"/v1/media/{id}/file":{"get":{"tags":["media"],"operationId":"media.file","parameters":[{"name":"id","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"<No Content>"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"429":{"description":"TooManyRequests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsEncoded"}}}}},"description":"The stored file, with byte ranges.","summary":"Download media"}},"/v1/media/{id}/describe":{"post":{"tags":["media"],"operationId":"media.describe","parameters":[{"name":"id","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"alt":{"type":"string"}},"required":["alt"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidEncoded"}}}},"429":{"description":"TooManyRequests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsEncoded"}}}}},"description":"From the image's own caption, else from Workers AI. Scheduling fills missing alt text the same way; a draft save does not call the model. In the free trial, up to 20 descriptions a day are written this way (422 after that; alt text you type yourself is never limited).","summary":"Suggest alt text"}},"/v1/posts":{"get":{"tags":["posts"],"operationId":"posts.list","parameters":[{"name":"limit","in":"query","schema":{"type":"string"},"required":false},{"name":"offset","in":"query","schema":{"type":"string"},"required":false},{"name":"cursor","in":"query","schema":{"type":"string","maxLength":100},"required":false},{"name":"q","in":"query","schema":{"type":"string","maxLength":100},"required":false},{"name":"view","in":"query","schema":{"type":"string","enum":["brief"],"description":"Return only ids, publication states, due times, external URLs, errors and actionable problems."},"required":false}],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"body":{"type":"string"},"media":{"type":"array","items":{"type":"object","properties":{"assetId":{"type":"string"},"alt":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]}},"required":["assetId"],"additionalProperties":false}},"canvas":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"assetId":{"type":"string"},"x":{"type":"number"},"y":{"type":"number"},"w":{"type":"number"},"h":{"type":"number"},"z":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["assetId","x","y","w","h","z"],"additionalProperties":false},{"type":"object","properties":{"noteId":{"type":"string"},"x":{"type":"number"},"y":{"type":"number"},"w":{"type":"number"},"h":{"type":"number"},"z":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["noteId","x","y","w","h","z"],"additionalProperties":false}]}},"notes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"text":{"type":"string"}},"required":["id","name","text"],"additionalProperties":false}},"attachedNotes":{"type":"array","items":{"type":"string"}},"thread":{"type":"array","items":{"type":"object","properties":{"body":{"type":"string"},"media":{"type":"array","items":{"type":"object","properties":{"assetId":{"type":"string"},"alt":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]}},"required":["assetId"],"additionalProperties":false}},"delayMinutes":{"type":"number"},"minLikes":{"anyOf":[{"type":"number"},{"type":"null"}]},"minReplies":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["body","media","delayMinutes"],"additionalProperties":false}},"channelIds":{"type":"array","items":{"type":"string"}},"plannedAt":{"anyOf":[{"type":"number"},{"type":"null"}]},"revision":{"type":"number"},"seriesId":{"anyOf":[{"type":"string"},{"type":"null"}]},"shortenLinks":{"type":"boolean"},"shortLinks":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"short":{"type":"string"},"clicks":{"type":"number"}},"required":["url","short","clicks"],"additionalProperties":false}},"variants":{"type":"array","items":{"type":"object","properties":{"channelId":{"type":"string"},"body":{"anyOf":[{"type":"string","maxLength":100000},{"type":"null"}]},"media":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"assetId":{"type":"string"},"alt":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]}},"required":["assetId"],"additionalProperties":false},"maxItems":32},{"type":"null"},{"type":"null"}]},"tiktok":{"anyOf":[{"type":"object","properties":{"mode":{"anyOf":[{"type":"string","enum":["direct","inbox"]},{"type":"null"}]},"privacy":{"anyOf":[{"type":"string","enum":["PUBLIC_TO_EVERYONE","MUTUAL_FOLLOW_FRIENDS","FOLLOWER_OF_CREATOR","SELF_ONLY"]},{"type":"null"}]},"title":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"allowComment":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"allowDuet":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"allowStitch":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"yourBrand":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"brandedContent":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"aiGenerated":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"autoAddMusic":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"additionalProperties":false,"description":"Required for a TikTok channel. What the post carries decides its kind: one video is a video post, images (JPEG or WebP, 20 MB each, up to 35 by API; the post holds up to 32) are a photo carousel. PostJr serves TikTok each photo scaled to fit 1080p, never enlarged, so larger images are accepted. `mode` is \"direct\" (default: posts to the profile; needs the video.publish permission) or \"inbox\" (uploads a draft to the creator's TikTok inbox; needs video.upload; the creator must open TikTok and finish it, so nothing is posted by PostJr, the copy ends published with `inbox: true`, and a video's text is not sent because TikTok takes none for inbox videos). For a direct post `privacy` is required and has no default: choose one of the account's privacyOptions (GET /v1/channels/:id/tiktok); an inbox draft takes none of the choices below, the creator makes them in TikTok. Comments, Duet (video only), Stitch (video only), the brand disclosures (`yourBrand`: promotes yourself; `brandedContent`: promotes a third party, which cannot be SELF_ONLY) and the AI-generated label are off unless true. `autoAddMusic` (photo posts in direct mode only, off unless true) has TikTok pick a track for the photos; in inbox mode the creator picks music in TikTok. For a photo post the text is the description (4000 characters) and `title` the title (up to 90, optional). Scheduling a direct TikTok post records your agreement to TikTok's Music Usage Confirmation, and with brandedContent its Branded Content Policy."},{"type":"null"}]},"youtube":{"anyOf":[{"type":"object","properties":{"privacy":{"anyOf":[{"type":"string","enum":["public","unlisted","private"]},{"type":"null"}]},"madeForKids":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"title":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false,"description":"Required for a YouTube Shorts channel, which posts one vertical or square video of up to 3 minutes (no images, no threads: later parts are left out). `privacy` (public, unlisted or private) and `madeForKids` (YouTube's selfDeclaredMadeForKids, true or false) have no defaults: choose both. `title` is the video's title (1 to 100 characters, no < or >; one that does not fit is refused, never cut); without it the title is the post's first line, cut to 100 characters. The description is the whole text (up to 5,000 bytes, no < or >). By posting to YouTube the person confirms they have the rights to the video and that it follows YouTube's Terms of Service and Community Guidelines. PostJr adds no #Shorts tag."},{"type":"null"}]},"pinterest":{"anyOf":[{"type":"object","properties":{"boardId":{"anyOf":[{"type":"string"},{"type":"null"}]},"boardSectionId":{"anyOf":[{"type":"string"},{"type":"null"},{"type":"null"}]}},"additionalProperties":false,"description":"Required for a Pinterest account, which posts one Pin: an image, a carousel of 2 to 5 images, or one video (4 seconds to 15 minutes; no thread, later parts are left out). `boardId` has no default: choose one of the account's boards (GET /v1/channels/:id/pinterest/boards); `boardSectionId` optionally names one of that board's sections. The title is the post's first line (cut to 100 characters). The description (up to 800) is the lines after the first line when it fits the title, otherwise the whole text. The Pin's link is the first http(s) address in the text. The alt text is the image's."},{"type":"null"}]},"xCommunityId":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"},{"type":"null"}]},"later":{"anyOf":[{"type":"object","properties":{"delayMinutes":{"anyOf":[{"type":"integer","minimum":0,"maximum":10080},{"type":"null"}]},"minLikes":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000000},{"type":"null"}]},"minReplies":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000000},{"type":"null"}]}},"additionalProperties":false},{"type":"null"},{"type":"null"}]}},"required":["channelId","body"],"additionalProperties":false}},"publications":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"postId":{"type":"string"},"series":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"state":{"type":"string","enum":["active","ended","cancelled","stopped"]},"rule":{"type":"object","properties":{"frequency":{"type":"string","enum":["daily","weekly","monthly"]},"weekdays":{"anyOf":[{"type":"array","items":{"type":"string","enum":["sun","mon","tue","wed","thu","fri","sat"]},"maxItems":7},{"type":"null"}]},"monthDay":{"anyOf":[{"type":"integer","minimum":1,"maximum":31},{"type":"null"}]},"time":{"type":"string"},"timeZone":{"type":"string"},"until":{"anyOf":[{"type":"string"},{"type":"null"}]},"count":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000},{"type":"null"}]}},"required":["frequency","time","timeZone"],"additionalProperties":false}},"required":["id","state","rule"],"additionalProperties":false},{"type":"null"}]},"channelId":{"type":"string"},"network":{"type":"string","enum":["fake","bluesky","mastodon","threads","instagram","tiktok","x","linkedin","youtube","discord","telegram","pinterest","slack"]},"handle":{"type":"string"},"revision":{"type":"number"},"text":{"type":"string"},"partCount":{"type":"number"},"parts":{"type":"array","items":{"type":"object","properties":{"index":{"type":"number"},"externalId":{"type":"string"},"externalUrl":{"type":"string"}},"required":["index","externalId","externalUrl"],"additionalProperties":false}},"partPlan":{"type":"array","items":{"type":"object","properties":{"delayMinutes":{"type":"number"},"minLikes":{"anyOf":[{"type":"number"},{"type":"null"}]},"minReplies":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["delayMinutes","minLikes","minReplies"],"additionalProperties":false}},"comments":{"type":"boolean"},"gateChecks":{"type":"number"},"partsNote":{"anyOf":[{"type":"string"},{"type":"null"}]},"dueAt":{"type":"number"},"state":{"type":"string","enum":["scheduled","claimed","publishing","processing","published","failed","unconfirmed","cancelled"]},"inbox":{"type":"boolean"},"betweenParts":{"type":"boolean"},"deletion":{"anyOf":[{"type":"string","enum":["pending","deleted","failed"]},{"type":"null"}]},"attemptCount":{"type":"number"},"externalId":{"anyOf":[{"type":"string"},{"type":"null"}]},"externalUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"contentRejected":{"type":"boolean"},"held":{"type":"boolean"},"review":{"type":"string","enum":["none","waiting","approved","changes_requested"]},"sendsAsDraft":{"type":"boolean"},"returnsToDrafts":{"type":"boolean"},"media":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["image","video"]}},"required":["id","kind"],"additionalProperties":false},{"type":"null"}]},"metrics":{"anyOf":[{"type":"object","properties":{"readAt":{"type":"number"},"nextReadAt":{"anyOf":[{"type":"number"},{"type":"null"}]},"views":{"anyOf":[{"type":"number"},{"type":"null"}]},"likes":{"anyOf":[{"type":"number"},{"type":"null"}]},"replies":{"anyOf":[{"type":"number"},{"type":"null"}]},"reposts":{"anyOf":[{"type":"number"},{"type":"null"}]},"quotes":{"anyOf":[{"type":"number"},{"type":"null"}]},"saves":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["readAt","nextReadAt","views","likes","replies","reposts","quotes","saves"],"additionalProperties":false},{"type":"null"}]},"updatedAt":{"type":"number"}},"required":["id","postId","series","channelId","network","handle","revision","text","partCount","parts","partPlan","comments","gateChecks","partsNote","dueAt","state","inbox","betweenParts","deletion","attemptCount","externalId","externalUrl","errorCode","errorMessage","contentRejected","held","review","sendsAsDraft","returnsToDrafts","media","metrics","updatedAt"],"additionalProperties":false}},"review":{"type":"object","properties":{"state":{"type":"string","enum":["none","waiting","approved","changes_requested"]},"needsApproval":{"type":"boolean"},"openComments":{"type":"number"}},"required":["state","needsApproval","openComments"],"additionalProperties":false},"createdAt":{"type":"number"},"updatedAt":{"type":"number"}},"required":["id","body","media","canvas","notes","attachedNotes","thread","channelIds","plannedAt","revision","seriesId","shortenLinks","shortLinks","variants","publications","review","createdAt","updatedAt"],"additionalProperties":false}},{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"publications":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"postId":{"type":"string"},"channelId":{"type":"string"},"state":{"type":"string","enum":["scheduled","claimed","publishing","processing","published","failed","unconfirmed","cancelled"]},"inbox":{"type":"boolean"},"deletion":{"anyOf":[{"type":"string","enum":["pending","deleted","failed"]},{"type":"null"}]},"dueAt":{"type":"number"},"held":{"type":"boolean"},"review":{"type":"string","enum":["none","waiting","approved","changes_requested"]},"externalUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","postId","channelId","state","inbox","deletion","dueAt","held","review","externalUrl","errorCode","errorMessage"],"additionalProperties":false}}},"required":["id","publications"],"additionalProperties":false}}]}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"429":{"description":"TooManyRequests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsEncoded"}}}}},"description":"Most recently edited first (ties by id), 50 by default and at most 200 (`limit`), with their variants and publications. Set `view=brief` to return only post and publication ids, states, due times, URLs and errors. When more rows follow, the response carries an `x-next-cursor` header; send its value as `cursor` to get the rows after the last one returned. A cursor holds its place when rows change in between, an `offset` does not. A cursor this list did not give out is refused with 400. `q` keeps posts whose text contains it, ignoring case for A to Z only: other letters must match exactly (up to 100 characters).","summary":"List posts"},"post":{"tags":["posts"],"operationId":"posts.create","parameters":[],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"body":{"type":"string"},"media":{"type":"array","items":{"type":"object","properties":{"assetId":{"type":"string"},"alt":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]}},"required":["assetId"],"additionalProperties":false}},"canvas":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"assetId":{"type":"string"},"x":{"type":"number"},"y":{"type":"number"},"w":{"type":"number"},"h":{"type":"number"},"z":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["assetId","x","y","w","h","z"],"additionalProperties":false},{"type":"object","properties":{"noteId":{"type":"string"},"x":{"type":"number"},"y":{"type":"number"},"w":{"type":"number"},"h":{"type":"number"},"z":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["noteId","x","y","w","h","z"],"additionalProperties":false}]}},"notes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"text":{"type":"string"}},"required":["id","name","text"],"additionalProperties":false}},"attachedNotes":{"type":"array","items":{"type":"string"}},"thread":{"type":"array","items":{"type":"object","properties":{"body":{"type":"string"},"media":{"type":"array","items":{"type":"object","properties":{"assetId":{"type":"string"},"alt":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]}},"required":["assetId"],"additionalProperties":false}},"delayMinutes":{"type":"number"},"minLikes":{"anyOf":[{"type":"number"},{"type":"null"}]},"minReplies":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["body","media","delayMinutes"],"additionalProperties":false}},"channelIds":{"type":"array","items":{"type":"string"}},"plannedAt":{"anyOf":[{"type":"number"},{"type":"null"}]},"revision":{"type":"number"},"seriesId":{"anyOf":[{"type":"string"},{"type":"null"}]},"shortenLinks":{"type":"boolean"},"shortLinks":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"short":{"type":"string"},"clicks":{"type":"number"}},"required":["url","short","clicks"],"additionalProperties":false}},"variants":{"type":"array","items":{"type":"object","properties":{"channelId":{"type":"string"},"body":{"anyOf":[{"type":"string","maxLength":100000},{"type":"null"}]},"media":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"assetId":{"type":"string"},"alt":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]}},"required":["assetId"],"additionalProperties":false},"maxItems":32},{"type":"null"},{"type":"null"}]},"tiktok":{"anyOf":[{"type":"object","properties":{"mode":{"anyOf":[{"type":"string","enum":["direct","inbox"]},{"type":"null"}]},"privacy":{"anyOf":[{"type":"string","enum":["PUBLIC_TO_EVERYONE","MUTUAL_FOLLOW_FRIENDS","FOLLOWER_OF_CREATOR","SELF_ONLY"]},{"type":"null"}]},"title":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"allowComment":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"allowDuet":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"allowStitch":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"yourBrand":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"brandedContent":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"aiGenerated":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"autoAddMusic":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"additionalProperties":false,"description":"Required for a TikTok channel. What the post carries decides its kind: one video is a video post, images (JPEG or WebP, 20 MB each, up to 35 by API; the post holds up to 32) are a photo carousel. PostJr serves TikTok each photo scaled to fit 1080p, never enlarged, so larger images are accepted. `mode` is \"direct\" (default: posts to the profile; needs the video.publish permission) or \"inbox\" (uploads a draft to the creator's TikTok inbox; needs video.upload; the creator must open TikTok and finish it, so nothing is posted by PostJr, the copy ends published with `inbox: true`, and a video's text is not sent because TikTok takes none for inbox videos). For a direct post `privacy` is required and has no default: choose one of the account's privacyOptions (GET /v1/channels/:id/tiktok); an inbox draft takes none of the choices below, the creator makes them in TikTok. Comments, Duet (video only), Stitch (video only), the brand disclosures (`yourBrand`: promotes yourself; `brandedContent`: promotes a third party, which cannot be SELF_ONLY) and the AI-generated label are off unless true. `autoAddMusic` (photo posts in direct mode only, off unless true) has TikTok pick a track for the photos; in inbox mode the creator picks music in TikTok. For a photo post the text is the description (4000 characters) and `title` the title (up to 90, optional). Scheduling a direct TikTok post records your agreement to TikTok's Music Usage Confirmation, and with brandedContent its Branded Content Policy."},{"type":"null"}]},"youtube":{"anyOf":[{"type":"object","properties":{"privacy":{"anyOf":[{"type":"string","enum":["public","unlisted","private"]},{"type":"null"}]},"madeForKids":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"title":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false,"description":"Required for a YouTube Shorts channel, which posts one vertical or square video of up to 3 minutes (no images, no threads: later parts are left out). `privacy` (public, unlisted or private) and `madeForKids` (YouTube's selfDeclaredMadeForKids, true or false) have no defaults: choose both. `title` is the video's title (1 to 100 characters, no < or >; one that does not fit is refused, never cut); without it the title is the post's first line, cut to 100 characters. The description is the whole text (up to 5,000 bytes, no < or >). By posting to YouTube the person confirms they have the rights to the video and that it follows YouTube's Terms of Service and Community Guidelines. PostJr adds no #Shorts tag."},{"type":"null"}]},"pinterest":{"anyOf":[{"type":"object","properties":{"boardId":{"anyOf":[{"type":"string"},{"type":"null"}]},"boardSectionId":{"anyOf":[{"type":"string"},{"type":"null"},{"type":"null"}]}},"additionalProperties":false,"description":"Required for a Pinterest account, which posts one Pin: an image, a carousel of 2 to 5 images, or one video (4 seconds to 15 minutes; no thread, later parts are left out). `boardId` has no default: choose one of the account's boards (GET /v1/channels/:id/pinterest/boards); `boardSectionId` optionally names one of that board's sections. The title is the post's first line (cut to 100 characters). The description (up to 800) is the lines after the first line when it fits the title, otherwise the whole text. The Pin's link is the first http(s) address in the text. The alt text is the image's."},{"type":"null"}]},"xCommunityId":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"},{"type":"null"}]},"later":{"anyOf":[{"type":"object","properties":{"delayMinutes":{"anyOf":[{"type":"integer","minimum":0,"maximum":10080},{"type":"null"}]},"minLikes":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000000},{"type":"null"}]},"minReplies":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000000},{"type":"null"}]}},"additionalProperties":false},{"type":"null"},{"type":"null"}]}},"required":["channelId","body"],"additionalProperties":false}},"publications":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"postId":{"type":"string"},"series":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"state":{"type":"string","enum":["active","ended","cancelled","stopped"]},"rule":{"type":"object","properties":{"frequency":{"type":"string","enum":["daily","weekly","monthly"]},"weekdays":{"anyOf":[{"type":"array","items":{"type":"string","enum":["sun","mon","tue","wed","thu","fri","sat"]},"maxItems":7},{"type":"null"}]},"monthDay":{"anyOf":[{"type":"integer","minimum":1,"maximum":31},{"type":"null"}]},"time":{"type":"string"},"timeZone":{"type":"string"},"until":{"anyOf":[{"type":"string"},{"type":"null"}]},"count":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000},{"type":"null"}]}},"required":["frequency","time","timeZone"],"additionalProperties":false}},"required":["id","state","rule"],"additionalProperties":false},{"type":"null"}]},"channelId":{"type":"string"},"network":{"type":"string","enum":["fake","bluesky","mastodon","threads","instagram","tiktok","x","linkedin","youtube","discord","telegram","pinterest","slack"]},"handle":{"type":"string"},"revision":{"type":"number"},"text":{"type":"string"},"partCount":{"type":"number"},"parts":{"type":"array","items":{"type":"object","properties":{"index":{"type":"number"},"externalId":{"type":"string"},"externalUrl":{"type":"string"}},"required":["index","externalId","externalUrl"],"additionalProperties":false}},"partPlan":{"type":"array","items":{"type":"object","properties":{"delayMinutes":{"type":"number"},"minLikes":{"anyOf":[{"type":"number"},{"type":"null"}]},"minReplies":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["delayMinutes","minLikes","minReplies"],"additionalProperties":false}},"comments":{"type":"boolean"},"gateChecks":{"type":"number"},"partsNote":{"anyOf":[{"type":"string"},{"type":"null"}]},"dueAt":{"type":"number"},"state":{"type":"string","enum":["scheduled","claimed","publishing","processing","published","failed","unconfirmed","cancelled"]},"inbox":{"type":"boolean"},"betweenParts":{"type":"boolean"},"deletion":{"anyOf":[{"type":"string","enum":["pending","deleted","failed"]},{"type":"null"}]},"attemptCount":{"type":"number"},"externalId":{"anyOf":[{"type":"string"},{"type":"null"}]},"externalUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"contentRejected":{"type":"boolean"},"held":{"type":"boolean"},"review":{"type":"string","enum":["none","waiting","approved","changes_requested"]},"sendsAsDraft":{"type":"boolean"},"returnsToDrafts":{"type":"boolean"},"media":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["image","video"]}},"required":["id","kind"],"additionalProperties":false},{"type":"null"}]},"metrics":{"anyOf":[{"type":"object","properties":{"readAt":{"type":"number"},"nextReadAt":{"anyOf":[{"type":"number"},{"type":"null"}]},"views":{"anyOf":[{"type":"number"},{"type":"null"}]},"likes":{"anyOf":[{"type":"number"},{"type":"null"}]},"replies":{"anyOf":[{"type":"number"},{"type":"null"}]},"reposts":{"anyOf":[{"type":"number"},{"type":"null"}]},"quotes":{"anyOf":[{"type":"number"},{"type":"null"}]},"saves":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["readAt","nextReadAt","views","likes","replies","reposts","quotes","saves"],"additionalProperties":false},{"type":"null"}]},"updatedAt":{"type":"number"}},"required":["id","postId","series","channelId","network","handle","revision","text","partCount","parts","partPlan","comments","gateChecks","partsNote","dueAt","state","inbox","betweenParts","deletion","attemptCount","externalId","externalUrl","errorCode","errorMessage","contentRejected","held","review","sendsAsDraft","returnsToDrafts","media","metrics","updatedAt"],"additionalProperties":false}},"review":{"type":"object","properties":{"state":{"type":"string","enum":["none","waiting","approved","changes_requested"]},"needsApproval":{"type":"boolean"},"openComments":{"type":"number"}},"required":["state","needsApproval","openComments"],"additionalProperties":false},"createdAt":{"type":"number"},"updatedAt":{"type":"number"}},"required":["id","body","media","canvas","notes","attachedNotes","thread","channelIds","plannedAt","revision","seriesId","shortenLinks","shortLinks","variants","publications","review","createdAt","updatedAt"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"publications":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"postId":{"type":"string"},"channelId":{"type":"string"},"state":{"type":"string","enum":["scheduled","claimed","publishing","processing","published","failed","unconfirmed","cancelled"]},"inbox":{"type":"boolean"},"deletion":{"anyOf":[{"type":"string","enum":["pending","deleted","failed"]},{"type":"null"}]},"dueAt":{"type":"number"},"held":{"type":"boolean"},"review":{"type":"string","enum":["none","waiting","approved","changes_requested"]},"externalUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","postId","channelId","state","inbox","deletion","dueAt","held","review","externalUrl","errorCode","errorMessage"],"additionalProperties":false}}},"required":["id","publications"],"additionalProperties":false}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"402":{"description":"PlanRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanRequiredEncoded"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictEncoded"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidEncoded"}}}},"429":{"description":"TooManyRequests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsEncoded"}}}}},"description":"Optional `schedule` saves and schedules atomically: `channelIds` and `dueAt` (UTC milliseconds) or `at` (ISO 8601 with an offset or Z), at most one; neither publishes now. `repeat` (frequency daily, weekly with weekdays, or monthly with monthDay; time HH:MM; an IANA timeZone; optional until date or count) makes it a series: the time is then the start, and the first departure is the first match of the rule at or after it. A workspace without a plan (no subscription, a payment failed more than 7 days ago, or cancelled), or one at its plan's account limit, or a post to more accounts than its plan allows (Starter 6, Pro 30, Agency 100), is refused with 402 PlanRequired and nothing changes. In the free trial, connecting more different accounts than the plan's limit over the whole trial (disconnecting one frees no place; reconnecting the same account is fine) is refused the same way with reason trial_limit, and a schedule that would put more than 20 copies on one UTC day before the trial ends is refused with 422. See GET /v1/billing. Supply an optional ULID `id` for safe retries of identical content and schedule. `body` is the shared text; `variants` overrides it per channel id; `media` lists uploaded media ids with optional alt text: up to 4 images or one video on its own (X, Bluesky); each network sets its own cap: Instagram takes a carousel of up to 20 images and videos mixed (one video alone is a Reel), Threads and LinkedIn 20 images, TikTok 35 photos. A TikTok channel takes one video or images (a photo carousel), and its variant needs `tiktok` settings: `mode` direct with a privacy the person chose from the channel's TikTok options (GET /v1/channels/:id/tiktok; there is no default), or `mode` inbox to send a draft to the creator's TikTok inbox (needs `canInbox`; the copy ends `published` with `inbox: true` and is not posted until the creator finishes it in TikTok); scheduling a direct post records their agreement to TikTok's Music Usage Confirmation. A YouTube channel takes one vertical or square video of up to 3 minutes and nothing else (a Short): the title is the variant's `youtube.title` (up to 100 UTF-16 characters, no < or >; refused, never cut) or, when it sets none, the text's first line cut to 100, and the whole text is the description. Its variant needs `youtube` settings: `privacy` (public, unlisted or private) and `madeForKids`, both chosen by the person, with no default. Posting to YouTube confirms that the person has the rights to the video and that it follows YouTube's Terms of Service and Community Guidelines. A Telegram channel takes text of up to 4,096 characters, or an album of up to 10 images, or one video of up to 50 MB, with the text as its caption (up to 1,024 characters); it has no settings of its own. A Pinterest account makes one Pin: an image, 2 to 5 images as a carousel, or one video (4 seconds to 15 minutes); a text-only copy is refused. The title is the first line (cut to 100 characters), the description (up to 800) the lines after it when the first line fits the title and otherwise the whole text, the Pin's link the first http(s) address in the text, and the alt text the image's. Its variant needs `pinterest.boardId`, chosen from GET /v1/channels/:id/pinterest/boards with no default, and may add `boardSectionId`. Each X post spends the instance's X API credits (about 1.5 cents, 20 with a link). A draft save keeps each media item's `alt` as sent (an image's own caption fills a blank one) and calls no model, so it never fails for missing alt text. A save that schedules, and a save of a post that has scheduled copies, needs alt text on every image and video: a blank one is taken from the asset's stored description, else written by Workers AI for an image, and the call answers 422 when none can be had (describe a video first with POST /v1/media/:id/describe and a frame). `canvas` lists media kept with the draft but not posted, with where each sits on the compose canvas (up to 24); omitted means none. `notes` holds up to 24 text notes; `attachedNotes` names which notes join each copy's text, in order. `thread` lists up to 24 follow-up parts, each with its own `body` and `media`, and an optional `delayMinutes` (up to 10080, 7 days): X, Bluesky, Mastodon, Threads and Discord send them as replies, in order; Instagram sends them as comments on the post (text only; its login configuration needs instagram_manage_comments); each is checked against that network's limits; TikTok, LinkedIn, YouTube and Pinterest send part 1 only. A part goes right away, `delayMinutes` after the part before it (the first part goes at the post's time), or, with `minLikes` and/or `minReplies`, once the first post has that many likes (readable on Bluesky, Mastodon, Threads, Instagram and X) or comments from other people (readable on Bluesky, Mastodon, Threads, Instagram and X; your own earlier parts are not counted); a network that cannot be read, such as LinkedIn, sends its part right away. PostJr looks after 2 minutes, 5, 15, 30, 1 hour, then hourly up to 6 hours, then every 6 hours, and gives up after 7 days: the copy is then `published` with `partsNote` (\"Did not reach 50 likes in 7 days\"), never failed. `variants[].later` (`delayMinutes`, `minLikes`, `minReplies`) sets one timing for every later part on that channel in place of the parts' own. A thread waiting for a part keeps state `scheduled` with `betweenParts: true` and `dueAt` at its next time (`partPlan` lists each part's timing, `gateChecks` the looks so far), and is `published` only when every part is out or the wait ended; a failed part retries itself and the parts after it, never the ones sent, except an Instagram comment Instagram refuses, which ends the thread with `partsNote` while the post stays published. `channelIds` lists the channels the draft is addressed to, in the order chosen, so another device opens it with the same accounts; they must be this workspace's channels (otherwise 422, with the ids under `problems`), and one that needs reconnecting may be kept but not scheduled. Omitted means none; a schedule names its own channels. Upload with POST /v1/media; PostJr does not resize, crop or trim, so send files that already fit the networks. `view: \"brief\"` returns only ids, states, due times, URLs, errors and problems; full is the default.","summary":"Create a post","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"body":{"type":"string","maxLength":100000},"media":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"assetId":{"type":"string"},"alt":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]}},"required":["assetId"],"additionalProperties":false},"maxItems":32},{"type":"null"}]},"canvas":{"anyOf":[{"type":"array","items":{"anyOf":[{"type":"object","properties":{"assetId":{"type":"string"},"x":{"type":"number"},"y":{"type":"number"},"w":{"type":"number"},"h":{"type":"number"},"z":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["assetId","x","y","w","h","z"],"additionalProperties":false},{"type":"object","properties":{"noteId":{"type":"string"},"x":{"type":"number"},"y":{"type":"number"},"w":{"type":"number"},"h":{"type":"number"},"z":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["noteId","x","y","w","h","z"],"additionalProperties":false}]}},{"type":"null"}]},"notes":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"text":{"type":"string"}},"required":["id","name","text"],"additionalProperties":false}},{"type":"null"}]},"attachedNotes":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"thread":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"body":{"type":"string","maxLength":100000},"media":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"assetId":{"type":"string"},"alt":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]}},"required":["assetId"],"additionalProperties":false},"maxItems":32},{"type":"null"}]},"delayMinutes":{"anyOf":[{"type":"integer","minimum":0,"maximum":10080},{"type":"null"}]},"minLikes":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000000},{"type":"null"}]},"minReplies":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000000},{"type":"null"}]}},"required":["body"],"additionalProperties":false},"maxItems":24},{"type":"null"}]},"channelIds":{"anyOf":[{"type":"array","items":{"type":"string"},"maxItems":100},{"type":"null"}]},"plannedAt":{"anyOf":[{"type":"number"},{"type":"null"},{"type":"null"}]},"variants":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"channelId":{"type":"string"},"body":{"anyOf":[{"type":"string","maxLength":100000},{"type":"null"}]},"media":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"assetId":{"type":"string"},"alt":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]}},"required":["assetId"],"additionalProperties":false},"maxItems":32},{"type":"null"},{"type":"null"}]},"tiktok":{"anyOf":[{"type":"object","properties":{"mode":{"anyOf":[{"type":"string","enum":["direct","inbox"]},{"type":"null"}]},"privacy":{"anyOf":[{"type":"string","enum":["PUBLIC_TO_EVERYONE","MUTUAL_FOLLOW_FRIENDS","FOLLOWER_OF_CREATOR","SELF_ONLY"]},{"type":"null"}]},"title":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"allowComment":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"allowDuet":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"allowStitch":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"yourBrand":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"brandedContent":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"aiGenerated":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"autoAddMusic":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"additionalProperties":false,"description":"Required for a TikTok channel. What the post carries decides its kind: one video is a video post, images (JPEG or WebP, 20 MB each, up to 35 by API; the post holds up to 32) are a photo carousel. PostJr serves TikTok each photo scaled to fit 1080p, never enlarged, so larger images are accepted. `mode` is \"direct\" (default: posts to the profile; needs the video.publish permission) or \"inbox\" (uploads a draft to the creator's TikTok inbox; needs video.upload; the creator must open TikTok and finish it, so nothing is posted by PostJr, the copy ends published with `inbox: true`, and a video's text is not sent because TikTok takes none for inbox videos). For a direct post `privacy` is required and has no default: choose one of the account's privacyOptions (GET /v1/channels/:id/tiktok); an inbox draft takes none of the choices below, the creator makes them in TikTok. Comments, Duet (video only), Stitch (video only), the brand disclosures (`yourBrand`: promotes yourself; `brandedContent`: promotes a third party, which cannot be SELF_ONLY) and the AI-generated label are off unless true. `autoAddMusic` (photo posts in direct mode only, off unless true) has TikTok pick a track for the photos; in inbox mode the creator picks music in TikTok. For a photo post the text is the description (4000 characters) and `title` the title (up to 90, optional). Scheduling a direct TikTok post records your agreement to TikTok's Music Usage Confirmation, and with brandedContent its Branded Content Policy."},{"type":"null"}]},"youtube":{"anyOf":[{"type":"object","properties":{"privacy":{"anyOf":[{"type":"string","enum":["public","unlisted","private"]},{"type":"null"}]},"madeForKids":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"title":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false,"description":"Required for a YouTube Shorts channel, which posts one vertical or square video of up to 3 minutes (no images, no threads: later parts are left out). `privacy` (public, unlisted or private) and `madeForKids` (YouTube's selfDeclaredMadeForKids, true or false) have no defaults: choose both. `title` is the video's title (1 to 100 characters, no < or >; one that does not fit is refused, never cut); without it the title is the post's first line, cut to 100 characters. The description is the whole text (up to 5,000 bytes, no < or >). By posting to YouTube the person confirms they have the rights to the video and that it follows YouTube's Terms of Service and Community Guidelines. PostJr adds no #Shorts tag."},{"type":"null"}]},"pinterest":{"anyOf":[{"type":"object","properties":{"boardId":{"anyOf":[{"type":"string"},{"type":"null"}]},"boardSectionId":{"anyOf":[{"type":"string"},{"type":"null"},{"type":"null"}]}},"additionalProperties":false,"description":"Required for a Pinterest account, which posts one Pin: an image, a carousel of 2 to 5 images, or one video (4 seconds to 15 minutes; no thread, later parts are left out). `boardId` has no default: choose one of the account's boards (GET /v1/channels/:id/pinterest/boards); `boardSectionId` optionally names one of that board's sections. The title is the post's first line (cut to 100 characters). The description (up to 800) is the lines after the first line when it fits the title, otherwise the whole text. The Pin's link is the first http(s) address in the text. The alt text is the image's."},{"type":"null"}]},"xCommunityId":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"},{"type":"null"}]},"later":{"anyOf":[{"type":"object","properties":{"delayMinutes":{"anyOf":[{"type":"integer","minimum":0,"maximum":10080},{"type":"null"}]},"minLikes":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000000},{"type":"null"}]},"minReplies":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000000},{"type":"null"}]}},"additionalProperties":false},{"type":"null"},{"type":"null"}]}},"required":["channelId","body"],"additionalProperties":false},"maxItems":100},{"type":"null"}]},"shortenLinks":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"schedule":{"anyOf":[{"type":"object","properties":{"channelIds":{"type":"array","prefixItems":[{"type":"string"}],"minItems":1,"items":{"type":"string"},"maxItems":100},"dueAt":{"anyOf":[{"type":"number"},{"type":"null"}]},"at":{"anyOf":[{"type":"string"},{"type":"null"}]},"repeat":{"anyOf":[{"type":"object","properties":{"frequency":{"type":"string","enum":["daily","weekly","monthly"]},"weekdays":{"anyOf":[{"type":"array","items":{"type":"string","enum":["sun","mon","tue","wed","thu","fri","sat"]},"maxItems":7},{"type":"null"}]},"monthDay":{"anyOf":[{"type":"integer","minimum":1,"maximum":31},{"type":"null"}]},"time":{"type":"string"},"timeZone":{"type":"string"},"until":{"anyOf":[{"type":"string"},{"type":"null"}]},"count":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000},{"type":"null"}]}},"required":["frequency","time","timeZone"],"additionalProperties":false},{"type":"null"}]},"endSeries":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["channelIds"],"additionalProperties":false},{"type":"null"}]},"id":{"anyOf":[{"type":"string"},{"type":"null"}]},"needsApproval":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"view":{"anyOf":[{"type":"string","enum":["brief"],"description":"Return only ids, publication states, due times, external URLs, errors and actionable problems."},{"type":"null"}]}},"required":["body"],"additionalProperties":false}}},"required":true}}},"/v1/posts/check":{"post":{"tags":["posts"],"operationId":"posts.check","parameters":[],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"channels":{"type":"array","items":{"type":"object","properties":{"channelId":{"type":"string"},"network":{"type":"string","enum":["fake","bluesky","mastodon","threads","instagram","tiktok","x","linkedin","youtube","discord","telegram","pinterest","slack"]},"text":{"type":"string"},"length":{"type":"number"},"limit":{"type":"number"},"problems":{"type":"array","items":{"type":"string"}},"parts":{"type":"array","items":{"type":"object","properties":{"index":{"type":"number"},"text":{"type":"string"},"length":{"type":"number"},"limit":{"type":"number"},"problems":{"type":"array","items":{"type":"string"}}},"required":["index","text","length","limit","problems"],"additionalProperties":false}},"notes":{"type":"array","items":{"type":"string"}}},"required":["channelId","network","text","length","limit","problems","parts","notes"],"additionalProperties":false}},"problems":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}},"required":["channels","problems"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidEncoded"}}}},"429":{"description":"TooManyRequests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsEncoded"}}}}},"description":"Validates a post without saving it, part by part for a thread. An optional schedule also checks its time and channels.","summary":"Check a post","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"body":{"type":"string","maxLength":100000},"media":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"assetId":{"type":"string"},"alt":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]}},"required":["assetId"],"additionalProperties":false},"maxItems":32},{"type":"null"}]},"canvas":{"anyOf":[{"type":"array","items":{"anyOf":[{"type":"object","properties":{"assetId":{"type":"string"},"x":{"type":"number"},"y":{"type":"number"},"w":{"type":"number"},"h":{"type":"number"},"z":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["assetId","x","y","w","h","z"],"additionalProperties":false},{"type":"object","properties":{"noteId":{"type":"string"},"x":{"type":"number"},"y":{"type":"number"},"w":{"type":"number"},"h":{"type":"number"},"z":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["noteId","x","y","w","h","z"],"additionalProperties":false}]}},{"type":"null"}]},"notes":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"text":{"type":"string"}},"required":["id","name","text"],"additionalProperties":false}},{"type":"null"}]},"attachedNotes":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"thread":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"body":{"type":"string","maxLength":100000},"media":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"assetId":{"type":"string"},"alt":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]}},"required":["assetId"],"additionalProperties":false},"maxItems":32},{"type":"null"}]},"delayMinutes":{"anyOf":[{"type":"integer","minimum":0,"maximum":10080},{"type":"null"}]},"minLikes":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000000},{"type":"null"}]},"minReplies":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000000},{"type":"null"}]}},"required":["body"],"additionalProperties":false},"maxItems":24},{"type":"null"}]},"channelIds":{"anyOf":[{"type":"array","items":{"type":"string"},"maxItems":100},{"type":"null"}]},"plannedAt":{"anyOf":[{"type":"number"},{"type":"null"},{"type":"null"}]},"variants":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"channelId":{"type":"string"},"body":{"anyOf":[{"type":"string","maxLength":100000},{"type":"null"}]},"media":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"assetId":{"type":"string"},"alt":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]}},"required":["assetId"],"additionalProperties":false},"maxItems":32},{"type":"null"},{"type":"null"}]},"tiktok":{"anyOf":[{"type":"object","properties":{"mode":{"anyOf":[{"type":"string","enum":["direct","inbox"]},{"type":"null"}]},"privacy":{"anyOf":[{"type":"string","enum":["PUBLIC_TO_EVERYONE","MUTUAL_FOLLOW_FRIENDS","FOLLOWER_OF_CREATOR","SELF_ONLY"]},{"type":"null"}]},"title":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"allowComment":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"allowDuet":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"allowStitch":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"yourBrand":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"brandedContent":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"aiGenerated":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"autoAddMusic":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"additionalProperties":false,"description":"Required for a TikTok channel. What the post carries decides its kind: one video is a video post, images (JPEG or WebP, 20 MB each, up to 35 by API; the post holds up to 32) are a photo carousel. PostJr serves TikTok each photo scaled to fit 1080p, never enlarged, so larger images are accepted. `mode` is \"direct\" (default: posts to the profile; needs the video.publish permission) or \"inbox\" (uploads a draft to the creator's TikTok inbox; needs video.upload; the creator must open TikTok and finish it, so nothing is posted by PostJr, the copy ends published with `inbox: true`, and a video's text is not sent because TikTok takes none for inbox videos). For a direct post `privacy` is required and has no default: choose one of the account's privacyOptions (GET /v1/channels/:id/tiktok); an inbox draft takes none of the choices below, the creator makes them in TikTok. Comments, Duet (video only), Stitch (video only), the brand disclosures (`yourBrand`: promotes yourself; `brandedContent`: promotes a third party, which cannot be SELF_ONLY) and the AI-generated label are off unless true. `autoAddMusic` (photo posts in direct mode only, off unless true) has TikTok pick a track for the photos; in inbox mode the creator picks music in TikTok. For a photo post the text is the description (4000 characters) and `title` the title (up to 90, optional). Scheduling a direct TikTok post records your agreement to TikTok's Music Usage Confirmation, and with brandedContent its Branded Content Policy."},{"type":"null"}]},"youtube":{"anyOf":[{"type":"object","properties":{"privacy":{"anyOf":[{"type":"string","enum":["public","unlisted","private"]},{"type":"null"}]},"madeForKids":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"title":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false,"description":"Required for a YouTube Shorts channel, which posts one vertical or square video of up to 3 minutes (no images, no threads: later parts are left out). `privacy` (public, unlisted or private) and `madeForKids` (YouTube's selfDeclaredMadeForKids, true or false) have no defaults: choose both. `title` is the video's title (1 to 100 characters, no < or >; one that does not fit is refused, never cut); without it the title is the post's first line, cut to 100 characters. The description is the whole text (up to 5,000 bytes, no < or >). By posting to YouTube the person confirms they have the rights to the video and that it follows YouTube's Terms of Service and Community Guidelines. PostJr adds no #Shorts tag."},{"type":"null"}]},"pinterest":{"anyOf":[{"type":"object","properties":{"boardId":{"anyOf":[{"type":"string"},{"type":"null"}]},"boardSectionId":{"anyOf":[{"type":"string"},{"type":"null"},{"type":"null"}]}},"additionalProperties":false,"description":"Required for a Pinterest account, which posts one Pin: an image, a carousel of 2 to 5 images, or one video (4 seconds to 15 minutes; no thread, later parts are left out). `boardId` has no default: choose one of the account's boards (GET /v1/channels/:id/pinterest/boards); `boardSectionId` optionally names one of that board's sections. The title is the post's first line (cut to 100 characters). The description (up to 800) is the lines after the first line when it fits the title, otherwise the whole text. The Pin's link is the first http(s) address in the text. The alt text is the image's."},{"type":"null"}]},"xCommunityId":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"},{"type":"null"}]},"later":{"anyOf":[{"type":"object","properties":{"delayMinutes":{"anyOf":[{"type":"integer","minimum":0,"maximum":10080},{"type":"null"}]},"minLikes":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000000},{"type":"null"}]},"minReplies":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000000},{"type":"null"}]}},"additionalProperties":false},{"type":"null"},{"type":"null"}]}},"required":["channelId","body"],"additionalProperties":false},"maxItems":100},{"type":"null"}]},"shortenLinks":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"schedule":{"anyOf":[{"type":"object","properties":{"channelIds":{"type":"array","prefixItems":[{"type":"string"}],"minItems":1,"items":{"type":"string"},"maxItems":100},"dueAt":{"anyOf":[{"type":"number"},{"type":"null"}]},"at":{"anyOf":[{"type":"string"},{"type":"null"}]},"repeat":{"anyOf":[{"type":"object","properties":{"frequency":{"type":"string","enum":["daily","weekly","monthly"]},"weekdays":{"anyOf":[{"type":"array","items":{"type":"string","enum":["sun","mon","tue","wed","thu","fri","sat"]},"maxItems":7},{"type":"null"}]},"monthDay":{"anyOf":[{"type":"integer","minimum":1,"maximum":31},{"type":"null"}]},"time":{"type":"string"},"timeZone":{"type":"string"},"until":{"anyOf":[{"type":"string"},{"type":"null"}]},"count":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000},{"type":"null"}]}},"required":["frequency","time","timeZone"],"additionalProperties":false},{"type":"null"}]},"endSeries":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["channelIds"],"additionalProperties":false},{"type":"null"}]}},"required":["body"],"additionalProperties":false}}},"required":true}}},"/v1/posts/bulk":{"post":{"tags":["posts"],"operationId":"posts.bulk","parameters":[],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"index":{"type":"number"},"post":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"body":{"type":"string"},"media":{"type":"array","items":{"type":"object","properties":{"assetId":{"type":"string"},"alt":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]}},"required":["assetId"],"additionalProperties":false}},"canvas":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"assetId":{"type":"string"},"x":{"type":"number"},"y":{"type":"number"},"w":{"type":"number"},"h":{"type":"number"},"z":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["assetId","x","y","w","h","z"],"additionalProperties":false},{"type":"object","properties":{"noteId":{"type":"string"},"x":{"type":"number"},"y":{"type":"number"},"w":{"type":"number"},"h":{"type":"number"},"z":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["noteId","x","y","w","h","z"],"additionalProperties":false}]}},"notes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"text":{"type":"string"}},"required":["id","name","text"],"additionalProperties":false}},"attachedNotes":{"type":"array","items":{"type":"string"}},"thread":{"type":"array","items":{"type":"object","properties":{"body":{"type":"string"},"media":{"type":"array","items":{"type":"object","properties":{"assetId":{"type":"string"},"alt":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]}},"required":["assetId"],"additionalProperties":false}},"delayMinutes":{"type":"number"},"minLikes":{"anyOf":[{"type":"number"},{"type":"null"}]},"minReplies":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["body","media","delayMinutes"],"additionalProperties":false}},"channelIds":{"type":"array","items":{"type":"string"}},"plannedAt":{"anyOf":[{"type":"number"},{"type":"null"}]},"revision":{"type":"number"},"seriesId":{"anyOf":[{"type":"string"},{"type":"null"}]},"shortenLinks":{"type":"boolean"},"shortLinks":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"short":{"type":"string"},"clicks":{"type":"number"}},"required":["url","short","clicks"],"additionalProperties":false}},"variants":{"type":"array","items":{"type":"object","properties":{"channelId":{"type":"string"},"body":{"anyOf":[{"type":"string","maxLength":100000},{"type":"null"}]},"media":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"assetId":{"type":"string"},"alt":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]}},"required":["assetId"],"additionalProperties":false},"maxItems":32},{"type":"null"},{"type":"null"}]},"tiktok":{"anyOf":[{"type":"object","properties":{"mode":{"anyOf":[{"type":"string","enum":["direct","inbox"]},{"type":"null"}]},"privacy":{"anyOf":[{"type":"string","enum":["PUBLIC_TO_EVERYONE","MUTUAL_FOLLOW_FRIENDS","FOLLOWER_OF_CREATOR","SELF_ONLY"]},{"type":"null"}]},"title":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"allowComment":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"allowDuet":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"allowStitch":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"yourBrand":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"brandedContent":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"aiGenerated":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"autoAddMusic":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"additionalProperties":false,"description":"Required for a TikTok channel. What the post carries decides its kind: one video is a video post, images (JPEG or WebP, 20 MB each, up to 35 by API; the post holds up to 32) are a photo carousel. PostJr serves TikTok each photo scaled to fit 1080p, never enlarged, so larger images are accepted. `mode` is \"direct\" (default: posts to the profile; needs the video.publish permission) or \"inbox\" (uploads a draft to the creator's TikTok inbox; needs video.upload; the creator must open TikTok and finish it, so nothing is posted by PostJr, the copy ends published with `inbox: true`, and a video's text is not sent because TikTok takes none for inbox videos). For a direct post `privacy` is required and has no default: choose one of the account's privacyOptions (GET /v1/channels/:id/tiktok); an inbox draft takes none of the choices below, the creator makes them in TikTok. Comments, Duet (video only), Stitch (video only), the brand disclosures (`yourBrand`: promotes yourself; `brandedContent`: promotes a third party, which cannot be SELF_ONLY) and the AI-generated label are off unless true. `autoAddMusic` (photo posts in direct mode only, off unless true) has TikTok pick a track for the photos; in inbox mode the creator picks music in TikTok. For a photo post the text is the description (4000 characters) and `title` the title (up to 90, optional). Scheduling a direct TikTok post records your agreement to TikTok's Music Usage Confirmation, and with brandedContent its Branded Content Policy."},{"type":"null"}]},"youtube":{"anyOf":[{"type":"object","properties":{"privacy":{"anyOf":[{"type":"string","enum":["public","unlisted","private"]},{"type":"null"}]},"madeForKids":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"title":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false,"description":"Required for a YouTube Shorts channel, which posts one vertical or square video of up to 3 minutes (no images, no threads: later parts are left out). `privacy` (public, unlisted or private) and `madeForKids` (YouTube's selfDeclaredMadeForKids, true or false) have no defaults: choose both. `title` is the video's title (1 to 100 characters, no < or >; one that does not fit is refused, never cut); without it the title is the post's first line, cut to 100 characters. The description is the whole text (up to 5,000 bytes, no < or >). By posting to YouTube the person confirms they have the rights to the video and that it follows YouTube's Terms of Service and Community Guidelines. PostJr adds no #Shorts tag."},{"type":"null"}]},"pinterest":{"anyOf":[{"type":"object","properties":{"boardId":{"anyOf":[{"type":"string"},{"type":"null"}]},"boardSectionId":{"anyOf":[{"type":"string"},{"type":"null"},{"type":"null"}]}},"additionalProperties":false,"description":"Required for a Pinterest account, which posts one Pin: an image, a carousel of 2 to 5 images, or one video (4 seconds to 15 minutes; no thread, later parts are left out). `boardId` has no default: choose one of the account's boards (GET /v1/channels/:id/pinterest/boards); `boardSectionId` optionally names one of that board's sections. The title is the post's first line (cut to 100 characters). The description (up to 800) is the lines after the first line when it fits the title, otherwise the whole text. The Pin's link is the first http(s) address in the text. The alt text is the image's."},{"type":"null"}]},"xCommunityId":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"},{"type":"null"}]},"later":{"anyOf":[{"type":"object","properties":{"delayMinutes":{"anyOf":[{"type":"integer","minimum":0,"maximum":10080},{"type":"null"}]},"minLikes":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000000},{"type":"null"}]},"minReplies":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000000},{"type":"null"}]}},"additionalProperties":false},{"type":"null"},{"type":"null"}]}},"required":["channelId","body"],"additionalProperties":false}},"publications":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"postId":{"type":"string"},"series":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"state":{"type":"string","enum":["active","ended","cancelled","stopped"]},"rule":{"type":"object","properties":{"frequency":{"type":"string","enum":["daily","weekly","monthly"]},"weekdays":{"anyOf":[{"type":"array","items":{"type":"string","enum":["sun","mon","tue","wed","thu","fri","sat"]},"maxItems":7},{"type":"null"}]},"monthDay":{"anyOf":[{"type":"integer","minimum":1,"maximum":31},{"type":"null"}]},"time":{"type":"string"},"timeZone":{"type":"string"},"until":{"anyOf":[{"type":"string"},{"type":"null"}]},"count":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000},{"type":"null"}]}},"required":["frequency","time","timeZone"],"additionalProperties":false}},"required":["id","state","rule"],"additionalProperties":false},{"type":"null"}]},"channelId":{"type":"string"},"network":{"type":"string","enum":["fake","bluesky","mastodon","threads","instagram","tiktok","x","linkedin","youtube","discord","telegram","pinterest","slack"]},"handle":{"type":"string"},"revision":{"type":"number"},"text":{"type":"string"},"partCount":{"type":"number"},"parts":{"type":"array","items":{"type":"object","properties":{"index":{"type":"number"},"externalId":{"type":"string"},"externalUrl":{"type":"string"}},"required":["index","externalId","externalUrl"],"additionalProperties":false}},"partPlan":{"type":"array","items":{"type":"object","properties":{"delayMinutes":{"type":"number"},"minLikes":{"anyOf":[{"type":"number"},{"type":"null"}]},"minReplies":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["delayMinutes","minLikes","minReplies"],"additionalProperties":false}},"comments":{"type":"boolean"},"gateChecks":{"type":"number"},"partsNote":{"anyOf":[{"type":"string"},{"type":"null"}]},"dueAt":{"type":"number"},"state":{"type":"string","enum":["scheduled","claimed","publishing","processing","published","failed","unconfirmed","cancelled"]},"inbox":{"type":"boolean"},"betweenParts":{"type":"boolean"},"deletion":{"anyOf":[{"type":"string","enum":["pending","deleted","failed"]},{"type":"null"}]},"attemptCount":{"type":"number"},"externalId":{"anyOf":[{"type":"string"},{"type":"null"}]},"externalUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"contentRejected":{"type":"boolean"},"held":{"type":"boolean"},"review":{"type":"string","enum":["none","waiting","approved","changes_requested"]},"sendsAsDraft":{"type":"boolean"},"returnsToDrafts":{"type":"boolean"},"media":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["image","video"]}},"required":["id","kind"],"additionalProperties":false},{"type":"null"}]},"metrics":{"anyOf":[{"type":"object","properties":{"readAt":{"type":"number"},"nextReadAt":{"anyOf":[{"type":"number"},{"type":"null"}]},"views":{"anyOf":[{"type":"number"},{"type":"null"}]},"likes":{"anyOf":[{"type":"number"},{"type":"null"}]},"replies":{"anyOf":[{"type":"number"},{"type":"null"}]},"reposts":{"anyOf":[{"type":"number"},{"type":"null"}]},"quotes":{"anyOf":[{"type":"number"},{"type":"null"}]},"saves":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["readAt","nextReadAt","views","likes","replies","reposts","quotes","saves"],"additionalProperties":false},{"type":"null"}]},"updatedAt":{"type":"number"}},"required":["id","postId","series","channelId","network","handle","revision","text","partCount","parts","partPlan","comments","gateChecks","partsNote","dueAt","state","inbox","betweenParts","deletion","attemptCount","externalId","externalUrl","errorCode","errorMessage","contentRejected","held","review","sendsAsDraft","returnsToDrafts","media","metrics","updatedAt"],"additionalProperties":false}},"review":{"type":"object","properties":{"state":{"type":"string","enum":["none","waiting","approved","changes_requested"]},"needsApproval":{"type":"boolean"},"openComments":{"type":"number"}},"required":["state","needsApproval","openComments"],"additionalProperties":false},"createdAt":{"type":"number"},"updatedAt":{"type":"number"}},"required":["id","body","media","canvas","notes","attachedNotes","thread","channelIds","plannedAt","revision","seriesId","shortenLinks","shortLinks","variants","publications","review","createdAt","updatedAt"],"additionalProperties":false},{"type":"null"}]},"error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"problems":{"anyOf":[{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},{"type":"null"}]},"retryAfter":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["code","message"],"additionalProperties":false},{"type":"null"}]}},"required":["index"],"additionalProperties":false}}},"required":["results"],"additionalProperties":false},{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"index":{"type":"number"},"post":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"publications":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"postId":{"type":"string"},"channelId":{"type":"string"},"state":{"type":"string","enum":["scheduled","claimed","publishing","processing","published","failed","unconfirmed","cancelled"]},"inbox":{"type":"boolean"},"deletion":{"anyOf":[{"type":"string","enum":["pending","deleted","failed"]},{"type":"null"}]},"dueAt":{"type":"number"},"held":{"type":"boolean"},"review":{"type":"string","enum":["none","waiting","approved","changes_requested"]},"externalUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","postId","channelId","state","inbox","deletion","dueAt","held","review","externalUrl","errorCode","errorMessage"],"additionalProperties":false}}},"required":["id","publications"],"additionalProperties":false},{"type":"null"}]},"error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"problems":{"anyOf":[{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},{"type":"null"}]},"retryAfter":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["code","message"],"additionalProperties":false},{"type":"null"}]}},"required":["index"],"additionalProperties":false}}},"required":["results"],"additionalProperties":false}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidEncoded"}}}},"429":{"description":"TooManyRequests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsEncoded"}}}}},"description":"Creates up to 20 posts, each exactly like POST /v1/posts and each on its own: one bad item fails alone with its problems, and the result lists every item by index with its post or its error. Give each item an `id` (ULID) so a retry of the whole call never duplicates a post. Send more requests for more posts (the cap keeps each request inside the Free plan's CPU). `view: \"brief\"` returns only ids, states, due times, URLs, errors and problems; full is the default.","summary":"Create several posts","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"posts":{"type":"array","items":{"type":"object","properties":{"body":{"type":"string","maxLength":100000},"media":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"assetId":{"type":"string"},"alt":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]}},"required":["assetId"],"additionalProperties":false},"maxItems":32},{"type":"null"}]},"canvas":{"anyOf":[{"type":"array","items":{"anyOf":[{"type":"object","properties":{"assetId":{"type":"string"},"x":{"type":"number"},"y":{"type":"number"},"w":{"type":"number"},"h":{"type":"number"},"z":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["assetId","x","y","w","h","z"],"additionalProperties":false},{"type":"object","properties":{"noteId":{"type":"string"},"x":{"type":"number"},"y":{"type":"number"},"w":{"type":"number"},"h":{"type":"number"},"z":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["noteId","x","y","w","h","z"],"additionalProperties":false}]}},{"type":"null"}]},"notes":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"text":{"type":"string"}},"required":["id","name","text"],"additionalProperties":false}},{"type":"null"}]},"attachedNotes":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"thread":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"body":{"type":"string","maxLength":100000},"media":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"assetId":{"type":"string"},"alt":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]}},"required":["assetId"],"additionalProperties":false},"maxItems":32},{"type":"null"}]},"delayMinutes":{"anyOf":[{"type":"integer","minimum":0,"maximum":10080},{"type":"null"}]},"minLikes":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000000},{"type":"null"}]},"minReplies":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000000},{"type":"null"}]}},"required":["body"],"additionalProperties":false},"maxItems":24},{"type":"null"}]},"channelIds":{"anyOf":[{"type":"array","items":{"type":"string"},"maxItems":100},{"type":"null"}]},"plannedAt":{"anyOf":[{"type":"number"},{"type":"null"},{"type":"null"}]},"variants":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"channelId":{"type":"string"},"body":{"anyOf":[{"type":"string","maxLength":100000},{"type":"null"}]},"media":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"assetId":{"type":"string"},"alt":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]}},"required":["assetId"],"additionalProperties":false},"maxItems":32},{"type":"null"},{"type":"null"}]},"tiktok":{"anyOf":[{"type":"object","properties":{"mode":{"anyOf":[{"type":"string","enum":["direct","inbox"]},{"type":"null"}]},"privacy":{"anyOf":[{"type":"string","enum":["PUBLIC_TO_EVERYONE","MUTUAL_FOLLOW_FRIENDS","FOLLOWER_OF_CREATOR","SELF_ONLY"]},{"type":"null"}]},"title":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"allowComment":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"allowDuet":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"allowStitch":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"yourBrand":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"brandedContent":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"aiGenerated":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"autoAddMusic":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"additionalProperties":false,"description":"Required for a TikTok channel. What the post carries decides its kind: one video is a video post, images (JPEG or WebP, 20 MB each, up to 35 by API; the post holds up to 32) are a photo carousel. PostJr serves TikTok each photo scaled to fit 1080p, never enlarged, so larger images are accepted. `mode` is \"direct\" (default: posts to the profile; needs the video.publish permission) or \"inbox\" (uploads a draft to the creator's TikTok inbox; needs video.upload; the creator must open TikTok and finish it, so nothing is posted by PostJr, the copy ends published with `inbox: true`, and a video's text is not sent because TikTok takes none for inbox videos). For a direct post `privacy` is required and has no default: choose one of the account's privacyOptions (GET /v1/channels/:id/tiktok); an inbox draft takes none of the choices below, the creator makes them in TikTok. Comments, Duet (video only), Stitch (video only), the brand disclosures (`yourBrand`: promotes yourself; `brandedContent`: promotes a third party, which cannot be SELF_ONLY) and the AI-generated label are off unless true. `autoAddMusic` (photo posts in direct mode only, off unless true) has TikTok pick a track for the photos; in inbox mode the creator picks music in TikTok. For a photo post the text is the description (4000 characters) and `title` the title (up to 90, optional). Scheduling a direct TikTok post records your agreement to TikTok's Music Usage Confirmation, and with brandedContent its Branded Content Policy."},{"type":"null"}]},"youtube":{"anyOf":[{"type":"object","properties":{"privacy":{"anyOf":[{"type":"string","enum":["public","unlisted","private"]},{"type":"null"}]},"madeForKids":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"title":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false,"description":"Required for a YouTube Shorts channel, which posts one vertical or square video of up to 3 minutes (no images, no threads: later parts are left out). `privacy` (public, unlisted or private) and `madeForKids` (YouTube's selfDeclaredMadeForKids, true or false) have no defaults: choose both. `title` is the video's title (1 to 100 characters, no < or >; one that does not fit is refused, never cut); without it the title is the post's first line, cut to 100 characters. The description is the whole text (up to 5,000 bytes, no < or >). By posting to YouTube the person confirms they have the rights to the video and that it follows YouTube's Terms of Service and Community Guidelines. PostJr adds no #Shorts tag."},{"type":"null"}]},"pinterest":{"anyOf":[{"type":"object","properties":{"boardId":{"anyOf":[{"type":"string"},{"type":"null"}]},"boardSectionId":{"anyOf":[{"type":"string"},{"type":"null"},{"type":"null"}]}},"additionalProperties":false,"description":"Required for a Pinterest account, which posts one Pin: an image, a carousel of 2 to 5 images, or one video (4 seconds to 15 minutes; no thread, later parts are left out). `boardId` has no default: choose one of the account's boards (GET /v1/channels/:id/pinterest/boards); `boardSectionId` optionally names one of that board's sections. The title is the post's first line (cut to 100 characters). The description (up to 800) is the lines after the first line when it fits the title, otherwise the whole text. The Pin's link is the first http(s) address in the text. The alt text is the image's."},{"type":"null"}]},"xCommunityId":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"},{"type":"null"}]},"later":{"anyOf":[{"type":"object","properties":{"delayMinutes":{"anyOf":[{"type":"integer","minimum":0,"maximum":10080},{"type":"null"}]},"minLikes":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000000},{"type":"null"}]},"minReplies":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000000},{"type":"null"}]}},"additionalProperties":false},{"type":"null"},{"type":"null"}]}},"required":["channelId","body"],"additionalProperties":false},"maxItems":100},{"type":"null"}]},"shortenLinks":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"schedule":{"anyOf":[{"type":"object","properties":{"channelIds":{"type":"array","prefixItems":[{"type":"string"}],"minItems":1,"items":{"type":"string"},"maxItems":100},"dueAt":{"anyOf":[{"type":"number"},{"type":"null"}]},"at":{"anyOf":[{"type":"string"},{"type":"null"}]},"repeat":{"anyOf":[{"type":"object","properties":{"frequency":{"type":"string","enum":["daily","weekly","monthly"]},"weekdays":{"anyOf":[{"type":"array","items":{"type":"string","enum":["sun","mon","tue","wed","thu","fri","sat"]},"maxItems":7},{"type":"null"}]},"monthDay":{"anyOf":[{"type":"integer","minimum":1,"maximum":31},{"type":"null"}]},"time":{"type":"string"},"timeZone":{"type":"string"},"until":{"anyOf":[{"type":"string"},{"type":"null"}]},"count":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000},{"type":"null"}]}},"required":["frequency","time","timeZone"],"additionalProperties":false},{"type":"null"}]},"endSeries":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["channelIds"],"additionalProperties":false},{"type":"null"}]},"id":{"anyOf":[{"type":"string"},{"type":"null"}]},"needsApproval":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"required":["body"],"additionalProperties":false,"description":"Save and optionally schedule in one atomic batch. Optional id must be a canonical uppercase ULID (otherwise 422). An existing id returns the current post with 200 and no writes only in the same workspace with the same last save intent; otherwise 409. Body and ordered media compare exactly; omitted media/variants/channelIds are empty, variants with a null body, no tiktok settings and no own media are ignored, variants and channelIds sort by channel, and schedule compares unique sorted channelIds and the original optional dueAt, not the clamped time. A later save, schedule or cancel supersedes replay eligibility."}},"view":{"anyOf":[{"type":"string","enum":["brief"],"description":"Return only ids, publication states, due times, external URLs, errors and actionable problems."},{"type":"null"}]}},"required":["posts"],"additionalProperties":false}}},"required":true}}},"/v1/posts/delete":{"post":{"tags":["posts"],"operationId":"posts.deleteMany","parameters":[],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"postId":{"type":"string"},"status":{"type":"string","enum":["removed","kept","refused"]},"message":{"anyOf":[{"type":"string"},{"type":"null"}]},"deletedFrom":{"anyOf":[{"type":"array","items":{"type":"string","enum":["fake","bluesky","mastodon","threads","instagram","tiktok","x","linkedin","youtube","discord","telegram","pinterest","slack"]}},{"type":"null"}]},"manual":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"publicationId":{"type":"string"},"network":{"type":"string","enum":["fake","bluesky","mastodon","threads","instagram","tiktok","x","linkedin","youtube","discord","telegram","pinterest","slack"]},"handle":{"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["publicationId","network","handle","url"],"additionalProperties":false}},{"type":"null"}]}},"required":["postId","status"],"additionalProperties":false}}},"required":["results"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidEncoded"}}}},"429":{"description":"TooManyRequests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsEncoded"}}}}},"description":"Deletes up to 100 PostJr posts and their scheduled publications. Without `fromNetworks`, a post still live on a network is refused and the networks are never touched; with it, a post that was published is kept (\"kept\"): its scheduled copies are cancelled and its live copies are deleted from the networks, and its copies read deleted. Remove it from PostJr afterwards with DELETE /v1/posts/:id. A post that was never published is removed (\"removed\"). A post still publishing is always refused. A copy on a network that cannot delete posts (Instagram, TikTok) never blocks it: with `fromNetworks` the copy is marked deleted in PostJr only and listed in the result's `manual` with its `url`, for the owner to delete by hand (TikTok gives only the profile's URL); `deletedFrom` lists the networks deleted through their APIs. Without `fromNetworks`, such a copy keeps the post until it is marked deleted. A copy marked published by its link alone has no network id, so it stays on its network and does not hold the post. With `thenRemove` (and `fromNetworks`) the post is also removed from PostJr as soon as no copy of it is still on a network: at once if none is, else when the last network deletion succeeds or the last copy on Instagram or TikTok is marked deleted (those copies are then not marked for you). A failed network deletion leaves the post in place.","summary":"Delete posts","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"postIds":{"type":"array","items":{"type":"string"}},"fromNetworks":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"thenRemove":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"required":["postIds"],"additionalProperties":false}}},"required":true}}},"/v1/posts/{id}":{"get":{"tags":["posts"],"operationId":"posts.get","parameters":[{"name":"id","in":"path","schema":{"type":"string"},"required":true},{"name":"view","in":"query","schema":{"type":"string","enum":["brief"],"description":"Return only ids, publication states, due times, external URLs, errors and actionable problems."},"required":false}],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"body":{"type":"string"},"media":{"type":"array","items":{"type":"object","properties":{"assetId":{"type":"string"},"alt":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]}},"required":["assetId"],"additionalProperties":false}},"canvas":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"assetId":{"type":"string"},"x":{"type":"number"},"y":{"type":"number"},"w":{"type":"number"},"h":{"type":"number"},"z":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["assetId","x","y","w","h","z"],"additionalProperties":false},{"type":"object","properties":{"noteId":{"type":"string"},"x":{"type":"number"},"y":{"type":"number"},"w":{"type":"number"},"h":{"type":"number"},"z":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["noteId","x","y","w","h","z"],"additionalProperties":false}]}},"notes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"text":{"type":"string"}},"required":["id","name","text"],"additionalProperties":false}},"attachedNotes":{"type":"array","items":{"type":"string"}},"thread":{"type":"array","items":{"type":"object","properties":{"body":{"type":"string"},"media":{"type":"array","items":{"type":"object","properties":{"assetId":{"type":"string"},"alt":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]}},"required":["assetId"],"additionalProperties":false}},"delayMinutes":{"type":"number"},"minLikes":{"anyOf":[{"type":"number"},{"type":"null"}]},"minReplies":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["body","media","delayMinutes"],"additionalProperties":false}},"channelIds":{"type":"array","items":{"type":"string"}},"plannedAt":{"anyOf":[{"type":"number"},{"type":"null"}]},"revision":{"type":"number"},"seriesId":{"anyOf":[{"type":"string"},{"type":"null"}]},"shortenLinks":{"type":"boolean"},"shortLinks":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"short":{"type":"string"},"clicks":{"type":"number"}},"required":["url","short","clicks"],"additionalProperties":false}},"variants":{"type":"array","items":{"type":"object","properties":{"channelId":{"type":"string"},"body":{"anyOf":[{"type":"string","maxLength":100000},{"type":"null"}]},"media":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"assetId":{"type":"string"},"alt":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]}},"required":["assetId"],"additionalProperties":false},"maxItems":32},{"type":"null"},{"type":"null"}]},"tiktok":{"anyOf":[{"type":"object","properties":{"mode":{"anyOf":[{"type":"string","enum":["direct","inbox"]},{"type":"null"}]},"privacy":{"anyOf":[{"type":"string","enum":["PUBLIC_TO_EVERYONE","MUTUAL_FOLLOW_FRIENDS","FOLLOWER_OF_CREATOR","SELF_ONLY"]},{"type":"null"}]},"title":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"allowComment":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"allowDuet":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"allowStitch":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"yourBrand":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"brandedContent":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"aiGenerated":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"autoAddMusic":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"additionalProperties":false,"description":"Required for a TikTok channel. What the post carries decides its kind: one video is a video post, images (JPEG or WebP, 20 MB each, up to 35 by API; the post holds up to 32) are a photo carousel. PostJr serves TikTok each photo scaled to fit 1080p, never enlarged, so larger images are accepted. `mode` is \"direct\" (default: posts to the profile; needs the video.publish permission) or \"inbox\" (uploads a draft to the creator's TikTok inbox; needs video.upload; the creator must open TikTok and finish it, so nothing is posted by PostJr, the copy ends published with `inbox: true`, and a video's text is not sent because TikTok takes none for inbox videos). For a direct post `privacy` is required and has no default: choose one of the account's privacyOptions (GET /v1/channels/:id/tiktok); an inbox draft takes none of the choices below, the creator makes them in TikTok. Comments, Duet (video only), Stitch (video only), the brand disclosures (`yourBrand`: promotes yourself; `brandedContent`: promotes a third party, which cannot be SELF_ONLY) and the AI-generated label are off unless true. `autoAddMusic` (photo posts in direct mode only, off unless true) has TikTok pick a track for the photos; in inbox mode the creator picks music in TikTok. For a photo post the text is the description (4000 characters) and `title` the title (up to 90, optional). Scheduling a direct TikTok post records your agreement to TikTok's Music Usage Confirmation, and with brandedContent its Branded Content Policy."},{"type":"null"}]},"youtube":{"anyOf":[{"type":"object","properties":{"privacy":{"anyOf":[{"type":"string","enum":["public","unlisted","private"]},{"type":"null"}]},"madeForKids":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"title":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false,"description":"Required for a YouTube Shorts channel, which posts one vertical or square video of up to 3 minutes (no images, no threads: later parts are left out). `privacy` (public, unlisted or private) and `madeForKids` (YouTube's selfDeclaredMadeForKids, true or false) have no defaults: choose both. `title` is the video's title (1 to 100 characters, no < or >; one that does not fit is refused, never cut); without it the title is the post's first line, cut to 100 characters. The description is the whole text (up to 5,000 bytes, no < or >). By posting to YouTube the person confirms they have the rights to the video and that it follows YouTube's Terms of Service and Community Guidelines. PostJr adds no #Shorts tag."},{"type":"null"}]},"pinterest":{"anyOf":[{"type":"object","properties":{"boardId":{"anyOf":[{"type":"string"},{"type":"null"}]},"boardSectionId":{"anyOf":[{"type":"string"},{"type":"null"},{"type":"null"}]}},"additionalProperties":false,"description":"Required for a Pinterest account, which posts one Pin: an image, a carousel of 2 to 5 images, or one video (4 seconds to 15 minutes; no thread, later parts are left out). `boardId` has no default: choose one of the account's boards (GET /v1/channels/:id/pinterest/boards); `boardSectionId` optionally names one of that board's sections. The title is the post's first line (cut to 100 characters). The description (up to 800) is the lines after the first line when it fits the title, otherwise the whole text. The Pin's link is the first http(s) address in the text. The alt text is the image's."},{"type":"null"}]},"xCommunityId":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"},{"type":"null"}]},"later":{"anyOf":[{"type":"object","properties":{"delayMinutes":{"anyOf":[{"type":"integer","minimum":0,"maximum":10080},{"type":"null"}]},"minLikes":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000000},{"type":"null"}]},"minReplies":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000000},{"type":"null"}]}},"additionalProperties":false},{"type":"null"},{"type":"null"}]}},"required":["channelId","body"],"additionalProperties":false}},"publications":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"postId":{"type":"string"},"series":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"state":{"type":"string","enum":["active","ended","cancelled","stopped"]},"rule":{"type":"object","properties":{"frequency":{"type":"string","enum":["daily","weekly","monthly"]},"weekdays":{"anyOf":[{"type":"array","items":{"type":"string","enum":["sun","mon","tue","wed","thu","fri","sat"]},"maxItems":7},{"type":"null"}]},"monthDay":{"anyOf":[{"type":"integer","minimum":1,"maximum":31},{"type":"null"}]},"time":{"type":"string"},"timeZone":{"type":"string"},"until":{"anyOf":[{"type":"string"},{"type":"null"}]},"count":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000},{"type":"null"}]}},"required":["frequency","time","timeZone"],"additionalProperties":false}},"required":["id","state","rule"],"additionalProperties":false},{"type":"null"}]},"channelId":{"type":"string"},"network":{"type":"string","enum":["fake","bluesky","mastodon","threads","instagram","tiktok","x","linkedin","youtube","discord","telegram","pinterest","slack"]},"handle":{"type":"string"},"revision":{"type":"number"},"text":{"type":"string"},"partCount":{"type":"number"},"parts":{"type":"array","items":{"type":"object","properties":{"index":{"type":"number"},"externalId":{"type":"string"},"externalUrl":{"type":"string"}},"required":["index","externalId","externalUrl"],"additionalProperties":false}},"partPlan":{"type":"array","items":{"type":"object","properties":{"delayMinutes":{"type":"number"},"minLikes":{"anyOf":[{"type":"number"},{"type":"null"}]},"minReplies":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["delayMinutes","minLikes","minReplies"],"additionalProperties":false}},"comments":{"type":"boolean"},"gateChecks":{"type":"number"},"partsNote":{"anyOf":[{"type":"string"},{"type":"null"}]},"dueAt":{"type":"number"},"state":{"type":"string","enum":["scheduled","claimed","publishing","processing","published","failed","unconfirmed","cancelled"]},"inbox":{"type":"boolean"},"betweenParts":{"type":"boolean"},"deletion":{"anyOf":[{"type":"string","enum":["pending","deleted","failed"]},{"type":"null"}]},"attemptCount":{"type":"number"},"externalId":{"anyOf":[{"type":"string"},{"type":"null"}]},"externalUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"contentRejected":{"type":"boolean"},"held":{"type":"boolean"},"review":{"type":"string","enum":["none","waiting","approved","changes_requested"]},"sendsAsDraft":{"type":"boolean"},"returnsToDrafts":{"type":"boolean"},"media":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["image","video"]}},"required":["id","kind"],"additionalProperties":false},{"type":"null"}]},"metrics":{"anyOf":[{"type":"object","properties":{"readAt":{"type":"number"},"nextReadAt":{"anyOf":[{"type":"number"},{"type":"null"}]},"views":{"anyOf":[{"type":"number"},{"type":"null"}]},"likes":{"anyOf":[{"type":"number"},{"type":"null"}]},"replies":{"anyOf":[{"type":"number"},{"type":"null"}]},"reposts":{"anyOf":[{"type":"number"},{"type":"null"}]},"quotes":{"anyOf":[{"type":"number"},{"type":"null"}]},"saves":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["readAt","nextReadAt","views","likes","replies","reposts","quotes","saves"],"additionalProperties":false},{"type":"null"}]},"updatedAt":{"type":"number"}},"required":["id","postId","series","channelId","network","handle","revision","text","partCount","parts","partPlan","comments","gateChecks","partsNote","dueAt","state","inbox","betweenParts","deletion","attemptCount","externalId","externalUrl","errorCode","errorMessage","contentRejected","held","review","sendsAsDraft","returnsToDrafts","media","metrics","updatedAt"],"additionalProperties":false}},"review":{"type":"object","properties":{"state":{"type":"string","enum":["none","waiting","approved","changes_requested"]},"needsApproval":{"type":"boolean"},"openComments":{"type":"number"}},"required":["state","needsApproval","openComments"],"additionalProperties":false},"createdAt":{"type":"number"},"updatedAt":{"type":"number"}},"required":["id","body","media","canvas","notes","attachedNotes","thread","channelIds","plannedAt","revision","seriesId","shortenLinks","shortLinks","variants","publications","review","createdAt","updatedAt"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"publications":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"postId":{"type":"string"},"channelId":{"type":"string"},"state":{"type":"string","enum":["scheduled","claimed","publishing","processing","published","failed","unconfirmed","cancelled"]},"inbox":{"type":"boolean"},"deletion":{"anyOf":[{"type":"string","enum":["pending","deleted","failed"]},{"type":"null"}]},"dueAt":{"type":"number"},"held":{"type":"boolean"},"review":{"type":"string","enum":["none","waiting","approved","changes_requested"]},"externalUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","postId","channelId","state","inbox","deletion","dueAt","held","review","externalUrl","errorCode","errorMessage"],"additionalProperties":false}}},"required":["id","publications"],"additionalProperties":false}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"429":{"description":"TooManyRequests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsEncoded"}}}}},"description":"With its variants and publications.","summary":"Get a post"},"patch":{"tags":["posts"],"operationId":"posts.update","parameters":[{"name":"id","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"body":{"type":"string"},"media":{"type":"array","items":{"type":"object","properties":{"assetId":{"type":"string"},"alt":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]}},"required":["assetId"],"additionalProperties":false}},"canvas":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"assetId":{"type":"string"},"x":{"type":"number"},"y":{"type":"number"},"w":{"type":"number"},"h":{"type":"number"},"z":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["assetId","x","y","w","h","z"],"additionalProperties":false},{"type":"object","properties":{"noteId":{"type":"string"},"x":{"type":"number"},"y":{"type":"number"},"w":{"type":"number"},"h":{"type":"number"},"z":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["noteId","x","y","w","h","z"],"additionalProperties":false}]}},"notes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"text":{"type":"string"}},"required":["id","name","text"],"additionalProperties":false}},"attachedNotes":{"type":"array","items":{"type":"string"}},"thread":{"type":"array","items":{"type":"object","properties":{"body":{"type":"string"},"media":{"type":"array","items":{"type":"object","properties":{"assetId":{"type":"string"},"alt":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]}},"required":["assetId"],"additionalProperties":false}},"delayMinutes":{"type":"number"},"minLikes":{"anyOf":[{"type":"number"},{"type":"null"}]},"minReplies":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["body","media","delayMinutes"],"additionalProperties":false}},"channelIds":{"type":"array","items":{"type":"string"}},"plannedAt":{"anyOf":[{"type":"number"},{"type":"null"}]},"revision":{"type":"number"},"seriesId":{"anyOf":[{"type":"string"},{"type":"null"}]},"shortenLinks":{"type":"boolean"},"shortLinks":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"short":{"type":"string"},"clicks":{"type":"number"}},"required":["url","short","clicks"],"additionalProperties":false}},"variants":{"type":"array","items":{"type":"object","properties":{"channelId":{"type":"string"},"body":{"anyOf":[{"type":"string","maxLength":100000},{"type":"null"}]},"media":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"assetId":{"type":"string"},"alt":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]}},"required":["assetId"],"additionalProperties":false},"maxItems":32},{"type":"null"},{"type":"null"}]},"tiktok":{"anyOf":[{"type":"object","properties":{"mode":{"anyOf":[{"type":"string","enum":["direct","inbox"]},{"type":"null"}]},"privacy":{"anyOf":[{"type":"string","enum":["PUBLIC_TO_EVERYONE","MUTUAL_FOLLOW_FRIENDS","FOLLOWER_OF_CREATOR","SELF_ONLY"]},{"type":"null"}]},"title":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"allowComment":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"allowDuet":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"allowStitch":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"yourBrand":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"brandedContent":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"aiGenerated":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"autoAddMusic":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"additionalProperties":false,"description":"Required for a TikTok channel. What the post carries decides its kind: one video is a video post, images (JPEG or WebP, 20 MB each, up to 35 by API; the post holds up to 32) are a photo carousel. PostJr serves TikTok each photo scaled to fit 1080p, never enlarged, so larger images are accepted. `mode` is \"direct\" (default: posts to the profile; needs the video.publish permission) or \"inbox\" (uploads a draft to the creator's TikTok inbox; needs video.upload; the creator must open TikTok and finish it, so nothing is posted by PostJr, the copy ends published with `inbox: true`, and a video's text is not sent because TikTok takes none for inbox videos). For a direct post `privacy` is required and has no default: choose one of the account's privacyOptions (GET /v1/channels/:id/tiktok); an inbox draft takes none of the choices below, the creator makes them in TikTok. Comments, Duet (video only), Stitch (video only), the brand disclosures (`yourBrand`: promotes yourself; `brandedContent`: promotes a third party, which cannot be SELF_ONLY) and the AI-generated label are off unless true. `autoAddMusic` (photo posts in direct mode only, off unless true) has TikTok pick a track for the photos; in inbox mode the creator picks music in TikTok. For a photo post the text is the description (4000 characters) and `title` the title (up to 90, optional). Scheduling a direct TikTok post records your agreement to TikTok's Music Usage Confirmation, and with brandedContent its Branded Content Policy."},{"type":"null"}]},"youtube":{"anyOf":[{"type":"object","properties":{"privacy":{"anyOf":[{"type":"string","enum":["public","unlisted","private"]},{"type":"null"}]},"madeForKids":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"title":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false,"description":"Required for a YouTube Shorts channel, which posts one vertical or square video of up to 3 minutes (no images, no threads: later parts are left out). `privacy` (public, unlisted or private) and `madeForKids` (YouTube's selfDeclaredMadeForKids, true or false) have no defaults: choose both. `title` is the video's title (1 to 100 characters, no < or >; one that does not fit is refused, never cut); without it the title is the post's first line, cut to 100 characters. The description is the whole text (up to 5,000 bytes, no < or >). By posting to YouTube the person confirms they have the rights to the video and that it follows YouTube's Terms of Service and Community Guidelines. PostJr adds no #Shorts tag."},{"type":"null"}]},"pinterest":{"anyOf":[{"type":"object","properties":{"boardId":{"anyOf":[{"type":"string"},{"type":"null"}]},"boardSectionId":{"anyOf":[{"type":"string"},{"type":"null"},{"type":"null"}]}},"additionalProperties":false,"description":"Required for a Pinterest account, which posts one Pin: an image, a carousel of 2 to 5 images, or one video (4 seconds to 15 minutes; no thread, later parts are left out). `boardId` has no default: choose one of the account's boards (GET /v1/channels/:id/pinterest/boards); `boardSectionId` optionally names one of that board's sections. The title is the post's first line (cut to 100 characters). The description (up to 800) is the lines after the first line when it fits the title, otherwise the whole text. The Pin's link is the first http(s) address in the text. The alt text is the image's."},{"type":"null"}]},"xCommunityId":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"},{"type":"null"}]},"later":{"anyOf":[{"type":"object","properties":{"delayMinutes":{"anyOf":[{"type":"integer","minimum":0,"maximum":10080},{"type":"null"}]},"minLikes":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000000},{"type":"null"}]},"minReplies":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000000},{"type":"null"}]}},"additionalProperties":false},{"type":"null"},{"type":"null"}]}},"required":["channelId","body"],"additionalProperties":false}},"publications":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"postId":{"type":"string"},"series":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"state":{"type":"string","enum":["active","ended","cancelled","stopped"]},"rule":{"type":"object","properties":{"frequency":{"type":"string","enum":["daily","weekly","monthly"]},"weekdays":{"anyOf":[{"type":"array","items":{"type":"string","enum":["sun","mon","tue","wed","thu","fri","sat"]},"maxItems":7},{"type":"null"}]},"monthDay":{"anyOf":[{"type":"integer","minimum":1,"maximum":31},{"type":"null"}]},"time":{"type":"string"},"timeZone":{"type":"string"},"until":{"anyOf":[{"type":"string"},{"type":"null"}]},"count":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000},{"type":"null"}]}},"required":["frequency","time","timeZone"],"additionalProperties":false}},"required":["id","state","rule"],"additionalProperties":false},{"type":"null"}]},"channelId":{"type":"string"},"network":{"type":"string","enum":["fake","bluesky","mastodon","threads","instagram","tiktok","x","linkedin","youtube","discord","telegram","pinterest","slack"]},"handle":{"type":"string"},"revision":{"type":"number"},"text":{"type":"string"},"partCount":{"type":"number"},"parts":{"type":"array","items":{"type":"object","properties":{"index":{"type":"number"},"externalId":{"type":"string"},"externalUrl":{"type":"string"}},"required":["index","externalId","externalUrl"],"additionalProperties":false}},"partPlan":{"type":"array","items":{"type":"object","properties":{"delayMinutes":{"type":"number"},"minLikes":{"anyOf":[{"type":"number"},{"type":"null"}]},"minReplies":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["delayMinutes","minLikes","minReplies"],"additionalProperties":false}},"comments":{"type":"boolean"},"gateChecks":{"type":"number"},"partsNote":{"anyOf":[{"type":"string"},{"type":"null"}]},"dueAt":{"type":"number"},"state":{"type":"string","enum":["scheduled","claimed","publishing","processing","published","failed","unconfirmed","cancelled"]},"inbox":{"type":"boolean"},"betweenParts":{"type":"boolean"},"deletion":{"anyOf":[{"type":"string","enum":["pending","deleted","failed"]},{"type":"null"}]},"attemptCount":{"type":"number"},"externalId":{"anyOf":[{"type":"string"},{"type":"null"}]},"externalUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"contentRejected":{"type":"boolean"},"held":{"type":"boolean"},"review":{"type":"string","enum":["none","waiting","approved","changes_requested"]},"sendsAsDraft":{"type":"boolean"},"returnsToDrafts":{"type":"boolean"},"media":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["image","video"]}},"required":["id","kind"],"additionalProperties":false},{"type":"null"}]},"metrics":{"anyOf":[{"type":"object","properties":{"readAt":{"type":"number"},"nextReadAt":{"anyOf":[{"type":"number"},{"type":"null"}]},"views":{"anyOf":[{"type":"number"},{"type":"null"}]},"likes":{"anyOf":[{"type":"number"},{"type":"null"}]},"replies":{"anyOf":[{"type":"number"},{"type":"null"}]},"reposts":{"anyOf":[{"type":"number"},{"type":"null"}]},"quotes":{"anyOf":[{"type":"number"},{"type":"null"}]},"saves":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["readAt","nextReadAt","views","likes","replies","reposts","quotes","saves"],"additionalProperties":false},{"type":"null"}]},"updatedAt":{"type":"number"}},"required":["id","postId","series","channelId","network","handle","revision","text","partCount","parts","partPlan","comments","gateChecks","partsNote","dueAt","state","inbox","betweenParts","deletion","attemptCount","externalId","externalUrl","errorCode","errorMessage","contentRejected","held","review","sendsAsDraft","returnsToDrafts","media","metrics","updatedAt"],"additionalProperties":false}},"review":{"type":"object","properties":{"state":{"type":"string","enum":["none","waiting","approved","changes_requested"]},"needsApproval":{"type":"boolean"},"openComments":{"type":"number"}},"required":["state","needsApproval","openComments"],"additionalProperties":false},"createdAt":{"type":"number"},"updatedAt":{"type":"number"}},"required":["id","body","media","canvas","notes","attachedNotes","thread","channelIds","plannedAt","revision","seriesId","shortenLinks","shortLinks","variants","publications","review","createdAt","updatedAt"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"402":{"description":"PlanRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanRequiredEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictEncoded"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidEncoded"}}}},"429":{"description":"TooManyRequests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsEncoded"}}}}},"description":"Replaces its body, media, thread, canvas, notes, attachedNotes, variants and channelIds. Notes named by `attachedNotes` join each account's own text in tile order. A draft save keeps each media item's `alt` as sent (an image's own caption fills a blank one) and calls no model, so it never fails for missing alt text. A save that schedules, and a save of a post that has scheduled copies, needs alt text on every image and video: a blank one is taken from the asset's stored description, else written by Workers AI for an image, and the call answers 422 when none can be had (describe a video first with POST /v1/media/:id/describe and a frame). `canvas` lists media kept with the draft but not posted, with where each sits on the compose canvas (up to 24); omitted means none. `channelIds` lists the channels the draft is addressed to, in the order chosen, so another device opens it with the same accounts; they must be this workspace's channels (otherwise 422, with the ids under `problems`), and one that needs reconnecting may be kept but not scheduled. Omitted means none; a schedule names its own channels. With `schedule` (`channelIds` and `dueAt` (UTC milliseconds) or `at` (ISO 8601 with an offset or Z), at most one; neither publishes now. `repeat` (frequency daily, weekly with weekdays, or monthly with monthDay; time HH:MM; an IANA timeZone; optional until date or count) makes it a series: the time is then the start, and the first departure is the first match of the rule at or after it.) it saves and schedules atomically and needs `expectedRevision`; a stale revision answers 409, and so does a schedule, cancel or other save that lands while this one validates: reload the post and save again.","summary":"Edit a post","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"body":{"type":"string","maxLength":100000},"media":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"assetId":{"type":"string"},"alt":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]}},"required":["assetId"],"additionalProperties":false},"maxItems":32},{"type":"null"}]},"canvas":{"anyOf":[{"type":"array","items":{"anyOf":[{"type":"object","properties":{"assetId":{"type":"string"},"x":{"type":"number"},"y":{"type":"number"},"w":{"type":"number"},"h":{"type":"number"},"z":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["assetId","x","y","w","h","z"],"additionalProperties":false},{"type":"object","properties":{"noteId":{"type":"string"},"x":{"type":"number"},"y":{"type":"number"},"w":{"type":"number"},"h":{"type":"number"},"z":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["noteId","x","y","w","h","z"],"additionalProperties":false}]}},{"type":"null"}]},"notes":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"text":{"type":"string"}},"required":["id","name","text"],"additionalProperties":false}},{"type":"null"}]},"attachedNotes":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"thread":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"body":{"type":"string","maxLength":100000},"media":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"assetId":{"type":"string"},"alt":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]}},"required":["assetId"],"additionalProperties":false},"maxItems":32},{"type":"null"}]},"delayMinutes":{"anyOf":[{"type":"integer","minimum":0,"maximum":10080},{"type":"null"}]},"minLikes":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000000},{"type":"null"}]},"minReplies":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000000},{"type":"null"}]}},"required":["body"],"additionalProperties":false},"maxItems":24},{"type":"null"}]},"channelIds":{"anyOf":[{"type":"array","items":{"type":"string"},"maxItems":100},{"type":"null"}]},"plannedAt":{"anyOf":[{"type":"number"},{"type":"null"},{"type":"null"}]},"variants":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"channelId":{"type":"string"},"body":{"anyOf":[{"type":"string","maxLength":100000},{"type":"null"}]},"media":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"assetId":{"type":"string"},"alt":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]}},"required":["assetId"],"additionalProperties":false},"maxItems":32},{"type":"null"},{"type":"null"}]},"tiktok":{"anyOf":[{"type":"object","properties":{"mode":{"anyOf":[{"type":"string","enum":["direct","inbox"]},{"type":"null"}]},"privacy":{"anyOf":[{"type":"string","enum":["PUBLIC_TO_EVERYONE","MUTUAL_FOLLOW_FRIENDS","FOLLOWER_OF_CREATOR","SELF_ONLY"]},{"type":"null"}]},"title":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"allowComment":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"allowDuet":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"allowStitch":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"yourBrand":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"brandedContent":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"aiGenerated":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"autoAddMusic":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"additionalProperties":false,"description":"Required for a TikTok channel. What the post carries decides its kind: one video is a video post, images (JPEG or WebP, 20 MB each, up to 35 by API; the post holds up to 32) are a photo carousel. PostJr serves TikTok each photo scaled to fit 1080p, never enlarged, so larger images are accepted. `mode` is \"direct\" (default: posts to the profile; needs the video.publish permission) or \"inbox\" (uploads a draft to the creator's TikTok inbox; needs video.upload; the creator must open TikTok and finish it, so nothing is posted by PostJr, the copy ends published with `inbox: true`, and a video's text is not sent because TikTok takes none for inbox videos). For a direct post `privacy` is required and has no default: choose one of the account's privacyOptions (GET /v1/channels/:id/tiktok); an inbox draft takes none of the choices below, the creator makes them in TikTok. Comments, Duet (video only), Stitch (video only), the brand disclosures (`yourBrand`: promotes yourself; `brandedContent`: promotes a third party, which cannot be SELF_ONLY) and the AI-generated label are off unless true. `autoAddMusic` (photo posts in direct mode only, off unless true) has TikTok pick a track for the photos; in inbox mode the creator picks music in TikTok. For a photo post the text is the description (4000 characters) and `title` the title (up to 90, optional). Scheduling a direct TikTok post records your agreement to TikTok's Music Usage Confirmation, and with brandedContent its Branded Content Policy."},{"type":"null"}]},"youtube":{"anyOf":[{"type":"object","properties":{"privacy":{"anyOf":[{"type":"string","enum":["public","unlisted","private"]},{"type":"null"}]},"madeForKids":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"title":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false,"description":"Required for a YouTube Shorts channel, which posts one vertical or square video of up to 3 minutes (no images, no threads: later parts are left out). `privacy` (public, unlisted or private) and `madeForKids` (YouTube's selfDeclaredMadeForKids, true or false) have no defaults: choose both. `title` is the video's title (1 to 100 characters, no < or >; one that does not fit is refused, never cut); without it the title is the post's first line, cut to 100 characters. The description is the whole text (up to 5,000 bytes, no < or >). By posting to YouTube the person confirms they have the rights to the video and that it follows YouTube's Terms of Service and Community Guidelines. PostJr adds no #Shorts tag."},{"type":"null"}]},"pinterest":{"anyOf":[{"type":"object","properties":{"boardId":{"anyOf":[{"type":"string"},{"type":"null"}]},"boardSectionId":{"anyOf":[{"type":"string"},{"type":"null"},{"type":"null"}]}},"additionalProperties":false,"description":"Required for a Pinterest account, which posts one Pin: an image, a carousel of 2 to 5 images, or one video (4 seconds to 15 minutes; no thread, later parts are left out). `boardId` has no default: choose one of the account's boards (GET /v1/channels/:id/pinterest/boards); `boardSectionId` optionally names one of that board's sections. The title is the post's first line (cut to 100 characters). The description (up to 800) is the lines after the first line when it fits the title, otherwise the whole text. The Pin's link is the first http(s) address in the text. The alt text is the image's."},{"type":"null"}]},"xCommunityId":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"},{"type":"null"}]},"later":{"anyOf":[{"type":"object","properties":{"delayMinutes":{"anyOf":[{"type":"integer","minimum":0,"maximum":10080},{"type":"null"}]},"minLikes":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000000},{"type":"null"}]},"minReplies":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000000},{"type":"null"}]}},"additionalProperties":false},{"type":"null"},{"type":"null"}]}},"required":["channelId","body"],"additionalProperties":false},"maxItems":100},{"type":"null"}]},"shortenLinks":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"schedule":{"anyOf":[{"type":"object","properties":{"channelIds":{"type":"array","prefixItems":[{"type":"string"}],"minItems":1,"items":{"type":"string"},"maxItems":100},"dueAt":{"anyOf":[{"type":"number"},{"type":"null"}]},"at":{"anyOf":[{"type":"string"},{"type":"null"}]},"repeat":{"anyOf":[{"type":"object","properties":{"frequency":{"type":"string","enum":["daily","weekly","monthly"]},"weekdays":{"anyOf":[{"type":"array","items":{"type":"string","enum":["sun","mon","tue","wed","thu","fri","sat"]},"maxItems":7},{"type":"null"}]},"monthDay":{"anyOf":[{"type":"integer","minimum":1,"maximum":31},{"type":"null"}]},"time":{"type":"string"},"timeZone":{"type":"string"},"until":{"anyOf":[{"type":"string"},{"type":"null"}]},"count":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000},{"type":"null"}]}},"required":["frequency","time","timeZone"],"additionalProperties":false},{"type":"null"}]},"endSeries":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["channelIds"],"additionalProperties":false},{"type":"null"}]},"expectedRevision":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["body"],"additionalProperties":false,"description":"Save and optionally schedule in one atomic batch. schedule requires expectedRevision, the revision edited (otherwise 422). A revision mismatch returns 409 unless the last save committed this same content and schedule from expectedRevision; then return the current post with 200 and no writes, even after publication. Body and ordered media compare exactly; omitted media/variants/channelIds are empty, variants with a null body, no tiktok settings and no own media are ignored, variants and channelIds sort by channel, and schedule compares unique sorted channelIds and the original optional dueAt. Explicit schedule replaces scheduled targets; omitting it preserves their times and channels. A later save, schedule or cancel supersedes replay eligibility."}}},"required":true}},"delete":{"tags":["posts"],"operationId":"posts.delete","parameters":[{"name":"id","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"<No Content>"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictEncoded"}}}},"429":{"description":"TooManyRequests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsEncoded"}}}}},"description":"Removes a post or draft from PostJr with its scheduled publications and history. A published post whose copies are all deleted can be removed. 409 while any copy is live on a network (delete it there with POST /v1/publications/:id/delete, or by hand and then POST /v1/publications/:id/mark-deleted on TikTok) or still publishing.","summary":"Delete a post"}},"/v1/posts/{id}/schedule":{"post":{"tags":["posts"],"operationId":"posts.schedule","parameters":[{"name":"id","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"body":{"type":"string"},"media":{"type":"array","items":{"type":"object","properties":{"assetId":{"type":"string"},"alt":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]}},"required":["assetId"],"additionalProperties":false}},"canvas":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"assetId":{"type":"string"},"x":{"type":"number"},"y":{"type":"number"},"w":{"type":"number"},"h":{"type":"number"},"z":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["assetId","x","y","w","h","z"],"additionalProperties":false},{"type":"object","properties":{"noteId":{"type":"string"},"x":{"type":"number"},"y":{"type":"number"},"w":{"type":"number"},"h":{"type":"number"},"z":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["noteId","x","y","w","h","z"],"additionalProperties":false}]}},"notes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"text":{"type":"string"}},"required":["id","name","text"],"additionalProperties":false}},"attachedNotes":{"type":"array","items":{"type":"string"}},"thread":{"type":"array","items":{"type":"object","properties":{"body":{"type":"string"},"media":{"type":"array","items":{"type":"object","properties":{"assetId":{"type":"string"},"alt":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]}},"required":["assetId"],"additionalProperties":false}},"delayMinutes":{"type":"number"},"minLikes":{"anyOf":[{"type":"number"},{"type":"null"}]},"minReplies":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["body","media","delayMinutes"],"additionalProperties":false}},"channelIds":{"type":"array","items":{"type":"string"}},"plannedAt":{"anyOf":[{"type":"number"},{"type":"null"}]},"revision":{"type":"number"},"seriesId":{"anyOf":[{"type":"string"},{"type":"null"}]},"shortenLinks":{"type":"boolean"},"shortLinks":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"short":{"type":"string"},"clicks":{"type":"number"}},"required":["url","short","clicks"],"additionalProperties":false}},"variants":{"type":"array","items":{"type":"object","properties":{"channelId":{"type":"string"},"body":{"anyOf":[{"type":"string","maxLength":100000},{"type":"null"}]},"media":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"assetId":{"type":"string"},"alt":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]}},"required":["assetId"],"additionalProperties":false},"maxItems":32},{"type":"null"},{"type":"null"}]},"tiktok":{"anyOf":[{"type":"object","properties":{"mode":{"anyOf":[{"type":"string","enum":["direct","inbox"]},{"type":"null"}]},"privacy":{"anyOf":[{"type":"string","enum":["PUBLIC_TO_EVERYONE","MUTUAL_FOLLOW_FRIENDS","FOLLOWER_OF_CREATOR","SELF_ONLY"]},{"type":"null"}]},"title":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"allowComment":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"allowDuet":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"allowStitch":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"yourBrand":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"brandedContent":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"aiGenerated":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"autoAddMusic":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"additionalProperties":false,"description":"Required for a TikTok channel. What the post carries decides its kind: one video is a video post, images (JPEG or WebP, 20 MB each, up to 35 by API; the post holds up to 32) are a photo carousel. PostJr serves TikTok each photo scaled to fit 1080p, never enlarged, so larger images are accepted. `mode` is \"direct\" (default: posts to the profile; needs the video.publish permission) or \"inbox\" (uploads a draft to the creator's TikTok inbox; needs video.upload; the creator must open TikTok and finish it, so nothing is posted by PostJr, the copy ends published with `inbox: true`, and a video's text is not sent because TikTok takes none for inbox videos). For a direct post `privacy` is required and has no default: choose one of the account's privacyOptions (GET /v1/channels/:id/tiktok); an inbox draft takes none of the choices below, the creator makes them in TikTok. Comments, Duet (video only), Stitch (video only), the brand disclosures (`yourBrand`: promotes yourself; `brandedContent`: promotes a third party, which cannot be SELF_ONLY) and the AI-generated label are off unless true. `autoAddMusic` (photo posts in direct mode only, off unless true) has TikTok pick a track for the photos; in inbox mode the creator picks music in TikTok. For a photo post the text is the description (4000 characters) and `title` the title (up to 90, optional). Scheduling a direct TikTok post records your agreement to TikTok's Music Usage Confirmation, and with brandedContent its Branded Content Policy."},{"type":"null"}]},"youtube":{"anyOf":[{"type":"object","properties":{"privacy":{"anyOf":[{"type":"string","enum":["public","unlisted","private"]},{"type":"null"}]},"madeForKids":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"title":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false,"description":"Required for a YouTube Shorts channel, which posts one vertical or square video of up to 3 minutes (no images, no threads: later parts are left out). `privacy` (public, unlisted or private) and `madeForKids` (YouTube's selfDeclaredMadeForKids, true or false) have no defaults: choose both. `title` is the video's title (1 to 100 characters, no < or >; one that does not fit is refused, never cut); without it the title is the post's first line, cut to 100 characters. The description is the whole text (up to 5,000 bytes, no < or >). By posting to YouTube the person confirms they have the rights to the video and that it follows YouTube's Terms of Service and Community Guidelines. PostJr adds no #Shorts tag."},{"type":"null"}]},"pinterest":{"anyOf":[{"type":"object","properties":{"boardId":{"anyOf":[{"type":"string"},{"type":"null"}]},"boardSectionId":{"anyOf":[{"type":"string"},{"type":"null"},{"type":"null"}]}},"additionalProperties":false,"description":"Required for a Pinterest account, which posts one Pin: an image, a carousel of 2 to 5 images, or one video (4 seconds to 15 minutes; no thread, later parts are left out). `boardId` has no default: choose one of the account's boards (GET /v1/channels/:id/pinterest/boards); `boardSectionId` optionally names one of that board's sections. The title is the post's first line (cut to 100 characters). The description (up to 800) is the lines after the first line when it fits the title, otherwise the whole text. The Pin's link is the first http(s) address in the text. The alt text is the image's."},{"type":"null"}]},"xCommunityId":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"},{"type":"null"}]},"later":{"anyOf":[{"type":"object","properties":{"delayMinutes":{"anyOf":[{"type":"integer","minimum":0,"maximum":10080},{"type":"null"}]},"minLikes":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000000},{"type":"null"}]},"minReplies":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000000},{"type":"null"}]}},"additionalProperties":false},{"type":"null"},{"type":"null"}]}},"required":["channelId","body"],"additionalProperties":false}},"publications":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"postId":{"type":"string"},"series":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"state":{"type":"string","enum":["active","ended","cancelled","stopped"]},"rule":{"type":"object","properties":{"frequency":{"type":"string","enum":["daily","weekly","monthly"]},"weekdays":{"anyOf":[{"type":"array","items":{"type":"string","enum":["sun","mon","tue","wed","thu","fri","sat"]},"maxItems":7},{"type":"null"}]},"monthDay":{"anyOf":[{"type":"integer","minimum":1,"maximum":31},{"type":"null"}]},"time":{"type":"string"},"timeZone":{"type":"string"},"until":{"anyOf":[{"type":"string"},{"type":"null"}]},"count":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000},{"type":"null"}]}},"required":["frequency","time","timeZone"],"additionalProperties":false}},"required":["id","state","rule"],"additionalProperties":false},{"type":"null"}]},"channelId":{"type":"string"},"network":{"type":"string","enum":["fake","bluesky","mastodon","threads","instagram","tiktok","x","linkedin","youtube","discord","telegram","pinterest","slack"]},"handle":{"type":"string"},"revision":{"type":"number"},"text":{"type":"string"},"partCount":{"type":"number"},"parts":{"type":"array","items":{"type":"object","properties":{"index":{"type":"number"},"externalId":{"type":"string"},"externalUrl":{"type":"string"}},"required":["index","externalId","externalUrl"],"additionalProperties":false}},"partPlan":{"type":"array","items":{"type":"object","properties":{"delayMinutes":{"type":"number"},"minLikes":{"anyOf":[{"type":"number"},{"type":"null"}]},"minReplies":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["delayMinutes","minLikes","minReplies"],"additionalProperties":false}},"comments":{"type":"boolean"},"gateChecks":{"type":"number"},"partsNote":{"anyOf":[{"type":"string"},{"type":"null"}]},"dueAt":{"type":"number"},"state":{"type":"string","enum":["scheduled","claimed","publishing","processing","published","failed","unconfirmed","cancelled"]},"inbox":{"type":"boolean"},"betweenParts":{"type":"boolean"},"deletion":{"anyOf":[{"type":"string","enum":["pending","deleted","failed"]},{"type":"null"}]},"attemptCount":{"type":"number"},"externalId":{"anyOf":[{"type":"string"},{"type":"null"}]},"externalUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"contentRejected":{"type":"boolean"},"held":{"type":"boolean"},"review":{"type":"string","enum":["none","waiting","approved","changes_requested"]},"sendsAsDraft":{"type":"boolean"},"returnsToDrafts":{"type":"boolean"},"media":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["image","video"]}},"required":["id","kind"],"additionalProperties":false},{"type":"null"}]},"metrics":{"anyOf":[{"type":"object","properties":{"readAt":{"type":"number"},"nextReadAt":{"anyOf":[{"type":"number"},{"type":"null"}]},"views":{"anyOf":[{"type":"number"},{"type":"null"}]},"likes":{"anyOf":[{"type":"number"},{"type":"null"}]},"replies":{"anyOf":[{"type":"number"},{"type":"null"}]},"reposts":{"anyOf":[{"type":"number"},{"type":"null"}]},"quotes":{"anyOf":[{"type":"number"},{"type":"null"}]},"saves":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["readAt","nextReadAt","views","likes","replies","reposts","quotes","saves"],"additionalProperties":false},{"type":"null"}]},"updatedAt":{"type":"number"}},"required":["id","postId","series","channelId","network","handle","revision","text","partCount","parts","partPlan","comments","gateChecks","partsNote","dueAt","state","inbox","betweenParts","deletion","attemptCount","externalId","externalUrl","errorCode","errorMessage","contentRejected","held","review","sendsAsDraft","returnsToDrafts","media","metrics","updatedAt"],"additionalProperties":false}},"review":{"type":"object","properties":{"state":{"type":"string","enum":["none","waiting","approved","changes_requested"]},"needsApproval":{"type":"boolean"},"openComments":{"type":"number"}},"required":["state","needsApproval","openComments"],"additionalProperties":false},"createdAt":{"type":"number"},"updatedAt":{"type":"number"}},"required":["id","body","media","canvas","notes","attachedNotes","thread","channelIds","plannedAt","revision","seriesId","shortenLinks","shortLinks","variants","publications","review","createdAt","updatedAt"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"publications":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"postId":{"type":"string"},"channelId":{"type":"string"},"state":{"type":"string","enum":["scheduled","claimed","publishing","processing","published","failed","unconfirmed","cancelled"]},"inbox":{"type":"boolean"},"deletion":{"anyOf":[{"type":"string","enum":["pending","deleted","failed"]},{"type":"null"}]},"dueAt":{"type":"number"},"held":{"type":"boolean"},"review":{"type":"string","enum":["none","waiting","approved","changes_requested"]},"externalUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","postId","channelId","state","inbox","deletion","dueAt","held","review","externalUrl","errorCode","errorMessage"],"additionalProperties":false}}},"required":["id","publications"],"additionalProperties":false}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"402":{"description":"PlanRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanRequiredEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictEncoded"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidEncoded"}}}},"429":{"description":"TooManyRequests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsEncoded"}}}}},"description":"Schedules the post to `channelIds` at `dueAt` (UTC milliseconds) or `at` (ISO 8601 with an offset or Z), at most one; neither publishes now. `repeat` (frequency daily, weekly with weekdays, or monthly with monthDay; time HH:MM; an IANA timeZone; optional until date or count) makes it a series: the time is then the start, and the first departure is the first match of the rule at or after it. A workspace without a plan (no subscription, a payment failed more than 7 days ago, or cancelled), or one at its plan's account limit, or a post to more accounts than its plan allows (Starter 6, Pro 30, Agency 100), is refused with 402 PlanRequired and nothing changes. In the free trial, connecting more different accounts than the plan's limit over the whole trial (disconnecting one frees no place; reconnecting the same account is fine) is refused the same way with reason trial_limit, and a schedule that would put more than 20 copies on one UTC day before the trial ends is refused with 422. See GET /v1/billing. Missing alt text is filled from the asset's stored description or Workers AI first, and refused (422) when none can be had. A save, schedule or cancel that lands while it validates answers 409: reload the post and schedule again. The post's revision does not change when it is scheduled. `view: \"brief\"` returns only ids, states, due times, URLs and errors; full is the default.","summary":"Schedule a post","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"channelIds":{"type":"array","prefixItems":[{"type":"string"}],"minItems":1,"items":{"type":"string"},"maxItems":100},"dueAt":{"anyOf":[{"type":"number"},{"type":"null"}]},"at":{"anyOf":[{"type":"string"},{"type":"null"}]},"repeat":{"anyOf":[{"type":"object","properties":{"frequency":{"type":"string","enum":["daily","weekly","monthly"]},"weekdays":{"anyOf":[{"type":"array","items":{"type":"string","enum":["sun","mon","tue","wed","thu","fri","sat"]},"maxItems":7},{"type":"null"}]},"monthDay":{"anyOf":[{"type":"integer","minimum":1,"maximum":31},{"type":"null"}]},"time":{"type":"string"},"timeZone":{"type":"string"},"until":{"anyOf":[{"type":"string"},{"type":"null"}]},"count":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000},{"type":"null"}]}},"required":["frequency","time","timeZone"],"additionalProperties":false},{"type":"null"}]},"endSeries":{"anyOf":[{"type":"string"},{"type":"null"}]},"view":{"anyOf":[{"type":"string","enum":["brief"],"description":"Return only ids, publication states, due times, external URLs, errors and actionable problems."},{"type":"null"}]}},"required":["channelIds"],"additionalProperties":false}}},"required":true}}},"/v1/posts/{id}/cancel":{"post":{"tags":["posts"],"operationId":"posts.cancel","parameters":[{"name":"id","in":"path","schema":{"type":"string"},"required":true},{"name":"dueAt","in":"query","schema":{"type":"string"},"required":false}],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"body":{"type":"string"},"media":{"type":"array","items":{"type":"object","properties":{"assetId":{"type":"string"},"alt":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]}},"required":["assetId"],"additionalProperties":false}},"canvas":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"assetId":{"type":"string"},"x":{"type":"number"},"y":{"type":"number"},"w":{"type":"number"},"h":{"type":"number"},"z":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["assetId","x","y","w","h","z"],"additionalProperties":false},{"type":"object","properties":{"noteId":{"type":"string"},"x":{"type":"number"},"y":{"type":"number"},"w":{"type":"number"},"h":{"type":"number"},"z":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["noteId","x","y","w","h","z"],"additionalProperties":false}]}},"notes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"text":{"type":"string"}},"required":["id","name","text"],"additionalProperties":false}},"attachedNotes":{"type":"array","items":{"type":"string"}},"thread":{"type":"array","items":{"type":"object","properties":{"body":{"type":"string"},"media":{"type":"array","items":{"type":"object","properties":{"assetId":{"type":"string"},"alt":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]}},"required":["assetId"],"additionalProperties":false}},"delayMinutes":{"type":"number"},"minLikes":{"anyOf":[{"type":"number"},{"type":"null"}]},"minReplies":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["body","media","delayMinutes"],"additionalProperties":false}},"channelIds":{"type":"array","items":{"type":"string"}},"plannedAt":{"anyOf":[{"type":"number"},{"type":"null"}]},"revision":{"type":"number"},"seriesId":{"anyOf":[{"type":"string"},{"type":"null"}]},"shortenLinks":{"type":"boolean"},"shortLinks":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"short":{"type":"string"},"clicks":{"type":"number"}},"required":["url","short","clicks"],"additionalProperties":false}},"variants":{"type":"array","items":{"type":"object","properties":{"channelId":{"type":"string"},"body":{"anyOf":[{"type":"string","maxLength":100000},{"type":"null"}]},"media":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"assetId":{"type":"string"},"alt":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]}},"required":["assetId"],"additionalProperties":false},"maxItems":32},{"type":"null"},{"type":"null"}]},"tiktok":{"anyOf":[{"type":"object","properties":{"mode":{"anyOf":[{"type":"string","enum":["direct","inbox"]},{"type":"null"}]},"privacy":{"anyOf":[{"type":"string","enum":["PUBLIC_TO_EVERYONE","MUTUAL_FOLLOW_FRIENDS","FOLLOWER_OF_CREATOR","SELF_ONLY"]},{"type":"null"}]},"title":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"allowComment":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"allowDuet":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"allowStitch":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"yourBrand":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"brandedContent":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"aiGenerated":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"autoAddMusic":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"additionalProperties":false,"description":"Required for a TikTok channel. What the post carries decides its kind: one video is a video post, images (JPEG or WebP, 20 MB each, up to 35 by API; the post holds up to 32) are a photo carousel. PostJr serves TikTok each photo scaled to fit 1080p, never enlarged, so larger images are accepted. `mode` is \"direct\" (default: posts to the profile; needs the video.publish permission) or \"inbox\" (uploads a draft to the creator's TikTok inbox; needs video.upload; the creator must open TikTok and finish it, so nothing is posted by PostJr, the copy ends published with `inbox: true`, and a video's text is not sent because TikTok takes none for inbox videos). For a direct post `privacy` is required and has no default: choose one of the account's privacyOptions (GET /v1/channels/:id/tiktok); an inbox draft takes none of the choices below, the creator makes them in TikTok. Comments, Duet (video only), Stitch (video only), the brand disclosures (`yourBrand`: promotes yourself; `brandedContent`: promotes a third party, which cannot be SELF_ONLY) and the AI-generated label are off unless true. `autoAddMusic` (photo posts in direct mode only, off unless true) has TikTok pick a track for the photos; in inbox mode the creator picks music in TikTok. For a photo post the text is the description (4000 characters) and `title` the title (up to 90, optional). Scheduling a direct TikTok post records your agreement to TikTok's Music Usage Confirmation, and with brandedContent its Branded Content Policy."},{"type":"null"}]},"youtube":{"anyOf":[{"type":"object","properties":{"privacy":{"anyOf":[{"type":"string","enum":["public","unlisted","private"]},{"type":"null"}]},"madeForKids":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"title":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false,"description":"Required for a YouTube Shorts channel, which posts one vertical or square video of up to 3 minutes (no images, no threads: later parts are left out). `privacy` (public, unlisted or private) and `madeForKids` (YouTube's selfDeclaredMadeForKids, true or false) have no defaults: choose both. `title` is the video's title (1 to 100 characters, no < or >; one that does not fit is refused, never cut); without it the title is the post's first line, cut to 100 characters. The description is the whole text (up to 5,000 bytes, no < or >). By posting to YouTube the person confirms they have the rights to the video and that it follows YouTube's Terms of Service and Community Guidelines. PostJr adds no #Shorts tag."},{"type":"null"}]},"pinterest":{"anyOf":[{"type":"object","properties":{"boardId":{"anyOf":[{"type":"string"},{"type":"null"}]},"boardSectionId":{"anyOf":[{"type":"string"},{"type":"null"},{"type":"null"}]}},"additionalProperties":false,"description":"Required for a Pinterest account, which posts one Pin: an image, a carousel of 2 to 5 images, or one video (4 seconds to 15 minutes; no thread, later parts are left out). `boardId` has no default: choose one of the account's boards (GET /v1/channels/:id/pinterest/boards); `boardSectionId` optionally names one of that board's sections. The title is the post's first line (cut to 100 characters). The description (up to 800) is the lines after the first line when it fits the title, otherwise the whole text. The Pin's link is the first http(s) address in the text. The alt text is the image's."},{"type":"null"}]},"xCommunityId":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"},{"type":"null"}]},"later":{"anyOf":[{"type":"object","properties":{"delayMinutes":{"anyOf":[{"type":"integer","minimum":0,"maximum":10080},{"type":"null"}]},"minLikes":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000000},{"type":"null"}]},"minReplies":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000000},{"type":"null"}]}},"additionalProperties":false},{"type":"null"},{"type":"null"}]}},"required":["channelId","body"],"additionalProperties":false}},"publications":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"postId":{"type":"string"},"series":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"state":{"type":"string","enum":["active","ended","cancelled","stopped"]},"rule":{"type":"object","properties":{"frequency":{"type":"string","enum":["daily","weekly","monthly"]},"weekdays":{"anyOf":[{"type":"array","items":{"type":"string","enum":["sun","mon","tue","wed","thu","fri","sat"]},"maxItems":7},{"type":"null"}]},"monthDay":{"anyOf":[{"type":"integer","minimum":1,"maximum":31},{"type":"null"}]},"time":{"type":"string"},"timeZone":{"type":"string"},"until":{"anyOf":[{"type":"string"},{"type":"null"}]},"count":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000},{"type":"null"}]}},"required":["frequency","time","timeZone"],"additionalProperties":false}},"required":["id","state","rule"],"additionalProperties":false},{"type":"null"}]},"channelId":{"type":"string"},"network":{"type":"string","enum":["fake","bluesky","mastodon","threads","instagram","tiktok","x","linkedin","youtube","discord","telegram","pinterest","slack"]},"handle":{"type":"string"},"revision":{"type":"number"},"text":{"type":"string"},"partCount":{"type":"number"},"parts":{"type":"array","items":{"type":"object","properties":{"index":{"type":"number"},"externalId":{"type":"string"},"externalUrl":{"type":"string"}},"required":["index","externalId","externalUrl"],"additionalProperties":false}},"partPlan":{"type":"array","items":{"type":"object","properties":{"delayMinutes":{"type":"number"},"minLikes":{"anyOf":[{"type":"number"},{"type":"null"}]},"minReplies":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["delayMinutes","minLikes","minReplies"],"additionalProperties":false}},"comments":{"type":"boolean"},"gateChecks":{"type":"number"},"partsNote":{"anyOf":[{"type":"string"},{"type":"null"}]},"dueAt":{"type":"number"},"state":{"type":"string","enum":["scheduled","claimed","publishing","processing","published","failed","unconfirmed","cancelled"]},"inbox":{"type":"boolean"},"betweenParts":{"type":"boolean"},"deletion":{"anyOf":[{"type":"string","enum":["pending","deleted","failed"]},{"type":"null"}]},"attemptCount":{"type":"number"},"externalId":{"anyOf":[{"type":"string"},{"type":"null"}]},"externalUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"contentRejected":{"type":"boolean"},"held":{"type":"boolean"},"review":{"type":"string","enum":["none","waiting","approved","changes_requested"]},"sendsAsDraft":{"type":"boolean"},"returnsToDrafts":{"type":"boolean"},"media":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["image","video"]}},"required":["id","kind"],"additionalProperties":false},{"type":"null"}]},"metrics":{"anyOf":[{"type":"object","properties":{"readAt":{"type":"number"},"nextReadAt":{"anyOf":[{"type":"number"},{"type":"null"}]},"views":{"anyOf":[{"type":"number"},{"type":"null"}]},"likes":{"anyOf":[{"type":"number"},{"type":"null"}]},"replies":{"anyOf":[{"type":"number"},{"type":"null"}]},"reposts":{"anyOf":[{"type":"number"},{"type":"null"}]},"quotes":{"anyOf":[{"type":"number"},{"type":"null"}]},"saves":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["readAt","nextReadAt","views","likes","replies","reposts","quotes","saves"],"additionalProperties":false},{"type":"null"}]},"updatedAt":{"type":"number"}},"required":["id","postId","series","channelId","network","handle","revision","text","partCount","parts","partPlan","comments","gateChecks","partsNote","dueAt","state","inbox","betweenParts","deletion","attemptCount","externalId","externalUrl","errorCode","errorMessage","contentRejected","held","review","sendsAsDraft","returnsToDrafts","media","metrics","updatedAt"],"additionalProperties":false}},"review":{"type":"object","properties":{"state":{"type":"string","enum":["none","waiting","approved","changes_requested"]},"needsApproval":{"type":"boolean"},"openComments":{"type":"number"}},"required":["state","needsApproval","openComments"],"additionalProperties":false},"createdAt":{"type":"number"},"updatedAt":{"type":"number"}},"required":["id","body","media","canvas","notes","attachedNotes","thread","channelIds","plannedAt","revision","seriesId","shortenLinks","shortLinks","variants","publications","review","createdAt","updatedAt"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"429":{"description":"TooManyRequests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsEncoded"}}}}},"description":"Cancels every scheduled publication of the post that has not started publishing, so nothing is sent at their time. A post with nothing else sent or scheduled returns to Drafts with its text and media (each publication's `returnsToDrafts` says so). `dueAt` (UTC milliseconds) keeps the post's other departures and cancels only those due then; the post then stays scheduled and is not a draft. For a repeating post this skips this occurrence only: the series goes on with the next one (end it with POST /v1/series/:id/cancel).","summary":"Move a scheduled post to drafts (cancel its scheduled publications)"}},"/v1/posts/{id}/review-links":{"post":{"tags":["reviews"],"operationId":"reviews.createLink","parameters":[{"name":"id","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"createdAt":{"type":"number"},"expiresAt":{"type":"number"},"revokedAt":{"anyOf":[{"type":"number"},{"type":"null"}]},"url":{"type":"string"},"review":{"type":"object","properties":{"state":{"type":"string","enum":["none","waiting","approved","changes_requested"]},"needsApproval":{"type":"boolean"},"openComments":{"type":"number"}},"required":["state","needsApproval","openComments"],"additionalProperties":false}},"required":["id","createdAt","expiresAt","revokedAt","url","review"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidEncoded"}}}},"429":{"description":"TooManyRequests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsEncoded"}}}}},"description":"Makes a link anyone can open without an account: a read-only page of the post's previews and media where they leave comments under a name and Approve or Request changes. `url` holds the secret token and is answered only now. It expires after `expiresInDays` (default 14, at most 90) and can be revoked. A post has at most 20 live links (revoked and expired ones do not count). The first link sets the review state to waiting. `needsApproval` turns the approval gate on or off in the same call. While `needsApproval` is on and the state is not `approved`, the post's scheduled copies are held: they stay scheduled and publish the moment it is approved.","summary":"Share a post for review","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"expiresInDays":{"anyOf":[{"type":"integer","minimum":1,"maximum":90},{"type":"null"}]},"needsApproval":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"additionalProperties":false}}},"required":true}}},"/v1/posts/{id}/review":{"get":{"tags":["reviews"],"operationId":"reviews.get","parameters":[{"name":"id","in":"path","schema":{"type":"string"},"required":true},{"name":"view","in":"query","schema":{"type":"string","enum":["brief"],"description":"Return only ids, publication states, due times, external URLs, errors and actionable problems."},"required":false}],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"state":{"type":"string","enum":["none","waiting","approved","changes_requested"]},"needsApproval":{"type":"boolean"},"openComments":{"type":"number"},"revision":{"type":"number"},"links":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"createdAt":{"type":"number"},"expiresAt":{"type":"number"},"revokedAt":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","createdAt","expiresAt","revokedAt"],"additionalProperties":false}},"comments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"author":{"type":"string"},"body":{"type":"string"},"revision":{"type":"number"},"createdAt":{"type":"number"},"resolvedAt":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","author","body","revision","createdAt","resolvedAt"],"additionalProperties":false}},"decisions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"decision":{"type":"string","enum":["approved","changes_requested"]},"author":{"type":"string"},"revision":{"type":"number"},"createdAt":{"type":"number"}},"required":["id","decision","author","revision","createdAt"],"additionalProperties":false}}},"required":["state","needsApproval","openComments","revision","links","comments","decisions"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","enum":["none","waiting","approved","changes_requested"]},"needsApproval":{"type":"boolean"},"openComments":{"type":"number"},"revision":{"type":"number"},"comments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"author":{"type":"string"},"body":{"type":"string"}},"required":["id","author","body"],"additionalProperties":false}}},"required":["state","needsApproval","openComments","revision","comments"],"additionalProperties":false}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"429":{"description":"TooManyRequests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsEncoded"}}}}},"description":"The review state, the post's links without their tokens, and every comment and decision with its author and the revision it was left on. `view=brief` answers the state and the unresolved comments only. A decision counts for the revision it was made on: editing the post puts approved or changes_requested back to waiting.","summary":"Get a post's review"},"patch":{"tags":["reviews"],"operationId":"reviews.settings","parameters":[{"name":"id","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"state":{"type":"string","enum":["none","waiting","approved","changes_requested"]},"needsApproval":{"type":"boolean"},"openComments":{"type":"number"}},"required":["state","needsApproval","openComments"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"429":{"description":"TooManyRequests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsEncoded"}}}}},"description":"Turns the approval gate on or off. While `needsApproval` is on and the state is not `approved`, the post's scheduled copies are held: they stay scheduled and publish the moment it is approved. Turning it off releases held copies. A copy already publishing is not recalled.","summary":"Require approval before publishing","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"needsApproval":{"type":"boolean"}},"required":["needsApproval"],"additionalProperties":false}}},"required":true}}},"/v1/review-links/{id}":{"delete":{"tags":["reviews"],"operationId":"reviews.revokeLink","parameters":[{"name":"id","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"<No Content>"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"429":{"description":"TooManyRequests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsEncoded"}}}}},"description":"The link stops working at once. Its comments and decisions stay.","summary":"Revoke a review link"}},"/v1/review-comments/{id}/resolve":{"post":{"tags":["reviews"],"operationId":"reviews.resolveComment","parameters":[{"name":"id","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"author":{"type":"string"},"body":{"type":"string"},"revision":{"type":"number"},"createdAt":{"type":"number"},"resolvedAt":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","author","body","revision","createdAt","resolvedAt"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"429":{"description":"TooManyRequests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsEncoded"}}}}},"description":"Marks a reviewer's comment as dealt with; `resolved: false` reopens it. Resolving does not change the review state.","summary":"Resolve a comment","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"resolved":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"additionalProperties":false}}},"required":true}}},"/v1/review/{token}":{"get":{"tags":["reviewPublic"],"operationId":"reviewPublic.page","parameters":[{"name":"token","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"state":{"type":"string","enum":["none","waiting","approved","changes_requested"]},"revision":{"type":"number"},"expiresAt":{"type":"number"},"sender":{"type":"string"},"plannedAt":{"anyOf":[{"type":"number"},{"type":"null"}]},"body":{"type":"string"},"targets":{"type":"array","items":{"type":"object","properties":{"network":{"type":"string","enum":["fake","bluesky","mastodon","threads","instagram","tiktok","x","linkedin","youtube","discord","telegram","pinterest","slack"]},"handle":{"type":"string"},"displayName":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatarUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"instanceDomain":{"anyOf":[{"type":"string"},{"type":"null"}]},"limits":{"type":"object","properties":{"maxChars":{"type":"number"},"maxImages":{"type":"number"},"urlLength":{"type":"number"},"imageBytes":{"type":"number"},"imagePixels":{"anyOf":[{"type":"number"},{"type":"null"}]},"videoBytes":{"type":"number"},"videoPixels":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["maxChars","maxImages","urlLength","imageBytes","imagePixels","videoBytes","videoPixels"],"additionalProperties":false},"text":{"type":"string"},"custom":{"type":"boolean"}},"required":["network","handle","displayName","avatarUrl","instanceDomain","limits","text","custom"],"additionalProperties":false}},"media":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"kind":{"type":"string","enum":["image","video"]},"mime":{"type":"string"},"bytes":{"type":"number"},"width":{"type":"number"},"height":{"type":"number"},"durationMs":{"anyOf":[{"type":"number"},{"type":"null"}]},"alt":{"type":"string"}},"required":["url","kind","mime","bytes","width","height","durationMs","alt"],"additionalProperties":false}},"comments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"author":{"type":"string"},"body":{"type":"string"},"createdAt":{"type":"number"},"resolved":{"type":"boolean"}},"required":["id","author","body","createdAt","resolved"],"additionalProperties":false}},"decisions":{"type":"array","items":{"type":"object","properties":{"decision":{"type":"string","enum":["approved","changes_requested"]},"author":{"type":"string"},"revision":{"type":"number"},"createdAt":{"type":"number"}},"required":["decision","author","revision","createdAt"],"additionalProperties":false}}},"required":["state","revision","expiresAt","sender","plannedAt","body","targets","media","comments","decisions"],"additionalProperties":false}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"429":{"description":"TooManyRequests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsEncoded"}}}}},"description":"No sign-in. The post's per-network text, media and the comments so far. An unknown, expired or revoked link answers 404. Rate limited by caller and by link.","summary":"Open a review link"}},"/v1/review/{token}/comments":{"post":{"tags":["reviewPublic"],"operationId":"reviewPublic.comment","parameters":[{"name":"token","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictEncoded"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidEncoded"}}}},"429":{"description":"TooManyRequests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsEncoded"}}}}},"description":"No sign-in. `author` is a display name (up to 80 characters) and `body` up to 2000. A post holds at most 200 comments (422 after). Send a ULID `id` to retry safely.","summary":"Comment on a review","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}]},"author":{"type":"string","maxLength":80},"body":{"type":"string","maxLength":2000}},"required":["author","body"],"additionalProperties":false}}},"required":true}}},"/v1/review/{token}/decision":{"post":{"tags":["reviewPublic"],"operationId":"reviewPublic.decide","parameters":[{"name":"token","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"state":{"type":"string","enum":["none","waiting","approved","changes_requested"]},"revision":{"type":"number"},"expiresAt":{"type":"number"},"sender":{"type":"string"},"plannedAt":{"anyOf":[{"type":"number"},{"type":"null"}]},"body":{"type":"string"},"targets":{"type":"array","items":{"type":"object","properties":{"network":{"type":"string","enum":["fake","bluesky","mastodon","threads","instagram","tiktok","x","linkedin","youtube","discord","telegram","pinterest","slack"]},"handle":{"type":"string"},"displayName":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatarUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"instanceDomain":{"anyOf":[{"type":"string"},{"type":"null"}]},"limits":{"type":"object","properties":{"maxChars":{"type":"number"},"maxImages":{"type":"number"},"urlLength":{"type":"number"},"imageBytes":{"type":"number"},"imagePixels":{"anyOf":[{"type":"number"},{"type":"null"}]},"videoBytes":{"type":"number"},"videoPixels":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["maxChars","maxImages","urlLength","imageBytes","imagePixels","videoBytes","videoPixels"],"additionalProperties":false},"text":{"type":"string"},"custom":{"type":"boolean"}},"required":["network","handle","displayName","avatarUrl","instanceDomain","limits","text","custom"],"additionalProperties":false}},"media":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"kind":{"type":"string","enum":["image","video"]},"mime":{"type":"string"},"bytes":{"type":"number"},"width":{"type":"number"},"height":{"type":"number"},"durationMs":{"anyOf":[{"type":"number"},{"type":"null"}]},"alt":{"type":"string"}},"required":["url","kind","mime","bytes","width","height","durationMs","alt"],"additionalProperties":false}},"comments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"author":{"type":"string"},"body":{"type":"string"},"createdAt":{"type":"number"},"resolved":{"type":"boolean"}},"required":["id","author","body","createdAt","resolved"],"additionalProperties":false}},"decisions":{"type":"array","items":{"type":"object","properties":{"decision":{"type":"string","enum":["approved","changes_requested"]},"author":{"type":"string"},"revision":{"type":"number"},"createdAt":{"type":"number"}},"required":["decision","author","revision","createdAt"],"additionalProperties":false}}},"required":["state","revision","expiresAt","sender","plannedAt","body","targets","media","comments","decisions"],"additionalProperties":false}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictEncoded"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidEncoded"}}}},"429":{"description":"TooManyRequests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsEncoded"}}}}},"description":"No sign-in. `revision` must be the revision the page showed (409 if the post changed meanwhile). Approving releases the post's held copies; either decision can be changed by sending the other.","summary":"Approve or request changes","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"decision":{"type":"string","enum":["approved","changes_requested"]},"author":{"type":"string","maxLength":80},"revision":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["decision","author","revision"],"additionalProperties":false}}},"required":true}}},"/v1/publications":{"get":{"tags":["publications"],"operationId":"publications.list","parameters":[{"name":"state","in":"query","schema":{"type":"string"},"required":false},{"name":"channelId","in":"query","schema":{"type":"string"},"required":false},{"name":"from","in":"query","schema":{"type":"string"},"required":false},{"name":"to","in":"query","schema":{"type":"string"},"required":false},{"name":"limit","in":"query","schema":{"type":"string"},"required":false},{"name":"offset","in":"query","schema":{"type":"string"},"required":false},{"name":"cursor","in":"query","schema":{"type":"string","maxLength":100},"required":false},{"name":"view","in":"query","schema":{"type":"string","enum":["brief"],"description":"Return only ids, publication states, due times, external URLs, errors and actionable problems."},"required":false}],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"postId":{"type":"string"},"series":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"state":{"type":"string","enum":["active","ended","cancelled","stopped"]},"rule":{"type":"object","properties":{"frequency":{"type":"string","enum":["daily","weekly","monthly"]},"weekdays":{"anyOf":[{"type":"array","items":{"type":"string","enum":["sun","mon","tue","wed","thu","fri","sat"]},"maxItems":7},{"type":"null"}]},"monthDay":{"anyOf":[{"type":"integer","minimum":1,"maximum":31},{"type":"null"}]},"time":{"type":"string"},"timeZone":{"type":"string"},"until":{"anyOf":[{"type":"string"},{"type":"null"}]},"count":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000},{"type":"null"}]}},"required":["frequency","time","timeZone"],"additionalProperties":false}},"required":["id","state","rule"],"additionalProperties":false},{"type":"null"}]},"channelId":{"type":"string"},"network":{"type":"string","enum":["fake","bluesky","mastodon","threads","instagram","tiktok","x","linkedin","youtube","discord","telegram","pinterest","slack"]},"handle":{"type":"string"},"revision":{"type":"number"},"text":{"type":"string"},"partCount":{"type":"number"},"parts":{"type":"array","items":{"type":"object","properties":{"index":{"type":"number"},"externalId":{"type":"string"},"externalUrl":{"type":"string"}},"required":["index","externalId","externalUrl"],"additionalProperties":false}},"partPlan":{"type":"array","items":{"type":"object","properties":{"delayMinutes":{"type":"number"},"minLikes":{"anyOf":[{"type":"number"},{"type":"null"}]},"minReplies":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["delayMinutes","minLikes","minReplies"],"additionalProperties":false}},"comments":{"type":"boolean"},"gateChecks":{"type":"number"},"partsNote":{"anyOf":[{"type":"string"},{"type":"null"}]},"dueAt":{"type":"number"},"state":{"type":"string","enum":["scheduled","claimed","publishing","processing","published","failed","unconfirmed","cancelled"]},"inbox":{"type":"boolean"},"betweenParts":{"type":"boolean"},"deletion":{"anyOf":[{"type":"string","enum":["pending","deleted","failed"]},{"type":"null"}]},"attemptCount":{"type":"number"},"externalId":{"anyOf":[{"type":"string"},{"type":"null"}]},"externalUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"contentRejected":{"type":"boolean"},"held":{"type":"boolean"},"review":{"type":"string","enum":["none","waiting","approved","changes_requested"]},"sendsAsDraft":{"type":"boolean"},"returnsToDrafts":{"type":"boolean"},"media":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["image","video"]}},"required":["id","kind"],"additionalProperties":false},{"type":"null"}]},"metrics":{"anyOf":[{"type":"object","properties":{"readAt":{"type":"number"},"nextReadAt":{"anyOf":[{"type":"number"},{"type":"null"}]},"views":{"anyOf":[{"type":"number"},{"type":"null"}]},"likes":{"anyOf":[{"type":"number"},{"type":"null"}]},"replies":{"anyOf":[{"type":"number"},{"type":"null"}]},"reposts":{"anyOf":[{"type":"number"},{"type":"null"}]},"quotes":{"anyOf":[{"type":"number"},{"type":"null"}]},"saves":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["readAt","nextReadAt","views","likes","replies","reposts","quotes","saves"],"additionalProperties":false},{"type":"null"}]},"updatedAt":{"type":"number"}},"required":["id","postId","series","channelId","network","handle","revision","text","partCount","parts","partPlan","comments","gateChecks","partsNote","dueAt","state","inbox","betweenParts","deletion","attemptCount","externalId","externalUrl","errorCode","errorMessage","contentRejected","held","review","sendsAsDraft","returnsToDrafts","media","metrics","updatedAt"],"additionalProperties":false}},{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"postId":{"type":"string"},"channelId":{"type":"string"},"state":{"type":"string","enum":["scheduled","claimed","publishing","processing","published","failed","unconfirmed","cancelled"]},"inbox":{"type":"boolean"},"deletion":{"anyOf":[{"type":"string","enum":["pending","deleted","failed"]},{"type":"null"}]},"dueAt":{"type":"number"},"held":{"type":"boolean"},"review":{"type":"string","enum":["none","waiting","approved","changes_requested"]},"externalUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","postId","channelId","state","inbox","deletion","dueAt","held","review","externalUrl","errorCode","errorMessage"],"additionalProperties":false}}]}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"429":{"description":"TooManyRequests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsEncoded"}}}}},"description":"Newest due time first (ties by id), 100 by default and at most 500 (`limit`). Set `view=brief` to return only ids, states, due times, URLs and errors. When more rows follow, the response carries an `x-next-cursor` header; send its value as `cursor` to get the rows after the last one returned. A cursor holds its place when rows change in between, an `offset` does not. A cursor this list did not give out is refused with 400. `state` takes one or more states separated by commas: scheduled, claimed, publishing, processing (waiting on the network), published, failed, unconfirmed (needs review), cancelled. A failed-only query (`state=failed`) is the attention queue; scheduling a replacement cancels the failed copy, which remains in multi-state history. `channelId` keeps one channel; `from` (inclusive) and `to` (exclusive) bound the due time in UTC milliseconds.","summary":"List publications"}},"/v1/publications/{id}":{"get":{"tags":["publications"],"operationId":"publications.get","parameters":[{"name":"id","in":"path","schema":{"type":"string"},"required":true},{"name":"view","in":"query","schema":{"type":"string","enum":["brief"],"description":"Return only ids, publication states, due times, external URLs, errors and actionable problems."},"required":false}],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"postId":{"type":"string"},"series":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"state":{"type":"string","enum":["active","ended","cancelled","stopped"]},"rule":{"type":"object","properties":{"frequency":{"type":"string","enum":["daily","weekly","monthly"]},"weekdays":{"anyOf":[{"type":"array","items":{"type":"string","enum":["sun","mon","tue","wed","thu","fri","sat"]},"maxItems":7},{"type":"null"}]},"monthDay":{"anyOf":[{"type":"integer","minimum":1,"maximum":31},{"type":"null"}]},"time":{"type":"string"},"timeZone":{"type":"string"},"until":{"anyOf":[{"type":"string"},{"type":"null"}]},"count":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000},{"type":"null"}]}},"required":["frequency","time","timeZone"],"additionalProperties":false}},"required":["id","state","rule"],"additionalProperties":false},{"type":"null"}]},"channelId":{"type":"string"},"network":{"type":"string","enum":["fake","bluesky","mastodon","threads","instagram","tiktok","x","linkedin","youtube","discord","telegram","pinterest","slack"]},"handle":{"type":"string"},"revision":{"type":"number"},"text":{"type":"string"},"partCount":{"type":"number"},"parts":{"type":"array","items":{"type":"object","properties":{"index":{"type":"number"},"externalId":{"type":"string"},"externalUrl":{"type":"string"}},"required":["index","externalId","externalUrl"],"additionalProperties":false}},"partPlan":{"type":"array","items":{"type":"object","properties":{"delayMinutes":{"type":"number"},"minLikes":{"anyOf":[{"type":"number"},{"type":"null"}]},"minReplies":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["delayMinutes","minLikes","minReplies"],"additionalProperties":false}},"comments":{"type":"boolean"},"gateChecks":{"type":"number"},"partsNote":{"anyOf":[{"type":"string"},{"type":"null"}]},"dueAt":{"type":"number"},"state":{"type":"string","enum":["scheduled","claimed","publishing","processing","published","failed","unconfirmed","cancelled"]},"inbox":{"type":"boolean"},"betweenParts":{"type":"boolean"},"deletion":{"anyOf":[{"type":"string","enum":["pending","deleted","failed"]},{"type":"null"}]},"attemptCount":{"type":"number"},"externalId":{"anyOf":[{"type":"string"},{"type":"null"}]},"externalUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"contentRejected":{"type":"boolean"},"held":{"type":"boolean"},"review":{"type":"string","enum":["none","waiting","approved","changes_requested"]},"sendsAsDraft":{"type":"boolean"},"returnsToDrafts":{"type":"boolean"},"media":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["image","video"]}},"required":["id","kind"],"additionalProperties":false},{"type":"null"}]},"metrics":{"anyOf":[{"type":"object","properties":{"readAt":{"type":"number"},"nextReadAt":{"anyOf":[{"type":"number"},{"type":"null"}]},"views":{"anyOf":[{"type":"number"},{"type":"null"}]},"likes":{"anyOf":[{"type":"number"},{"type":"null"}]},"replies":{"anyOf":[{"type":"number"},{"type":"null"}]},"reposts":{"anyOf":[{"type":"number"},{"type":"null"}]},"quotes":{"anyOf":[{"type":"number"},{"type":"null"}]},"saves":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["readAt","nextReadAt","views","likes","replies","reposts","quotes","saves"],"additionalProperties":false},{"type":"null"}]},"updatedAt":{"type":"number"},"attempts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"startedAt":{"type":"number"},"finishedAt":{"anyOf":[{"type":"number"},{"type":"null"}]},"outcome":{"anyOf":[{"type":"string"},{"type":"null"}]},"httpStatus":{"anyOf":[{"type":"number"},{"type":"null"}]},"providerCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"detail":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","startedAt","finishedAt","outcome","httpStatus","providerCode","detail"],"additionalProperties":false}}},"required":["id","postId","series","channelId","network","handle","revision","text","partCount","parts","partPlan","comments","gateChecks","partsNote","dueAt","state","inbox","betweenParts","deletion","attemptCount","externalId","externalUrl","errorCode","errorMessage","contentRejected","held","review","sendsAsDraft","returnsToDrafts","media","metrics","updatedAt","attempts"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"postId":{"type":"string"},"channelId":{"type":"string"},"state":{"type":"string","enum":["scheduled","claimed","publishing","processing","published","failed","unconfirmed","cancelled"]},"inbox":{"type":"boolean"},"deletion":{"anyOf":[{"type":"string","enum":["pending","deleted","failed"]},{"type":"null"}]},"dueAt":{"type":"number"},"held":{"type":"boolean"},"review":{"type":"string","enum":["none","waiting","approved","changes_requested"]},"externalUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","postId","channelId","state","inbox","deletion","dueAt","held","review","externalUrl","errorCode","errorMessage"],"additionalProperties":false}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"429":{"description":"TooManyRequests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsEncoded"}}}}},"description":"Its state, live URL once published, last error, and every attempt. Each publication finishes on its own; fetch it again to follow one. Set `view=brief` to omit attempts and unrequested timestamps.","summary":"Get a publication"}},"/v1/publications/wait":{"post":{"tags":["publications"],"operationId":"publications.wait","parameters":[],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"done":{"type":"boolean"},"publications":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"postId":{"type":"string"},"channelId":{"type":"string"},"state":{"type":"string","enum":["scheduled","claimed","publishing","processing","published","failed","unconfirmed","cancelled"]},"inbox":{"type":"boolean"},"externalUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","postId","channelId","state","inbox","externalUrl","error"],"additionalProperties":false}}},"required":["done","publications"],"additionalProperties":false},{"type":"object","properties":{"done":{"type":"boolean"},"publications":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"postId":{"type":"string"},"channelId":{"type":"string"},"state":{"type":"string","enum":["scheduled","claimed","publishing","processing","published","failed","unconfirmed","cancelled"]},"inbox":{"type":"boolean"},"externalUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","postId","channelId","state","inbox","externalUrl","error"],"additionalProperties":false}}},"required":["done","publications"],"additionalProperties":false}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidEncoded"}}}},"429":{"description":"TooManyRequests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsEncoded"}}}}},"description":"Waits for 1 to 50 workspace publications to finish, returning immediately when all are published, failed, cancelled, or need review (`unconfirmed`). Defaults to 20 seconds and accepts at most 25 seconds. Uses publication events rather than repeated reads. Set `view: \"brief\"` to return only ids, states, URLs and errors.","summary":"Wait for publications","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"type":"array","prefixItems":[{"type":"string"}],"minItems":1,"items":{"type":"string"},"maxItems":50},"timeoutMs":{"anyOf":[{"type":"integer","minimum":1,"maximum":25000},{"type":"null"}]},"view":{"anyOf":[{"type":"string","enum":["brief"],"description":"Return only ids, publication states, due times, external URLs, errors and actionable problems."},{"type":"null"}]}},"required":["ids"],"additionalProperties":false}}},"required":true}}},"/v1/publications/{id}/resolve":{"post":{"tags":["publications"],"operationId":"publications.resolve","parameters":[{"name":"id","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"postId":{"type":"string"},"series":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"state":{"type":"string","enum":["active","ended","cancelled","stopped"]},"rule":{"type":"object","properties":{"frequency":{"type":"string","enum":["daily","weekly","monthly"]},"weekdays":{"anyOf":[{"type":"array","items":{"type":"string","enum":["sun","mon","tue","wed","thu","fri","sat"]},"maxItems":7},{"type":"null"}]},"monthDay":{"anyOf":[{"type":"integer","minimum":1,"maximum":31},{"type":"null"}]},"time":{"type":"string"},"timeZone":{"type":"string"},"until":{"anyOf":[{"type":"string"},{"type":"null"}]},"count":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000},{"type":"null"}]}},"required":["frequency","time","timeZone"],"additionalProperties":false}},"required":["id","state","rule"],"additionalProperties":false},{"type":"null"}]},"channelId":{"type":"string"},"network":{"type":"string","enum":["fake","bluesky","mastodon","threads","instagram","tiktok","x","linkedin","youtube","discord","telegram","pinterest","slack"]},"handle":{"type":"string"},"revision":{"type":"number"},"text":{"type":"string"},"partCount":{"type":"number"},"parts":{"type":"array","items":{"type":"object","properties":{"index":{"type":"number"},"externalId":{"type":"string"},"externalUrl":{"type":"string"}},"required":["index","externalId","externalUrl"],"additionalProperties":false}},"partPlan":{"type":"array","items":{"type":"object","properties":{"delayMinutes":{"type":"number"},"minLikes":{"anyOf":[{"type":"number"},{"type":"null"}]},"minReplies":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["delayMinutes","minLikes","minReplies"],"additionalProperties":false}},"comments":{"type":"boolean"},"gateChecks":{"type":"number"},"partsNote":{"anyOf":[{"type":"string"},{"type":"null"}]},"dueAt":{"type":"number"},"state":{"type":"string","enum":["scheduled","claimed","publishing","processing","published","failed","unconfirmed","cancelled"]},"inbox":{"type":"boolean"},"betweenParts":{"type":"boolean"},"deletion":{"anyOf":[{"type":"string","enum":["pending","deleted","failed"]},{"type":"null"}]},"attemptCount":{"type":"number"},"externalId":{"anyOf":[{"type":"string"},{"type":"null"}]},"externalUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"contentRejected":{"type":"boolean"},"held":{"type":"boolean"},"review":{"type":"string","enum":["none","waiting","approved","changes_requested"]},"sendsAsDraft":{"type":"boolean"},"returnsToDrafts":{"type":"boolean"},"media":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["image","video"]}},"required":["id","kind"],"additionalProperties":false},{"type":"null"}]},"metrics":{"anyOf":[{"type":"object","properties":{"readAt":{"type":"number"},"nextReadAt":{"anyOf":[{"type":"number"},{"type":"null"}]},"views":{"anyOf":[{"type":"number"},{"type":"null"}]},"likes":{"anyOf":[{"type":"number"},{"type":"null"}]},"replies":{"anyOf":[{"type":"number"},{"type":"null"}]},"reposts":{"anyOf":[{"type":"number"},{"type":"null"}]},"quotes":{"anyOf":[{"type":"number"},{"type":"null"}]},"saves":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["readAt","nextReadAt","views","likes","replies","reposts","quotes","saves"],"additionalProperties":false},{"type":"null"}]},"updatedAt":{"type":"number"},"attempts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"startedAt":{"type":"number"},"finishedAt":{"anyOf":[{"type":"number"},{"type":"null"}]},"outcome":{"anyOf":[{"type":"string"},{"type":"null"}]},"httpStatus":{"anyOf":[{"type":"number"},{"type":"null"}]},"providerCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"detail":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","startedAt","finishedAt","outcome","httpStatus","providerCode","detail"],"additionalProperties":false}}},"required":["id","postId","series","channelId","network","handle","revision","text","partCount","parts","partPlan","comments","gateChecks","partsNote","dueAt","state","inbox","betweenParts","deletion","attemptCount","externalId","externalUrl","errorCode","errorMessage","contentRejected","held","review","sendsAsDraft","returnsToDrafts","media","metrics","updatedAt","attempts"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictEncoded"}}}},"429":{"description":"TooManyRequests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsEncoded"}}}}},"description":"For a publication PostJr could not confirm: send the live `url` if it went out, `retry` to publish it again, or `cancel`.","summary":"Resolve an unconfirmed publication","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"url":{"type":"string"}},"required":["url"],"additionalProperties":false},{"type":"object","properties":{"retry":{"type":"boolean","enum":[true]}},"required":["retry"],"additionalProperties":false},{"type":"object","properties":{"cancel":{"type":"boolean","enum":[true]}},"required":["cancel"],"additionalProperties":false}]}}},"required":true}}},"/v1/publications/{id}/delete":{"post":{"tags":["publications"],"operationId":"publications.delete","parameters":[{"name":"id","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"postId":{"type":"string"},"series":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"state":{"type":"string","enum":["active","ended","cancelled","stopped"]},"rule":{"type":"object","properties":{"frequency":{"type":"string","enum":["daily","weekly","monthly"]},"weekdays":{"anyOf":[{"type":"array","items":{"type":"string","enum":["sun","mon","tue","wed","thu","fri","sat"]},"maxItems":7},{"type":"null"}]},"monthDay":{"anyOf":[{"type":"integer","minimum":1,"maximum":31},{"type":"null"}]},"time":{"type":"string"},"timeZone":{"type":"string"},"until":{"anyOf":[{"type":"string"},{"type":"null"}]},"count":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000},{"type":"null"}]}},"required":["frequency","time","timeZone"],"additionalProperties":false}},"required":["id","state","rule"],"additionalProperties":false},{"type":"null"}]},"channelId":{"type":"string"},"network":{"type":"string","enum":["fake","bluesky","mastodon","threads","instagram","tiktok","x","linkedin","youtube","discord","telegram","pinterest","slack"]},"handle":{"type":"string"},"revision":{"type":"number"},"text":{"type":"string"},"partCount":{"type":"number"},"parts":{"type":"array","items":{"type":"object","properties":{"index":{"type":"number"},"externalId":{"type":"string"},"externalUrl":{"type":"string"}},"required":["index","externalId","externalUrl"],"additionalProperties":false}},"partPlan":{"type":"array","items":{"type":"object","properties":{"delayMinutes":{"type":"number"},"minLikes":{"anyOf":[{"type":"number"},{"type":"null"}]},"minReplies":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["delayMinutes","minLikes","minReplies"],"additionalProperties":false}},"comments":{"type":"boolean"},"gateChecks":{"type":"number"},"partsNote":{"anyOf":[{"type":"string"},{"type":"null"}]},"dueAt":{"type":"number"},"state":{"type":"string","enum":["scheduled","claimed","publishing","processing","published","failed","unconfirmed","cancelled"]},"inbox":{"type":"boolean"},"betweenParts":{"type":"boolean"},"deletion":{"anyOf":[{"type":"string","enum":["pending","deleted","failed"]},{"type":"null"}]},"attemptCount":{"type":"number"},"externalId":{"anyOf":[{"type":"string"},{"type":"null"}]},"externalUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"contentRejected":{"type":"boolean"},"held":{"type":"boolean"},"review":{"type":"string","enum":["none","waiting","approved","changes_requested"]},"sendsAsDraft":{"type":"boolean"},"returnsToDrafts":{"type":"boolean"},"media":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["image","video"]}},"required":["id","kind"],"additionalProperties":false},{"type":"null"}]},"metrics":{"anyOf":[{"type":"object","properties":{"readAt":{"type":"number"},"nextReadAt":{"anyOf":[{"type":"number"},{"type":"null"}]},"views":{"anyOf":[{"type":"number"},{"type":"null"}]},"likes":{"anyOf":[{"type":"number"},{"type":"null"}]},"replies":{"anyOf":[{"type":"number"},{"type":"null"}]},"reposts":{"anyOf":[{"type":"number"},{"type":"null"}]},"quotes":{"anyOf":[{"type":"number"},{"type":"null"}]},"saves":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["readAt","nextReadAt","views","likes","replies","reposts","quotes","saves"],"additionalProperties":false},{"type":"null"}]},"updatedAt":{"type":"number"},"attempts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"startedAt":{"type":"number"},"finishedAt":{"anyOf":[{"type":"number"},{"type":"null"}]},"outcome":{"anyOf":[{"type":"string"},{"type":"null"}]},"httpStatus":{"anyOf":[{"type":"number"},{"type":"null"}]},"providerCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"detail":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","startedAt","finishedAt","outcome","httpStatus","providerCode","detail"],"additionalProperties":false}}},"required":["id","postId","series","channelId","network","handle","revision","text","partCount","parts","partPlan","comments","gateChecks","partsNote","dueAt","state","inbox","betweenParts","deletion","attemptCount","externalId","externalUrl","errorCode","errorMessage","contentRejected","held","review","sendsAsDraft","returnsToDrafts","media","metrics","updatedAt","attempts"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictEncoded"}}}},"429":{"description":"TooManyRequests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsEncoded"}}}}},"description":"Runs in the background: `deletion` goes from pending to deleted, or to failed with the reason in errorMessage. A failed deletion can be requested again. 409 on a network whose API cannot delete posts (TikTok): use mark-deleted.","summary":"Delete a published copy from its network"}},"/v1/publications/{id}/metrics/refresh":{"post":{"tags":["publications"],"operationId":"publications.refreshMetrics","parameters":[{"name":"id","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"readAt":{"type":"number"},"nextReadAt":{"anyOf":[{"type":"number"},{"type":"null"}]},"views":{"anyOf":[{"type":"number"},{"type":"null"}]},"likes":{"anyOf":[{"type":"number"},{"type":"null"}]},"replies":{"anyOf":[{"type":"number"},{"type":"null"}]},"reposts":{"anyOf":[{"type":"number"},{"type":"null"}]},"quotes":{"anyOf":[{"type":"number"},{"type":"null"}]},"saves":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["readAt","nextReadAt","views","likes","replies","reposts","quotes","saves"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidEncoded"}}}},"429":{"description":"TooManyRequests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsEncoded"}}}},"502":{"description":"BadGateway","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadGatewayEncoded"}}}}},"description":"Reads this published copy from its network now, stores what came back and returns it: views on Threads, TikTok, X and YouTube Shorts; likes on Bluesky, Mastodon, Threads, Instagram, TikTok, X and YouTube Shorts; replies on Bluesky, Mastodon, Threads, Instagram, TikTok, X and YouTube Shorts; reposts on Bluesky, Mastodon, Threads, TikTok and X; quotes on Bluesky, Threads and X; saves on X. A number a network does not report is null. Each copy can be read once every 60 minutes on Starter, 15 on Pro and 5 on Agency, a scheduled read counted; sooner answers 429 with `retryAfter` seconds. It does not change the schedule of later reads. 422 for a copy that is not published, one on a network PostJr does not read (Discord, Slack, Telegram, LinkedIn, Pinterest, and TikTok unless this instance sets TIKTOK_READS), a TikTok account that has not given PostJr the permissions to read (it must reconnect), a TikTok copy with no public video (a draft in the inbox, or a private post), an X copy while the workspace is in its free trial (X numbers start when the plan starts), or one the network no longer returns. 502 when the network does not answer.","summary":"Read a post's numbers now"}},"/v1/publications/{id}/mark-deleted":{"post":{"tags":["publications"],"operationId":"publications.markDeleted","parameters":[{"name":"id","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"postId":{"type":"string"},"series":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"state":{"type":"string","enum":["active","ended","cancelled","stopped"]},"rule":{"type":"object","properties":{"frequency":{"type":"string","enum":["daily","weekly","monthly"]},"weekdays":{"anyOf":[{"type":"array","items":{"type":"string","enum":["sun","mon","tue","wed","thu","fri","sat"]},"maxItems":7},{"type":"null"}]},"monthDay":{"anyOf":[{"type":"integer","minimum":1,"maximum":31},{"type":"null"}]},"time":{"type":"string"},"timeZone":{"type":"string"},"until":{"anyOf":[{"type":"string"},{"type":"null"}]},"count":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000},{"type":"null"}]}},"required":["frequency","time","timeZone"],"additionalProperties":false}},"required":["id","state","rule"],"additionalProperties":false},{"type":"null"}]},"channelId":{"type":"string"},"network":{"type":"string","enum":["fake","bluesky","mastodon","threads","instagram","tiktok","x","linkedin","youtube","discord","telegram","pinterest","slack"]},"handle":{"type":"string"},"revision":{"type":"number"},"text":{"type":"string"},"partCount":{"type":"number"},"parts":{"type":"array","items":{"type":"object","properties":{"index":{"type":"number"},"externalId":{"type":"string"},"externalUrl":{"type":"string"}},"required":["index","externalId","externalUrl"],"additionalProperties":false}},"partPlan":{"type":"array","items":{"type":"object","properties":{"delayMinutes":{"type":"number"},"minLikes":{"anyOf":[{"type":"number"},{"type":"null"}]},"minReplies":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["delayMinutes","minLikes","minReplies"],"additionalProperties":false}},"comments":{"type":"boolean"},"gateChecks":{"type":"number"},"partsNote":{"anyOf":[{"type":"string"},{"type":"null"}]},"dueAt":{"type":"number"},"state":{"type":"string","enum":["scheduled","claimed","publishing","processing","published","failed","unconfirmed","cancelled"]},"inbox":{"type":"boolean"},"betweenParts":{"type":"boolean"},"deletion":{"anyOf":[{"type":"string","enum":["pending","deleted","failed"]},{"type":"null"}]},"attemptCount":{"type":"number"},"externalId":{"anyOf":[{"type":"string"},{"type":"null"}]},"externalUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"contentRejected":{"type":"boolean"},"held":{"type":"boolean"},"review":{"type":"string","enum":["none","waiting","approved","changes_requested"]},"sendsAsDraft":{"type":"boolean"},"returnsToDrafts":{"type":"boolean"},"media":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["image","video"]}},"required":["id","kind"],"additionalProperties":false},{"type":"null"}]},"metrics":{"anyOf":[{"type":"object","properties":{"readAt":{"type":"number"},"nextReadAt":{"anyOf":[{"type":"number"},{"type":"null"}]},"views":{"anyOf":[{"type":"number"},{"type":"null"}]},"likes":{"anyOf":[{"type":"number"},{"type":"null"}]},"replies":{"anyOf":[{"type":"number"},{"type":"null"}]},"reposts":{"anyOf":[{"type":"number"},{"type":"null"}]},"quotes":{"anyOf":[{"type":"number"},{"type":"null"}]},"saves":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["readAt","nextReadAt","views","likes","replies","reposts","quotes","saves"],"additionalProperties":false},{"type":"null"}]},"updatedAt":{"type":"number"},"attempts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"startedAt":{"type":"number"},"finishedAt":{"anyOf":[{"type":"number"},{"type":"null"}]},"outcome":{"anyOf":[{"type":"string"},{"type":"null"}]},"httpStatus":{"anyOf":[{"type":"number"},{"type":"null"}]},"providerCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"detail":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","startedAt","finishedAt","outcome","httpStatus","providerCode","detail"],"additionalProperties":false}}},"required":["id","postId","series","channelId","network","handle","revision","text","partCount","parts","partPlan","comments","gateChecks","partsNote","dueAt","state","inbox","betweenParts","deletion","attemptCount","externalId","externalUrl","errorCode","errorMessage","contentRejected","held","review","sendsAsDraft","returnsToDrafts","media","metrics","updatedAt","attempts"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictEncoded"}}}},"429":{"description":"TooManyRequests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsEncoded"}}}}},"description":"Records that you deleted a published copy yourself, on a network whose API cannot delete posts (TikTok). Its PostJr post can then be deleted. 409 for any other copy.","summary":"Mark a copy deleted"}},"/v1/publications/delete":{"post":{"tags":["publications"],"operationId":"publications.deleteMany","parameters":[],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"publicationId":{"type":"string"},"status":{"type":"string","enum":["pending","skipped"]},"message":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["publicationId","status"],"additionalProperties":false}}},"required":["results"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidEncoded"}}}},"429":{"description":"TooManyRequests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsEncoded"}}}}},"description":"Keeps the PostJr posts: deletes publications by id, and every live copy of the posts named (up to 100 in all). Runs in the background; follow each with GET /v1/publications/:id until `deletion` is deleted or failed. TikTok copies are skipped: TikTok cannot delete through its API.","summary":"Delete from the networks","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"publicationIds":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"postIds":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]}},"additionalProperties":false}}},"required":true}}},"/v1/analytics":{"get":{"tags":["analytics"],"operationId":"analytics.get","parameters":[{"name":"from","in":"query","schema":{"type":"string"},"required":false},{"name":"to","in":"query","schema":{"type":"string"},"required":false},{"name":"channelIds","in":"query","schema":{"type":"string"},"required":false}],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"from":{"type":"number"},"to":{"type":"number"},"accounts":{"type":"array","items":{"type":"object","properties":{"channelId":{"type":"string"},"network":{"type":"string","enum":["fake","bluesky","mastodon","threads","instagram","tiktok","x","linkedin","youtube","discord","telegram","pinterest","slack"]},"handle":{"type":"string"},"posts":{"type":"number"},"read":{"type":"number"},"views":{"anyOf":[{"type":"number"},{"type":"null"}]},"likes":{"anyOf":[{"type":"number"},{"type":"null"}]},"replies":{"anyOf":[{"type":"number"},{"type":"null"}]},"reposts":{"anyOf":[{"type":"number"},{"type":"null"}]},"quotes":{"anyOf":[{"type":"number"},{"type":"null"}]},"saves":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["channelId","network","handle","posts","read","views","likes","replies","reposts","quotes","saves"],"additionalProperties":false}},"topByLikes":{"type":"array","items":{"type":"object","properties":{"publicationId":{"type":"string"},"postId":{"type":"string"},"channelId":{"type":"string"},"network":{"type":"string","enum":["fake","bluesky","mastodon","threads","instagram","tiktok","x","linkedin","youtube","discord","telegram","pinterest","slack"]},"handle":{"type":"string"},"text":{"type":"string"},"externalUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"publishedAt":{"type":"number"},"readAt":{"type":"number"},"nextReadAt":{"anyOf":[{"type":"number"},{"type":"null"}]},"views":{"anyOf":[{"type":"number"},{"type":"null"}]},"likes":{"anyOf":[{"type":"number"},{"type":"null"}]},"replies":{"anyOf":[{"type":"number"},{"type":"null"}]},"reposts":{"anyOf":[{"type":"number"},{"type":"null"}]},"quotes":{"anyOf":[{"type":"number"},{"type":"null"}]},"saves":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["publicationId","postId","channelId","network","handle","text","externalUrl","publishedAt","readAt","nextReadAt","views","likes","replies","reposts","quotes","saves"],"additionalProperties":false}},"topByViews":{"type":"array","items":{"type":"object","properties":{"publicationId":{"type":"string"},"postId":{"type":"string"},"channelId":{"type":"string"},"network":{"type":"string","enum":["fake","bluesky","mastodon","threads","instagram","tiktok","x","linkedin","youtube","discord","telegram","pinterest","slack"]},"handle":{"type":"string"},"text":{"type":"string"},"externalUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"publishedAt":{"type":"number"},"readAt":{"type":"number"},"nextReadAt":{"anyOf":[{"type":"number"},{"type":"null"}]},"views":{"anyOf":[{"type":"number"},{"type":"null"}]},"likes":{"anyOf":[{"type":"number"},{"type":"null"}]},"replies":{"anyOf":[{"type":"number"},{"type":"null"}]},"reposts":{"anyOf":[{"type":"number"},{"type":"null"}]},"quotes":{"anyOf":[{"type":"number"},{"type":"null"}]},"saves":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["publicationId","postId","channelId","network","handle","text","externalUrl","publishedAt","readAt","nextReadAt","views","likes","replies","reposts","quotes","saves"],"additionalProperties":false}},"followers":{"type":"array","items":{"type":"object","properties":{"channelId":{"type":"string"},"points":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string"},"followers":{"type":"number"}},"required":["day","followers"],"additionalProperties":false}}},"required":["channelId","points"],"additionalProperties":false}}},"required":["from","to","accounts","topByLikes","topByViews","followers"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidEncoded"}}}},"429":{"description":"TooManyRequests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsEncoded"}}}}},"description":"Reads only stored numbers, never a network. `from` (inclusive) and `to` (exclusive) are UTC milliseconds and default to the last 30 days; `channelIds` is a comma-separated list and defaults to every connected account. `accounts` sums the latest numbers of each account's posts published in the range (`posts` counts them, `read` those read at least once; a sum is null when no post reported that number). `topByLikes` and `topByViews` list up to 10 posts each. `followers` has one point per UTC day for each account, from its daily check. Posts are read on a fixed schedule after they go out (1 hour, 6 hours, 1, 3, 7 and 30 days; X at 1, 7 and 30 days; Instagram at 2, 7 and 30 days), so `readAt` tells how old a number is. Which numbers exist: views on Threads, TikTok, X and YouTube Shorts; likes on Bluesky, Mastodon, Threads, Instagram, TikTok, X and YouTube Shorts; replies on Bluesky, Mastodon, Threads, Instagram, TikTok, X and YouTube Shorts; reposts on Bluesky, Mastodon, Threads, TikTok and X; quotes on Bluesky, Threads and X; saves on X.","summary":"Get analytics"}},"/v1/series":{"get":{"tags":["series"],"operationId":"series.list","parameters":[],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"state":{"type":"string","enum":["active","ended","cancelled","stopped"]},"rule":{"type":"object","properties":{"frequency":{"type":"string","enum":["daily","weekly","monthly"]},"weekdays":{"anyOf":[{"type":"array","items":{"type":"string","enum":["sun","mon","tue","wed","thu","fri","sat"]},"maxItems":7},{"type":"null"}]},"monthDay":{"anyOf":[{"type":"integer","minimum":1,"maximum":31},{"type":"null"}]},"time":{"type":"string"},"timeZone":{"type":"string"},"until":{"anyOf":[{"type":"string"},{"type":"null"}]},"count":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000},{"type":"null"}]}},"required":["frequency","time","timeZone"],"additionalProperties":false},"postId":{"type":"string"},"createdCount":{"type":"number"},"nextAt":{"anyOf":[{"type":"number"},{"type":"null"}]},"channelIds":{"type":"array","items":{"type":"string"}},"stopReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"number"}},"required":["id","state","rule","postId","createdCount","nextAt","channelIds","stopReason","createdAt"],"additionalProperties":false}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"429":{"description":"TooManyRequests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsEncoded"}}}}},"description":"Active series first, then the others, newest first (at most 200). A series repeats a post by a rule in an IANA time zone: its next occurrence is always scheduled as an ordinary post (`postId`), and the one after it is created when that one departs. Create one by sending `repeat` with a schedule. Edit the next departure through `postId`; published occurrences keep their content.","summary":"List repeating posts"}},"/v1/series/{id}/cancel":{"post":{"tags":["series"],"operationId":"series.cancel","parameters":[{"name":"id","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"state":{"type":"string","enum":["active","ended","cancelled","stopped"]},"rule":{"type":"object","properties":{"frequency":{"type":"string","enum":["daily","weekly","monthly"]},"weekdays":{"anyOf":[{"type":"array","items":{"type":"string","enum":["sun","mon","tue","wed","thu","fri","sat"]},"maxItems":7},{"type":"null"}]},"monthDay":{"anyOf":[{"type":"integer","minimum":1,"maximum":31},{"type":"null"}]},"time":{"type":"string"},"timeZone":{"type":"string"},"until":{"anyOf":[{"type":"string"},{"type":"null"}]},"count":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000},{"type":"null"}]}},"required":["frequency","time","timeZone"],"additionalProperties":false},"postId":{"type":"string"},"createdCount":{"type":"number"},"nextAt":{"anyOf":[{"type":"number"},{"type":"null"}]},"channelIds":{"type":"array","items":{"type":"string"}},"stopReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"number"}},"required":["id","state","rule","postId","createdCount","nextAt","channelIds","stopReason","createdAt"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"429":{"description":"TooManyRequests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsEncoded"}}}}},"description":"Ends the series and cancels its scheduled occurrence. Published occurrences stay. Safe to repeat. To skip only the next departure, use POST /v1/posts/:id/cancel: the series continues with the following one.","summary":"Cancel a whole series"}}},"components":{"schemas":{"TooManyRequestsEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["TooManyRequests"]},"message":{"type":"string"},"retryAfter":{"type":"number"}},"required":["_tag","message","retryAfter"],"additionalProperties":false},"UnauthorizedEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["Unauthorized"]},"message":{"type":"string"}},"required":["_tag","message"],"additionalProperties":false},"NotFoundEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["NotFound"]},"message":{"type":"string"}},"required":["_tag","message"],"additionalProperties":false},"InvalidEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["Invalid"]},"message":{"type":"string"},"problems":{"anyOf":[{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},{"type":"null"}]}},"required":["_tag","message"],"additionalProperties":false},"ConflictEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["Conflict"]},"message":{"type":"string"}},"required":["_tag","message"],"additionalProperties":false},"BadGatewayEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["BadGateway"]},"message":{"type":"string"}},"required":["_tag","message"],"additionalProperties":false},"BadRequestEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["BadRequest"]},"message":{"type":"string"}},"required":["_tag","message"],"additionalProperties":false},"PlanRequiredEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["PlanRequired"]},"message":{"type":"string"},"reason":{"type":"string","enum":["no_plan","past_due","canceled","account_limit","post_limit","trial_limit"]}},"required":["_tag","message","reason"],"additionalProperties":false},"TooLargeEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["TooLarge"]},"message":{"type":"string"}},"required":["_tag","message"],"additionalProperties":false},"ConnectFailedEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["ConnectFailed"]},"message":{"type":"string"}},"required":["_tag","message"],"additionalProperties":false},"ForbiddenEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["Forbidden"]},"message":{"type":"string"}},"required":["_tag","message"],"additionalProperties":false}},"securitySchemes":{}},"security":[],"tags":[{"name":"system"},{"name":"account"},{"name":"support"},{"name":"billing"},{"name":"channels"},{"name":"groups"},{"name":"feeds"},{"name":"webhooks"},{"name":"media"},{"name":"posts"},{"name":"reviews"},{"name":"reviewPublic"},{"name":"publications"},{"name":"analytics"},{"name":"series"}]}
