{"openapi":"3.1.0","info":{"title":"heyeveryone API","version":"1","description":"Every endpoint is a heyeveryone service, the same ones the MCP tools call. POST a JSON body with the input. Authenticate with a personal access token (Settings > Agents) or an OAuth access token issued for https://heyeveryone.ai/api/v1. Agents draft and request; a person confirms publishing unless the owner enabled auto-publish, and required sign-off blocks publishing until a reviewer approves. Agent access is included in every plan; API calls never cost credits (only heyeveryone's own AI does). OAuth follows the MCP authorization spec 2026-07-28."},"servers":[{"url":"https://heyeveryone.ai/api/v1"}],"security":[{"bearer":[]},{"oauth":["agent"]}],"paths":{"/adapt_piece":{"post":{"operationId":"adapt_piece","summary":"Adapt content to its channels","description":"Turn a content item's original draft (with its sources and the workspace's voice) into channel-native drafts within each channel's limits. Each target is `{ channelAccountId, format? }`; limits come from the channel's capabilities (`limits` overrides them); format defaults to the existing post's, else the platform's text post. A target whose post is a draft or ready gets a new version, one without a post a new draft; one already awaiting confirmation, scheduled, publishing, published or with the post kit is listed in `skipped` (cancel or reschedule it first). `mode: \"propose\"` writes nothing: each target gets a suggestion (`proposals`) a person accepts or rejects. Never publishes. Charged per target written or proposed (2 credits); skipped targets are free; a rejected suggestion isn't refunded.\n\nUses heyeveryone AI and costs credits: 2 credits per target channel. Tell the person before calling it.","tags":["workspace"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional; the same as the body's `idempotencyKey`. The same key from the same agent in the same workspace within 24 hours returns the first result instead of doing it again.","schema":{"type":"string","minLength":1,"maxLength":200}}],"x-heyeveryone-kind":"mutation","x-heyeveryone-uses-credits":true,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"pieceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"targets":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"object","properties":{"channelAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"format":{"type":"string","pattern":"^[a-z][a-z0-9_]*$"},"platform":{"type":"string","enum":["x","linkedin","threads","bluesky","instagram","facebook","tiktok","youtube","sandbox"]},"limits":{"type":"object","properties":{"maxCharsPerSegment":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"maxSegments":{"default":1,"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"maxMediaPerSegment":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"supportsThread":{"default":false,"type":"boolean"},"requiredFields":{"default":[],"type":"array","items":{"type":"string"}}},"required":["maxCharsPerSegment"]}},"required":["channelAccountId"]}},"instructions":{"type":"string","maxLength":2000},"mode":{"default":"write","type":"string","enum":["write","propose"]},"idempotencyKey":{"type":"string","minLength":1,"maxLength":200}},"required":["workspaceId","pieceId","targets"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"posts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"pieceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"channelAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"format":{"type":"string","pattern":"^[a-z][a-z0-9_]*$"},"segments":{"minItems":1,"type":"array","items":{"type":"object","properties":{"text":{"type":"string"},"media":{"type":"array","items":{"type":"object","properties":{"mediaAssetId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"altText":{"type":"string","maxLength":2000}},"required":["mediaAssetId"],"additionalProperties":false}}},"required":["text","media"],"additionalProperties":false}},"settings":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"state":{"type":"string","enum":["draft","ready","awaiting_confirmation","scheduled","publishing","published","failed_retrying","needs_attention","failed","manual"]},"scheduledAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"scheduleSource":{"anyOf":[{"type":"string","enum":["manual","queue"]},{"type":"null"}]},"isSkipped":{"type":"boolean"},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"followsOriginal":{"type":"boolean"},"followIssue":{"type":["string","null"]},"requestedByAgentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"confirmedByAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"confirmedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"lastError":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"fix":{"type":"string"}},"required":["code","message"],"additionalProperties":false},{"type":"null"}]},"publishedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"permalink":{"type":["string","null"]},"createdByAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdByAgentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","workspaceId","pieceId","channelAccountId","format","segments","settings","state","scheduledAt","scheduleSource","isSkipped","version","followsOriginal","followIssue","requestedByAgentClientId","confirmedByAccountId","confirmedAt","lastError","publishedAt","permalink","createdByAccountId","createdByAgentClientId","createdAt","updatedAt"],"additionalProperties":false}},"proposals":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"pieceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"target":{"type":"string","enum":["master","post"]},"postId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"channelAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"format":{"anyOf":[{"type":"string","pattern":"^[a-z][a-z0-9_]*$"},{"type":"null"}]},"baseVersion":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"content":{"type":"object","properties":{"text":{"type":"string"},"segments":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string"},"media":{"type":"array","items":{"type":"object","properties":{"mediaAssetId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"altText":{"type":"string","maxLength":2000}},"required":["mediaAssetId"],"additionalProperties":false}}},"required":["text","media"],"additionalProperties":false}}},"additionalProperties":false},"origin":{"type":"string","enum":["adapt_piece","rewrite_text","agent","member"]},"note":{"type":["string","null"]},"creditsSpent":{"type":"integer","minimum":0,"maximum":9007199254740991},"status":{"type":"string","enum":["pending","accepted","rejected"]},"stale":{"type":"boolean"},"staleReason":{"type":["string","null"]},"currentVersion":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"author":{"type":"object","properties":{"kind":{"type":"string","enum":["member","guest","agent","system"]},"accountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"agentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"guestId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"name":{"type":"string"}},"required":["kind","accountId","agentClientId","guestId","name"],"additionalProperties":false},"decidedBy":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["member","guest","agent","system"]},"accountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"agentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"guestId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"name":{"type":"string"}},"required":["kind","accountId","agentClientId","guestId","name"],"additionalProperties":false},{"type":"null"}]},"decidedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"decisionNote":{"type":["string","null"]},"resultVersion":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","workspaceId","pieceId","target","postId","channelAccountId","format","baseVersion","content","origin","note","creditsSpent","status","stale","staleReason","currentVersion","author","decidedBy","decidedAt","decisionNote","resultVersion","createdAt"],"additionalProperties":false}},"skipped":{"type":"array","items":{"type":"object","properties":{"channelAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"postId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"reason":{"type":"string"}},"required":["channelAccountId","postId","reason"],"additionalProperties":false}},"creditsSpent":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"url":{"type":"string","description":"The content page in heyeveryone. Give it to the person so they can open the draft."}},"required":["posts","proposals","skipped","creditsSpent","url"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Service-specific errors: piece_not_found, ai_generation_failed, insufficient_credits, plan_limit_reached, idempotency_conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/add_comment":{"post":{"operationId":"add_comment","summary":"Comment on content","description":"Leave a comment on content: on the whole content item (`target: piece`), the original draft (`master`) or one post (`post` with `postId`). To comment on specific words, pass `anchor`: either `{ quote }` (the exact text; its first occurrence is used) or `{ start, end }` character offsets, plus `segmentIndex` for a thread segment (default 0). The quoted text and content version are stored, so when the text later changes the comment shows as outdated instead of disappearing. Reply to a comment with `parentCommentId` (a reply takes its parent's target). Resolve comments with resolve_comment.","tags":["workspace"],"x-heyeveryone-kind":"mutation","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"pieceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"target":{"default":"piece","type":"string","enum":["piece","master","post"]},"postId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"segmentIndex":{"type":"integer","minimum":0,"maximum":9007199254740991},"anchor":{"anyOf":[{"type":"object","properties":{"start":{"type":"integer","minimum":0,"maximum":9007199254740991},"end":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["start","end"]},{"type":"object","properties":{"quote":{"type":"string","minLength":1,"maxLength":5000}},"required":["quote"]}]},"parentCommentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"body":{"type":"string","minLength":1,"maxLength":10000}},"required":["workspaceId","pieceId","body"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"comment":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"pieceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"target":{"type":"string","enum":["piece","master","post"]},"postId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"segmentIndex":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"rangeStart":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"rangeEnd":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"quotedText":{"type":["string","null"]},"anchorVersion":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"parentCommentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"body":{"type":"string"},"authorKind":{"type":"string","enum":["member","guest","agent"]},"authorAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"authorGuestId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"authorAgentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"resolvedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"resolvedByAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"author":{"type":"object","properties":{"kind":{"type":"string","enum":["member","guest","agent","system"]},"accountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"agentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"guestId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"name":{"type":"string"}},"required":["kind","accountId","agentClientId","guestId","name"],"additionalProperties":false},"anchorStatus":{"type":"string","enum":["whole","current","moved","outdated"]},"outdated":{"type":"boolean"},"currentRange":{"anyOf":[{"type":"object","properties":{"start":{"type":"integer","minimum":0,"maximum":9007199254740991},"end":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["start","end"],"additionalProperties":false},{"type":"null"}]}},"required":["id","workspaceId","pieceId","target","postId","segmentIndex","rangeStart","rangeEnd","quotedText","anchorVersion","parentCommentId","body","authorKind","authorAccountId","authorGuestId","authorAgentClientId","resolvedAt","resolvedByAccountId","createdAt","updatedAt","author","anchorStatus","outdated","currentRange"],"additionalProperties":false}},"required":["comment"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Service-specific errors: anchor_not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/add_source":{"post":{"operationId":"add_source","summary":"Add a source to content","description":"Attach what a content item is made from. Kinds: `url` (a blog post or page: heyeveryone fetches it in the background and stores its readable text, title and description; check `fetchStatus` with get_piece: pending -> fetching -> fetched or failed with a reason), `note` (free text), `media` (a media asset id from the library, for example a finished video), `transcript` (text of a talk or video you already have). Sources are what you (or Adapt) write the original draft and posts from. Only public http(s) pages can be fetched.","tags":["workspace"],"x-heyeveryone-kind":"mutation","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"pieceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"kind":{"type":"string","enum":["url","media","note","transcript"]},"title":{"type":"string","minLength":1,"maxLength":300},"url":{"type":"string","minLength":1,"maxLength":2048},"note":{"type":"string","minLength":1,"maxLength":50000},"mediaAssetId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"transcript":{"type":"string","minLength":1,"maxLength":500000}},"required":["workspaceId","pieceId","kind"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"source":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"pieceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"kind":{"type":"string","enum":["url","media","note","transcript"]},"title":{"type":["string","null"]},"url":{"type":["string","null"]},"mediaAssetId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"note":{"type":["string","null"]},"fetchedText":{"type":["string","null"]},"fetchStatus":{"type":"string","enum":["not_applicable","pending","fetching","fetched","failed"]},"fetchError":{"type":["string","null"]},"fetchedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"createdByAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdByAgentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"description":{"type":["string","null"]}},"required":["id","workspaceId","pieceId","kind","title","url","mediaAssetId","note","fetchedText","fetchStatus","fetchError","fetchedAt","createdByAccountId","createdByAgentClientId","createdAt","updatedAt","description"],"additionalProperties":false}},"required":["source"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Service-specific errors: invalid_url","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/add_to_queue":{"post":{"operationId":"add_to_queue","summary":"Add posts to the queue","description":"Put posts into the next free queue slot of their channel account (see list_queue_slots; slots are weekly local times in the workspace's time zone). Several posts on the same channel take consecutive free slots, in the order given. As with request_schedule, an agent without auto-publish only requests: the posts wait in `awaiting_confirmation` for a human. Each post gets its own result; one failing (`no_queue_slots`, `queue_full`, `invalid_post`, `signoff_required`...) doesn't stop the others. Pass `expected` with the version you last saw for any post whose content you showed first: a post that changed since is refused with `version_conflict` instead of being queued unseen. Optional per post.\n\nA human confirms the result in heyeveryone's Needs you tray unless the account owner gave this agent auto-publish permission for the workspace (see whoami).","tags":["workspace"],"x-heyeveryone-kind":"mutation","x-heyeveryone-requires-confirmation":true,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"postIds":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},"expected":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"postId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["postId","version"]}}},"required":["workspaceId","postIds"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"postId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"ok":{"type":"boolean"},"post":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"pieceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"channelAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"format":{"type":"string","pattern":"^[a-z][a-z0-9_]*$"},"segments":{"minItems":1,"type":"array","items":{"type":"object","properties":{"text":{"type":"string"},"media":{"type":"array","items":{"type":"object","properties":{"mediaAssetId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"altText":{"type":"string","maxLength":2000}},"required":["mediaAssetId"],"additionalProperties":false}}},"required":["text","media"],"additionalProperties":false}},"settings":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"state":{"type":"string","enum":["draft","ready","awaiting_confirmation","scheduled","publishing","published","failed_retrying","needs_attention","failed","manual"]},"scheduledAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"scheduleSource":{"anyOf":[{"type":"string","enum":["manual","queue"]},{"type":"null"}]},"isSkipped":{"type":"boolean"},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"followsOriginal":{"type":"boolean"},"followIssue":{"type":["string","null"]},"requestedByAgentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"confirmedByAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"confirmedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"lastError":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"fix":{"type":"string"}},"required":["code","message"],"additionalProperties":false},{"type":"null"}]},"publishedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"permalink":{"type":["string","null"]},"createdByAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdByAgentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","workspaceId","pieceId","channelAccountId","format","segments","settings","state","scheduledAt","scheduleSource","isSkipped","version","followsOriginal","followIssue","requestedByAgentClientId","confirmedByAccountId","confirmedAt","lastError","publishedAt","permalink","createdByAccountId","createdByAgentClientId","createdAt","updatedAt"],"additionalProperties":false},"needsConfirmation":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"}},"required":["postId","ok"],"additionalProperties":false}},"needsYouUrl":{"type":["string","null"]}},"required":["results","needsYouUrl"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Service-specific errors: version_conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/archive_piece":{"post":{"operationId":"archive_piece","summary":"Archive content","description":"Archive content (hide it from the board and searches) or restore it with `archived: false`. Nothing is deleted. A content item with posts awaiting confirmation, scheduled or publishing can't be archived: cancel those schedules first (cancel_schedule), so nothing goes out from a hidden card.","tags":["workspace"],"x-heyeveryone-kind":"mutation","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"pieceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"archived":{"default":true,"type":"boolean"}},"required":["workspaceId","pieceId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"piece":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"title":{"type":"string"},"status":{"type":"string","enum":["idea","drafting","in_review","scheduled","published"]},"campaignLabels":{"type":"array","items":{"type":"string"}},"ownerAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"boardPosition":{"type":"string"},"archivedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"createdByAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdByAgentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"signoffRequired":{"type":"boolean"},"plannedFor":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"plannedTime":{"anyOf":[{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},{"type":"null"}]}},"required":["id","workspaceId","title","status","campaignLabels","ownerAccountId","boardPosition","archivedAt","createdByAccountId","createdByAgentClientId","createdAt","updatedAt","signoffRequired"],"additionalProperties":false}},"required":["piece"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Service-specific errors: has_scheduled_posts","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/build_voice_profile":{"post":{"operationId":"build_voice_profile","summary":"Build the voice profile","description":"Learn how this brand writes from past published posts and/or writing samples you provide, and save it as the workspace's voice profile: a plain-language description plus structured traits every other AI action reads. Costs 3 credits.\n\nUses heyeveryone AI and costs 3 credits (3 credits per rebuild). Tell the person before calling it.","tags":["workspace"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional; the same as the body's `idempotencyKey`. The same key from the same agent in the same workspace within 24 hours returns the first result instead of doing it again.","schema":{"type":"string","minLength":1,"maxLength":200}}],"x-heyeveryone-kind":"mutation","x-heyeveryone-uses-credits":true,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"samples":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"text":{"type":"string"},"source":{"type":"string"}},"required":["text"]}},"useRecentPosts":{"default":true,"type":"boolean"},"idempotencyKey":{"type":"string","minLength":1,"maxLength":200}},"required":["workspaceId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"voiceProfile":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"description":{"type":"string"},"traits":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"samples":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string"},"source":{"type":"string"}},"required":["text"],"additionalProperties":false}},"updatedByAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"updatedByAgentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["workspaceId","description","traits","samples","updatedByAccountId","updatedByAgentClientId","createdAt","updatedAt"],"additionalProperties":false}},"required":["voiceProfile"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Service-specific errors: insufficient_samples, ai_generation_failed, insufficient_credits, plan_limit_reached, idempotency_conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/cancel_schedule":{"post":{"operationId":"cancel_schedule","summary":"Cancel a post's schedule","description":"Take a post off the schedule: an awaiting, scheduled or failed post goes back to ready without a time, and won't publish. Its content is kept. Posts that are already publishing or published can't be cancelled.","tags":["workspace"],"x-heyeveryone-kind":"mutation","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"postId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},"required":["workspaceId","postId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"post":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"pieceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"channelAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"format":{"type":"string","pattern":"^[a-z][a-z0-9_]*$"},"segments":{"minItems":1,"type":"array","items":{"type":"object","properties":{"text":{"type":"string"},"media":{"type":"array","items":{"type":"object","properties":{"mediaAssetId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"altText":{"type":"string","maxLength":2000}},"required":["mediaAssetId"],"additionalProperties":false}}},"required":["text","media"],"additionalProperties":false}},"settings":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"state":{"type":"string","enum":["draft","ready","awaiting_confirmation","scheduled","publishing","published","failed_retrying","needs_attention","failed","manual"]},"scheduledAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"scheduleSource":{"anyOf":[{"type":"string","enum":["manual","queue"]},{"type":"null"}]},"isSkipped":{"type":"boolean"},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"followsOriginal":{"type":"boolean"},"followIssue":{"type":["string","null"]},"requestedByAgentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"confirmedByAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"confirmedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"lastError":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"fix":{"type":"string"}},"required":["code","message"],"additionalProperties":false},{"type":"null"}]},"publishedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"permalink":{"type":["string","null"]},"createdByAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdByAgentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","workspaceId","pieceId","channelAccountId","format","segments","settings","state","scheduledAt","scheduleSource","isSkipped","version","followsOriginal","followIssue","requestedByAgentClientId","confirmedByAccountId","confirmedAt","lastError","publishedAt","permalink","createdByAccountId","createdByAgentClientId","createdAt","updatedAt"],"additionalProperties":false}},"required":["post"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Service-specific errors: not_schedulable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/check_channel_health":{"post":{"operationId":"check_channel_health","summary":"Check a channel account's connection","description":"Queue a health check for a connected account: heyeveryone refreshes its token if it is about to expire, asks the platform whether the connection still works, and updates the account's status (for example to reconnect_required). It runs in the background within a minute; read the result with list_channel_accounts. Every account is also checked daily. A check already queued for the account is not queued twice (queued: false).","tags":["workspace"],"x-heyeveryone-kind":"mutation","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"channelAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},"required":["workspaceId","channelAccountId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"queued":{"type":"boolean"},"jobId":{"type":["string","null"]}},"required":["queued","jobId"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Service-specific errors: disconnected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/connect_sandbox_account":{"post":{"operationId":"connect_sandbox_account","summary":"Connect a Sandbox account","description":"Connect a Sandbox account: heyeveryone's own test network, which behaves like a real social network but posts only to a public test feed page (feedUrl) inside heyeveryone. Use it to try scheduling and publishing end to end, for demos, or before any real channel is connected. No sign-in is needed. Each call creates a new account named `label`. Pass `emulates` (x, linkedin, threads, bluesky, instagram, facebook, tiktok or youtube) to make it behave like that platform: its post formats, text limits, media rules, required settings and result metrics are that platform's, with format ids prefixed by the platform (for example x__text, x__thread, tiktok__video, youtube__short; list them with get_channel_capabilities { platform: 'sandbox', emulates }). It still never posts to the real platform. What it emulates is fixed once connected. Its failure switches (fail the next publish, expire the token, slow responses) are set with update_sandbox_settings. With emulates 'linkedin' you may pass accountType 'page' to stand in for a LinkedIn company page (named \"LinkedIn company page (Sandbox)\" by default); the formats are the same.","tags":["workspace"],"x-heyeveryone-kind":"mutation","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"label":{"type":"string","minLength":1,"maxLength":60},"emulates":{"default":null,"anyOf":[{"type":"string","enum":["x","linkedin","threads","bluesky","instagram","facebook","tiktok","youtube"]},{"type":"null"}]},"accountType":{"type":"string","pattern":"^[a-z][a-z_]{0,30}$"}},"required":["workspaceId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"channelAccount":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"platform":{"type":"string","enum":["x","linkedin","threads","bluesky","instagram","facebook","tiktok","youtube","sandbox"]},"externalId":{"type":"string"},"handle":{"type":["string","null"]},"displayName":{"type":["string","null"]},"avatarUrl":{"type":["string","null"]},"accountType":{"type":["string","null"]},"status":{"type":"string","enum":["active","reconnect_required","disconnected"]},"statusReason":{"type":["string","null"]},"scopes":{"type":"array","items":{"type":"string"}},"tokenExpiresAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"lastHealthCheckAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"createdByAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdByAgentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"platformLabel":{"type":"string"},"access":{"type":"string","enum":["available","pending_review","private_only"]},"feedUrl":{"type":["string","null"]},"emulates":{"anyOf":[{"type":"string","enum":["x","linkedin","threads","bluesky","instagram","facebook","tiktok","youtube"]},{"type":"null"}]}},"required":["id","workspaceId","platform","externalId","handle","displayName","avatarUrl","accountType","status","statusReason","scopes","tokenExpiresAt","lastHealthCheckAt","metadata","createdByAccountId","createdByAgentClientId","createdAt","updatedAt","platformLabel","access","feedUrl","emulates"],"additionalProperties":false}},"required":["channelAccount"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Service-specific errors: plan_limit_reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/create_piece":{"post":{"operationId":"create_piece","summary":"Create content","description":"Create content: a card on the board holding one idea that becomes a post per channel. It starts in the Idea column (or Drafting / In review if you say so) with an empty original draft, unless you pass `masterText`. Typical workflow: create_piece -> add_source (URL, note, video, transcript) -> update_master (the idea in its best form) -> create_post per channel account -> request_schedule or add_to_queue (a human confirms agent requests). Campaigns are free-form labels. `plannedFor` (YYYY-MM-DD, the workspace's time zone) puts the unscheduled draft on that day of the calendar as a planning aid; `plannedTime` (HH:MM, 24-hour, same zone; needs `plannedFor`) puts it at that time of the day, the way the calendar's \"+\" on a time slot does. Neither ever schedules or publishes anything. `url` is the content page: give it to the person so they can open what you drafted. Pipelines that may retry pass `idempotencyKey`: the same key from you in this workspace within 24 hours returns the content the first call created (`replayed: true`) and creates nothing; the same key with different input is refused (`idempotency_conflict`).","tags":["workspace"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional; the same as the body's `idempotencyKey`. The same key from the same agent in the same workspace within 24 hours returns the first result instead of doing it again.","schema":{"type":"string","minLength":1,"maxLength":200}}],"x-heyeveryone-kind":"mutation","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"title":{"type":"string","minLength":1,"maxLength":300},"status":{"default":"idea","type":"string","enum":["idea","drafting","in_review"]},"campaignLabels":{"maxItems":10,"type":"array","items":{"type":"string","minLength":1,"maxLength":60}},"ownerAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"masterText":{"type":"string","maxLength":100000},"plannedFor":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"plannedTime":{"anyOf":[{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},{"type":"null"}]},"idempotencyKey":{"description":"Optional. A key you choose for this request (for example your pipeline's job id). Sending the same key again within 24 hours returns what the first call created (`replayed: true`) instead of creating it twice.","type":"string","minLength":1,"maxLength":200}},"required":["workspaceId","title"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"piece":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"title":{"type":"string"},"status":{"type":"string","enum":["idea","drafting","in_review","scheduled","published"]},"campaignLabels":{"type":"array","items":{"type":"string"}},"ownerAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"boardPosition":{"type":"string"},"archivedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"createdByAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdByAgentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"signoffRequired":{"type":"boolean"},"plannedFor":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"plannedTime":{"anyOf":[{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},{"type":"null"}]}},"required":["id","workspaceId","title","status","campaignLabels","ownerAccountId","boardPosition","archivedAt","createdByAccountId","createdByAgentClientId","createdAt","updatedAt","signoffRequired"],"additionalProperties":false},"master":{"type":"object","properties":{"pieceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"text":{"type":"string"},"media":{"type":"array","items":{"type":"object","properties":{"mediaAssetId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"altText":{"type":"string","maxLength":2000}},"required":["mediaAssetId"],"additionalProperties":false}},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"updatedByAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"updatedByAgentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["pieceId","workspaceId","text","media","version","updatedByAccountId","updatedByAgentClientId","createdAt","updatedAt"],"additionalProperties":false},"url":{"type":"string","description":"The content page in heyeveryone. Give it to the person so they can open the draft."},"replayed":{"type":"boolean"}},"required":["piece","master","url","replayed"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Service-specific errors: idempotency_conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/create_piece_from_template":{"post":{"operationId":"create_piece_from_template","summary":"Create content from a template","description":"Create draft content from a template (list_templates): the title from its title pattern, the original draft from its text, its campaign labels, and one draft post per target channel account with that channel's text (or the original draft). `values` fills the {placeholders} by name, for example `{\"product\": \"Orbit 2.0\"}`; a placeholder without a value stays as typed and is listed in `unfilledPlaceholders`, so edit it before scheduling. `title` overrides the title pattern. `channelAccountIds` limits the posts to some of the template's channels. A disconnected channel account is skipped (`skippedChannels`). Everything is a draft: nothing is scheduled or published; use request_schedule or add_to_queue next (a human confirms agent requests). Each post comes back with its validation `issues`.","tags":["workspace"],"x-heyeveryone-kind":"mutation","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"templateId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"values":{"default":{},"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z](?:[A-Za-z0-9 _-]{0,38}[A-Za-z0-9_-])?$"},"additionalProperties":{"type":"string","maxLength":10000}},"title":{"type":"string","minLength":1,"maxLength":300},"status":{"default":"drafting","type":"string","enum":["idea","drafting","in_review"]},"plannedFor":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"channelAccountIds":{"maxItems":20,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}},"required":["workspaceId","templateId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"piece":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"title":{"type":"string"},"status":{"type":"string","enum":["idea","drafting","in_review","scheduled","published"]},"campaignLabels":{"type":"array","items":{"type":"string"}},"ownerAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"boardPosition":{"type":"string"},"archivedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"createdByAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdByAgentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"signoffRequired":{"type":"boolean"},"plannedFor":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"plannedTime":{"anyOf":[{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},{"type":"null"}]}},"required":["id","workspaceId","title","status","campaignLabels","ownerAccountId","boardPosition","archivedAt","createdByAccountId","createdByAgentClientId","createdAt","updatedAt","signoffRequired"],"additionalProperties":false},"master":{"type":"object","properties":{"pieceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"text":{"type":"string"},"media":{"type":"array","items":{"type":"object","properties":{"mediaAssetId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"altText":{"type":"string","maxLength":2000}},"required":["mediaAssetId"],"additionalProperties":false}},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"updatedByAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"updatedByAgentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["pieceId","workspaceId","text","media","version","updatedByAccountId","updatedByAgentClientId","createdAt","updatedAt"],"additionalProperties":false},"posts":{"type":"array","items":{"type":"object","properties":{"post":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"pieceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"channelAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"format":{"type":"string","pattern":"^[a-z][a-z0-9_]*$"},"segments":{"minItems":1,"type":"array","items":{"type":"object","properties":{"text":{"type":"string"},"media":{"type":"array","items":{"type":"object","properties":{"mediaAssetId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"altText":{"type":"string","maxLength":2000}},"required":["mediaAssetId"],"additionalProperties":false}}},"required":["text","media"],"additionalProperties":false}},"settings":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"state":{"type":"string","enum":["draft","ready","awaiting_confirmation","scheduled","publishing","published","failed_retrying","needs_attention","failed","manual"]},"scheduledAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"scheduleSource":{"anyOf":[{"type":"string","enum":["manual","queue"]},{"type":"null"}]},"isSkipped":{"type":"boolean"},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"followsOriginal":{"type":"boolean"},"followIssue":{"type":["string","null"]},"requestedByAgentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"confirmedByAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"confirmedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"lastError":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"fix":{"type":"string"}},"required":["code","message"],"additionalProperties":false},{"type":"null"}]},"publishedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"permalink":{"type":["string","null"]},"createdByAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdByAgentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","workspaceId","pieceId","channelAccountId","format","segments","settings","state","scheduledAt","scheduleSource","isSkipped","version","followsOriginal","followIssue","requestedByAgentClientId","confirmedByAccountId","confirmedAt","lastError","publishedAt","permalink","createdByAccountId","createdByAgentClientId","createdAt","updatedAt"],"additionalProperties":false},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning"]},"segmentIndex":{"type":"integer","minimum":0,"maximum":9007199254740991},"field":{"type":"string"}},"required":["code","message","severity"],"additionalProperties":false}}},"required":["post","issues"],"additionalProperties":false}},"skippedChannels":{"type":"array","items":{"type":"object","properties":{"channelAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"reason":{"type":"string","enum":["disconnected","not_selected"]}},"required":["channelAccountId","reason"],"additionalProperties":false}},"unfilledPlaceholders":{"type":"array","items":{"type":"string"}}},"required":["piece","master","posts","skippedChannels","unfilledPlaceholders"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Service-specific errors: channel_unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/create_post":{"post":{"operationId":"create_post","summary":"Create a post for a channel","description":"Add a draft post to a content item for one channel account in one format from its capabilities (e.g. `text`, `thread`, `reels`, `short`; omit for the best fit). `segments`: one per post of a thread, each `text` and `media` (asset ids). Omit `segments` to start from the original draft (`---` splits thread posts); such a post follows the original until its own text is edited (`followOriginal: false` starts it customized). `settings`: channel fields such as a YouTube title. One post per channel account (`post_exists`: update or unskip it). The result lists `issues` to fix before scheduling; give the person `url`. Retrying pipelines pass `idempotencyKey`: the same key within 24 hours returns the first post (`replayed: true`); different input with it is refused (`idempotency_conflict`).","tags":["workspace"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional; the same as the body's `idempotencyKey`. The same key from the same agent in the same workspace within 24 hours returns the first result instead of doing it again.","schema":{"type":"string","minLength":1,"maxLength":200}}],"x-heyeveryone-kind":"mutation","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"pieceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"channelAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"format":{"type":"string","pattern":"^[a-z][a-z0-9_]*$"},"segments":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"text":{"type":"string","maxLength":100000},"media":{"default":[],"maxItems":35,"type":"array","items":{"type":"object","properties":{"mediaAssetId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"altText":{"type":"string","maxLength":2000}},"required":["mediaAssetId"]}}},"required":["text"]}},"settings":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"followOriginal":{"type":"boolean"},"idempotencyKey":{"description":"Optional. A key you choose for this request (for example your pipeline's job id). Sending the same key again within 24 hours returns what the first call created (`replayed: true`) instead of creating it twice.","type":"string","minLength":1,"maxLength":200}},"required":["workspaceId","pieceId","channelAccountId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"post":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"pieceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"channelAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"format":{"type":"string","pattern":"^[a-z][a-z0-9_]*$"},"segments":{"minItems":1,"type":"array","items":{"type":"object","properties":{"text":{"type":"string"},"media":{"type":"array","items":{"type":"object","properties":{"mediaAssetId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"altText":{"type":"string","maxLength":2000}},"required":["mediaAssetId"],"additionalProperties":false}}},"required":["text","media"],"additionalProperties":false}},"settings":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"state":{"type":"string","enum":["draft","ready","awaiting_confirmation","scheduled","publishing","published","failed_retrying","needs_attention","failed","manual"]},"scheduledAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"scheduleSource":{"anyOf":[{"type":"string","enum":["manual","queue"]},{"type":"null"}]},"isSkipped":{"type":"boolean"},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"followsOriginal":{"type":"boolean"},"followIssue":{"type":["string","null"]},"requestedByAgentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"confirmedByAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"confirmedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"lastError":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"fix":{"type":"string"}},"required":["code","message"],"additionalProperties":false},{"type":"null"}]},"publishedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"permalink":{"type":["string","null"]},"createdByAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdByAgentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","workspaceId","pieceId","channelAccountId","format","segments","settings","state","scheduledAt","scheduleSource","isSkipped","version","followsOriginal","followIssue","requestedByAgentClientId","confirmedByAccountId","confirmedAt","lastError","publishedAt","permalink","createdByAccountId","createdByAgentClientId","createdAt","updatedAt"],"additionalProperties":false},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning"]},"segmentIndex":{"type":"integer","minimum":0,"maximum":9007199254740991},"field":{"type":"string"}},"required":["code","message","severity"],"additionalProperties":false}},"url":{"type":"string","description":"The content page in heyeveryone. Give it to the person so they can open the draft."},"replayed":{"type":"boolean"}},"required":["post","issues","url","replayed"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Service-specific errors: post_exists, channel_unavailable, unknown_format, idempotency_conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/create_post_kit_link":{"post":{"operationId":"create_post_kit_link","summary":"Create a post kit link","description":"Create a post kit for one post that has to be posted by hand (state manual, or a failed or unclear post a person chooses to post themselves). The kit is a phone-friendly page at the returned `url`: copy the text in one tap, save the media, open the app, then \"Mark as posted\" with the live URL. The url is returned only now; hand it to a person. Links expire after `expiresInDays` (default 14; null = never) and can be turned off with revoke_post_kit_link. Creating a kit never publishes anything.","tags":["workspace"],"x-heyeveryone-kind":"mutation","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"postId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"expiresInDays":{"default":14,"anyOf":[{"type":"integer","minimum":1,"maximum":90},{"type":"null"}]}},"required":["workspaceId","postId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"postKitLink":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"postId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"revokedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"lastUsedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"createdByAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdByAgentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","workspaceId","postId","expiresAt","revokedAt","lastUsedAt","createdByAccountId","createdByAgentClientId","createdAt"],"additionalProperties":false},"token":{"type":"string"},"url":{"type":"string"}},"required":["postKitLink","token","url"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Service-specific errors: not_manual","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/create_snippet":{"post":{"operationId":"create_snippet","summary":"Create a snippet","description":"Save short reusable text as a snippet (`name`, `body`), for example a sign-off or a hashtag set, so people can insert it into drafts from the editor. Names are unique in the workspace (`name_taken`).","tags":["workspace"],"x-heyeveryone-kind":"mutation","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"name":{"type":"string","minLength":1,"maxLength":80},"body":{"type":"string","maxLength":10000}},"required":["workspaceId","name","body"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"snippet":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"name":{"type":"string"},"body":{"type":"string"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","name","body","createdAt","updatedAt"],"additionalProperties":false}},"required":["snippet"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Service-specific errors: name_taken, limit_reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/create_template":{"post":{"operationId":"create_template","summary":"Create a template","description":"Save a recurring content format as a template: a `name`, a `titlePattern` for new content, the original draft (`masterText`), optional `campaignLabels`, and `channels`: the channel accounts (list_channel_accounts) to create a draft post for, each with an optional `format` and optional `segments` (its own text, several for a thread; left out: start from the original draft). Placeholders are written `{name}` (a letter first; letters, digits, spaces, `_` or `-`), for example `{product}` or `{episode number}`; the template's `placeholders` lists them, and create_piece_from_template fills them from `values`. Names are unique in the workspace (`name_taken`). A template only creates drafts; nothing is scheduled or published from it.","tags":["workspace"],"x-heyeveryone-kind":"mutation","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"name":{"type":"string","minLength":1,"maxLength":120},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"titlePattern":{"type":"string","minLength":1,"maxLength":300},"masterText":{"default":"","type":"string","maxLength":100000},"campaignLabels":{"maxItems":10,"type":"array","items":{"type":"string","minLength":1,"maxLength":60}},"channels":{"default":[],"maxItems":20,"type":"array","items":{"type":"object","properties":{"channelAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"format":{"anyOf":[{"type":"string","pattern":"^[a-z][a-z0-9_]*$"},{"type":"null"}]},"segments":{"anyOf":[{"minItems":1,"maxItems":25,"type":"array","items":{"type":"string","maxLength":100000}},{"type":"null"}]}},"required":["channelAccountId"]}}},"required":["workspaceId","name","titlePattern"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"template":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"name":{"type":"string"},"description":{"type":["string","null"]},"titlePattern":{"type":"string"},"masterText":{"type":"string"},"campaignLabels":{"type":"array","items":{"type":"string"}},"channels":{"type":"array","items":{"type":"object","properties":{"channelAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"platform":{"type":"string","enum":["x","linkedin","threads","bluesky","instagram","facebook","tiktok","youtube","sandbox"]},"handle":{"type":["string","null"]},"displayName":{"type":["string","null"]},"status":{"type":"string","enum":["active","reconnect_required","disconnected"]},"format":{"anyOf":[{"type":"string","pattern":"^[a-z][a-z0-9_]*$"},{"type":"null"}]},"segments":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]}},"required":["channelAccountId","platform","handle","displayName","status","format","segments"],"additionalProperties":false}},"placeholders":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","name","description","titlePattern","masterText","campaignLabels","channels","placeholders","createdAt","updatedAt"],"additionalProperties":false}},"required":["template"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Service-specific errors: name_taken, limit_reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/create_workspace":{"post":{"operationId":"create_workspace","summary":"Create a workspace","description":"Create a new workspace (a brand: a company or a side project) and become its owner. Give it a name and the IANA time zone its calendar and queue run in (for example Europe/Istanbul). When an agent creates a workspace it is granted access to it, without auto-publish.","tags":["account"],"x-heyeveryone-kind":"mutation","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"timeZone":{"default":"UTC","type":"string","minLength":1,"maxLength":64}},"required":["name"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"name":{"type":"string"},"timeZone":{"type":"string"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"role":{"type":"string","enum":["owner","editor"]}},"required":["id","name","timeZone","createdAt","role"],"additionalProperties":false}},"required":["workspace"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Service-specific errors: plan_limit_reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/delete_media":{"post":{"operationId":"delete_media","summary":"Delete media","description":"Delete a media asset and its file from the workspace's library. Refused (media_in_use) while a post that will still go out uses it (awaiting confirmation, scheduled, publishing or retrying): replace it in those posts or unschedule them first. Drafts and published posts that used it keep a reference to a missing file, which validate_post reports. This can't be undone.","tags":["workspace"],"x-heyeveryone-kind":"mutation","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"mediaAssetId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},"required":["workspaceId","mediaAssetId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean","const":true},"fileRemoved":{"type":"boolean"}},"required":["deleted","fileRemoved"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Service-specific errors: media_in_use","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/delete_snippet":{"post":{"operationId":"delete_snippet","summary":"Delete a snippet","description":"Delete a snippet. Drafts that already use its text keep it.","tags":["workspace"],"x-heyeveryone-kind":"mutation","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"snippetId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},"required":["workspaceId","snippetId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean","const":true},"snippetId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},"required":["deleted","snippetId"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/delete_template":{"post":{"operationId":"delete_template","summary":"Delete a template","description":"Delete a content template. Content already created from it stays exactly as it is.","tags":["workspace"],"x-heyeveryone-kind":"mutation","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"templateId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},"required":["workspaceId","templateId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean","const":true},"templateId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},"required":["deleted","templateId"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/discard_empty_piece":{"post":{"operationId":"discard_empty_piece","summary":"Discard empty content","description":"Archive a content item only if it is still empty: no title of its own (blank or \"Untitled content\"), no draft text or media, and no channel versions. Anything with content in it is left alone (`archived: false`). The editor calls it when a person leaves a new item they never wrote in; use it the same way after create_piece if you end up not using the item. Empty items never show in lists, the board or the calendar. Restore with archive_piece `archived: false`.","tags":["workspace"],"x-heyeveryone-kind":"mutation","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"pieceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},"required":["workspaceId","pieceId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"archived":{"type":"boolean"}},"required":["archived"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/draft_from_sources":{"post":{"operationId":"draft_from_sources","summary":"Draft from sources","description":"Write a content item's original draft from its sources (fetched links, notes, transcripts and media transcripts added with add_source), in the workspace's voice: one channel-neutral post to adapt later (adapt_piece). If the item already has a draft, the new one keeps its topic. Returns the text only; it saves nothing: write it with update_master, or suggest it with propose_edit. Fails with `insufficient_source` (nothing charged) when no source has text yet. Costs 2 credits.\n\nUses heyeveryone AI and costs 2 credits (2 credits per draft). Tell the person before calling it.","tags":["workspace"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional; the same as the body's `idempotencyKey`. The same key from the same agent in the same workspace within 24 hours returns the first result instead of doing it again.","schema":{"type":"string","minLength":1,"maxLength":200}}],"x-heyeveryone-kind":"mutation","x-heyeveryone-uses-credits":true,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"pieceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"instructions":{"type":"string","maxLength":2000},"targetChars":{"type":"integer","minimum":100,"maximum":5000},"idempotencyKey":{"type":"string","minLength":1,"maxLength":200}},"required":["workspaceId","pieceId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string"},"sourcesUsed":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["text","sourcesUsed"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Service-specific errors: piece_not_found, insufficient_source, ai_generation_failed, insufficient_credits, plan_limit_reached, idempotency_conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/export_results_csv":{"post":{"operationId":"export_results_csv","summary":"Export results as CSV","description":"Export published posts and their latest results as CSV text (RFC 4180, header row, one row per post, newest first), with the same optional filters as the other analytics tools: publishedAt range (from/to), channel account, platform, campaign label. Columns: published_at, content_title, content_id, post_id, campaigns, channel, handle, platform, format, permalink, metrics_status, fetched_at, impressions, views, likes, comments, shares, saves, clicks. A metric cell is empty when the platform didn't report that metric — it is not a zero; `metrics_status` is `reported`, `not_fetched` (not checked yet) or `not_available` (the platform reports nothing). Times are UTC ISO 8601. Text that a spreadsheet would treat as a formula is prefixed with an apostrophe. At most 5,000 rows (`scope.truncated`); narrow the range to export more. Read-only; costs no credits.","tags":["workspace"],"x-heyeveryone-kind":"query","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"from":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"to":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"channelAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"platform":{"type":"string","enum":["x","linkedin","threads","bluesky","instagram","facebook","tiktok","youtube","sandbox"]},"campaign":{"type":"string","minLength":1,"maxLength":60}},"required":["workspaceId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"filename":{"type":"string"},"csv":{"type":"string"},"rows":{"type":"integer","minimum":0,"maximum":9007199254740991},"scope":{"type":"object","properties":{"from":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"to":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"channelAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"platform":{"anyOf":[{"type":"string","enum":["x","linkedin","threads","bluesky","instagram","facebook","tiktok","youtube","sandbox"]},{"type":"null"}]},"campaign":{"type":["string","null"]},"truncated":{"type":"boolean"},"newestFetchAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"oldestFetchAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]}},"required":["from","to","channelAccountId","platform","campaign","truncated","newestFetchAt","oldestFetchAt"],"additionalProperties":false}},"required":["filename","csv","rows","scope"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/find_post_on_channel":{"post":{"operationId":"find_post_on_channel","summary":"Find a post on its channel","description":"For a post whose outcome is unknown or that was sent as a TikTok draft: the channel's posts since its first attempt (id, link, time, text, matchesText). Then link_post_to_channel_post. Never retries. X bills these reads (readCost).","tags":["workspace"],"x-heyeveryone-kind":"query","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"postId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},"required":["workspaceId","postId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"postId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"platform":{"type":"string","enum":["x","linkedin","threads","bluesky","instagram","facebook","tiktok","youtube","sandbox"]},"status":{"type":"string","enum":["listed","refreshing_connection"]},"since":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"candidates":{"type":"array","items":{"type":"object","properties":{"platformPostId":{"type":"string"},"permalink":{"type":["string","null"]},"publishedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"text":{"type":["string","null"]},"segmentCount":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"matchesText":{"type":"boolean"},"alreadyLinked":{"type":"boolean"}},"required":["platformPostId","permalink","publishedAt","text","segmentCount","matchesText","alreadyLinked"],"additionalProperties":false}},"truncated":{"type":"boolean"},"readCost":{"anyOf":[{"type":"object","properties":{"estimatedUsd":{"type":"number","minimum":0},"postsRead":{"type":"integer","minimum":0,"maximum":9007199254740991},"note":{"type":"string"}},"required":["estimatedUsd","postsRead","note"],"additionalProperties":false},{"type":"null"}]}},"required":["postId","platform","status","since","candidates","truncated","readCost"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Service-specific errors: not_findable, channel_needs_reconnect, not_configured, platform_unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/follow_original":{"post":{"operationId":"follow_original","summary":"Link a channel version to the original","description":"Make a channel post follow its content item's original draft again (`follow: true`, the default), or stop it following (`follow: false`, it keeps its text). A following version takes each later edit of the original (update_master) while it is a draft or ready; editing its own segments with update_post customizes it. Linking copies the original into it now, as a new version: blocks of the original (split by a `---` line) become thread posts where the format takes a thread, else paragraphs, with the original's media on the first post. Refused with `invalid_post` when the original would break the channel's rules for this version (nothing changes; the message says why), and with `post_locked` unless the version is a draft or ready. Pass the `version` you read as `expectedVersion`.","tags":["workspace"],"x-heyeveryone-kind":"mutation","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"postId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"follow":{"default":true,"type":"boolean"},"expectedVersion":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["workspaceId","postId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"post":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"pieceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"channelAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"format":{"type":"string","pattern":"^[a-z][a-z0-9_]*$"},"segments":{"minItems":1,"type":"array","items":{"type":"object","properties":{"text":{"type":"string"},"media":{"type":"array","items":{"type":"object","properties":{"mediaAssetId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"altText":{"type":"string","maxLength":2000}},"required":["mediaAssetId"],"additionalProperties":false}}},"required":["text","media"],"additionalProperties":false}},"settings":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"state":{"type":"string","enum":["draft","ready","awaiting_confirmation","scheduled","publishing","published","failed_retrying","needs_attention","failed","manual"]},"scheduledAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"scheduleSource":{"anyOf":[{"type":"string","enum":["manual","queue"]},{"type":"null"}]},"isSkipped":{"type":"boolean"},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"followsOriginal":{"type":"boolean"},"followIssue":{"type":["string","null"]},"requestedByAgentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"confirmedByAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"confirmedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"lastError":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"fix":{"type":"string"}},"required":["code","message"],"additionalProperties":false},{"type":"null"}]},"publishedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"permalink":{"type":["string","null"]},"createdByAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdByAgentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","workspaceId","pieceId","channelAccountId","format","segments","settings","state","scheduledAt","scheduleSource","isSkipped","version","followsOriginal","followIssue","requestedByAgentClientId","confirmedByAccountId","confirmedAt","lastError","publishedAt","permalink","createdByAccountId","createdByAgentClientId","createdAt","updatedAt"],"additionalProperties":false},"changed":{"type":"boolean"}},"required":["post","changed"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Service-specific errors: version_conflict, post_locked, invalid_post","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/generate_alt_text":{"post":{"operationId":"generate_alt_text","summary":"Generate alt text","description":"Describe an image for screen readers and save it as the media asset's alt text. The image must be a ready image with a public URL. Costs 1 credit.\n\nUses heyeveryone AI and costs 1 credits (1 credit per image). Tell the person before calling it.","tags":["workspace"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional; the same as the body's `idempotencyKey`. The same key from the same agent in the same workspace within 24 hours returns the first result instead of doing it again.","schema":{"type":"string","minLength":1,"maxLength":200}}],"x-heyeveryone-kind":"mutation","x-heyeveryone-uses-credits":true,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"mediaAssetId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"context":{"type":"string","maxLength":500},"idempotencyKey":{"type":"string","minLength":1,"maxLength":200}},"required":["workspaceId","mediaAssetId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"altText":{"type":"string"}},"required":["altText"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Service-specific errors: media_not_found, media_not_ready, ai_generation_failed, insufficient_credits, plan_limit_reached, idempotency_conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/get_account":{"post":{"operationId":"get_account","summary":"Get my account","description":"Read your own account: email, display name, when it was created and how far onboarding got. For the plan and credits use get_billing.","tags":["account"],"x-heyeveryone-kind":"query","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"account":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"email":{"type":"string"},"displayName":{"type":["string","null"]},"isStaff":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"onboarding":{"type":"object","properties":{"step":{"anyOf":[{"type":"string","enum":["workspace","channel","agent","first_post"]},{"type":"null"}]},"workspaceId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"completedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]}},"required":["step","workspaceId","completedAt"],"additionalProperties":false}},"required":["id","email","displayName","isStaff","createdAt","onboarding"],"additionalProperties":false}},"required":["account"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/get_activity":{"post":{"operationId":"get_activity","summary":"Get a content item's activity","description":"The activity feed of a content item, newest first: who did what and when, including which agent did it (\"Claude asked to schedule the LinkedIn post\"), reviewers' comments and verdicts, schedule changes and publishing results. Each item has a readable `summary`, the actor, and the raw event `data`. Page back with `before` (the `at` of the last item you have).","tags":["workspace"],"x-heyeveryone-kind":"query","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"pieceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"limit":{"default":50,"type":"integer","minimum":1,"maximum":200},"before":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["workspaceId","pieceId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"action":{"type":"string"},"at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"actor":{"type":"object","properties":{"kind":{"type":"string","enum":["member","guest","agent","system"]},"accountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"agentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"guestId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"name":{"type":"string"}},"required":["kind","accountId","agentClientId","guestId","name"],"additionalProperties":false},"summary":{"type":"string"},"targetType":{"type":["string","null"]},"targetId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"postId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","action","at","actor","summary","targetType","targetId","postId","data"],"additionalProperties":false}},"hasMore":{"type":"boolean"}},"required":["items","hasMore"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/get_billing":{"post":{"operationId":"get_billing","summary":"Get plan and billing","description":"Show the account's plan (a running trial shows as Pro trial), its limits and usage per social set (workspace): channels, members, X posts this month; the monthly credit allowance (spent first, resets) and credits that never expire; trial end and renewal. Use it to explain a plan limit or before an AI action. Read-only and free; only the person changes billing.","tags":["account"],"x-heyeveryone-kind":"query","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"accountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"accountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"billing":{"type":"string","enum":["live","not_configured"]},"plan":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"tagline":{"type":"string"},"monthlyCredits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"prices":{"anyOf":[{"type":"object","properties":{"month":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"currency":{"type":"string"},"display":{"type":"string"},"interval":{"type":"string","enum":["month","year"]}},"required":["amount","currency","display","interval"],"additionalProperties":false},"year":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"currency":{"type":"string"},"display":{"type":"string"},"interval":{"type":"string","enum":["month","year"]}},"required":["amount","currency","display","interval"],"additionalProperties":false}},"required":["month","year"],"additionalProperties":false},{"type":"null"}]},"extraSetPrices":{"anyOf":[{"type":"object","properties":{"month":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"currency":{"type":"string"},"display":{"type":"string"},"interval":{"type":"string","enum":["month","year"]}},"required":["amount","currency","display","interval"],"additionalProperties":false},"year":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"currency":{"type":"string"},"display":{"type":"string"},"interval":{"type":"string","enum":["month","year"]}},"required":["amount","currency","display","interval"],"additionalProperties":false},"monthlyCredits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["month","year","monthlyCredits"],"additionalProperties":false},{"type":"null"}]},"limits":{"type":"object","properties":{"workspaces":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"channelAccounts":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"channelAccountsPerWorkspace":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"membersPerWorkspace":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"activeShareLinks":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"aiAccess":{"type":"boolean"},"xPostsPerWorkspacePerMonth":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"xLinkPostsPerWorkspacePerMonth":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["workspaces","channelAccounts","channelAccountsPerWorkspace","membersPerWorkspace","activeShareLinks","aiAccess","xPostsPerWorkspacePerMonth","xLinkPostsPerWorkspacePerMonth"],"additionalProperties":false},"basePlanId":{"type":"string"}},"required":["id","name","tagline","monthlyCredits","prices","extraSetPrices","limits","basePlanId"],"additionalProperties":false},"subscription":{"type":"object","properties":{"planId":{"type":"string"},"status":{"type":"string","enum":["active","trialing","past_due","canceled","incomplete"]},"interval":{"anyOf":[{"type":"string","enum":["month","year"]},{"type":"null"}]},"currentPeriodEnd":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"cancelAtPeriodEnd":{"type":"boolean"},"renewsAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"hasBillingAccount":{"type":"boolean"},"hasSubscription":{"type":"boolean"},"source":{"type":"string","enum":["stripe","staff","trial","free"]}},"required":["planId","status","interval","currentPeriodEnd","cancelAtPeriodEnd","renewsAt","hasBillingAccount","hasSubscription","source"],"additionalProperties":false},"trial":{"type":"object","properties":{"active":{"type":"boolean"},"endsAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"daysLeft":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["active","endsAt","daysLeft"],"additionalProperties":false},"socialSets":{"type":"object","properties":{"included":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"extra":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"max":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"used":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"sets":{"type":"array","items":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"name":{"type":"string"},"readOnly":{"type":"boolean"},"channels":{"type":"object","properties":{"used":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"max":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["used","max"],"additionalProperties":false},"members":{"type":"object","properties":{"used":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"max":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["used","max"],"additionalProperties":false},"x":{"type":"object","properties":{"month":{"type":"string"},"posts":{"type":"object","properties":{"used":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"max":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["used","max"],"additionalProperties":false},"linkPosts":{"type":"object","properties":{"used":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"max":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["used","max"],"additionalProperties":false},"resetsAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["month","posts","linkPosts","resetsAt"],"additionalProperties":false}},"required":["workspaceId","name","readOnly","channels","members","x"],"additionalProperties":false}}},"required":["included","extra","max","used","sets"],"additionalProperties":false},"usage":{"type":"object","properties":{"workspaces":{"type":"object","properties":{"used":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"max":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["used","max"],"additionalProperties":false},"channelAccounts":{"type":"object","properties":{"used":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"max":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["used","max"],"additionalProperties":false},"activeShareLinks":{"type":"object","properties":{"used":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"max":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["used","max"],"additionalProperties":false}},"required":["workspaces","channelAccounts","activeShareLinks"],"additionalProperties":false},"credits":{"type":"object","properties":{"balance":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"monthlyAllowance":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"allowance":{"type":"object","properties":{"granted":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"used":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"remaining":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"periodStart":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"resetsAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]}},"required":["granted","used","remaining","periodStart","resetsAt"],"additionalProperties":false},"nonExpiring":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["balance","monthlyAllowance","allowance","nonExpiring"],"additionalProperties":false},"availablePlans":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"tagline":{"type":"string"},"monthlyCredits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"prices":{"anyOf":[{"type":"object","properties":{"month":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"currency":{"type":"string"},"display":{"type":"string"},"interval":{"type":"string","enum":["month","year"]}},"required":["amount","currency","display","interval"],"additionalProperties":false},"year":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"currency":{"type":"string"},"display":{"type":"string"},"interval":{"type":"string","enum":["month","year"]}},"required":["amount","currency","display","interval"],"additionalProperties":false}},"required":["month","year"],"additionalProperties":false},{"type":"null"}]},"extraSetPrices":{"anyOf":[{"type":"object","properties":{"month":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"currency":{"type":"string"},"display":{"type":"string"},"interval":{"type":"string","enum":["month","year"]}},"required":["amount","currency","display","interval"],"additionalProperties":false},"year":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"currency":{"type":"string"},"display":{"type":"string"},"interval":{"type":"string","enum":["month","year"]}},"required":["amount","currency","display","interval"],"additionalProperties":false},"monthlyCredits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["month","year","monthlyCredits"],"additionalProperties":false},{"type":"null"}]},"limits":{"type":"object","properties":{"workspaces":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"channelAccounts":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"channelAccountsPerWorkspace":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"membersPerWorkspace":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"activeShareLinks":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"aiAccess":{"type":"boolean"},"xPostsPerWorkspacePerMonth":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"xLinkPostsPerWorkspacePerMonth":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["workspaces","channelAccounts","channelAccountsPerWorkspace","membersPerWorkspace","activeShareLinks","aiAccess","xPostsPerWorkspacePerMonth","xLinkPostsPerWorkspacePerMonth"],"additionalProperties":false},"current":{"type":"boolean"}},"required":["id","name","tagline","monthlyCredits","prices","extraSetPrices","limits","current"],"additionalProperties":false}},"creditPacks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"price":{"type":"object","properties":{"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"currency":{"type":"string"},"display":{"type":"string"}},"required":["amount","currency","display"],"additionalProperties":false}},"required":["id","name","credits","price"],"additionalProperties":false}}},"required":["accountId","billing","plan","subscription","trial","socialSets","usage","credits","availablePlans","creditPacks"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/get_calendar":{"post":{"operationId":"get_calendar","summary":"Get the calendar","description":"See what's going out between `from` and `to` (at most 62 days), across all the workspaces you can use or only `workspaceIds`: every post that isn't skipped, at its published or scheduled time, with its content, channel and state (awaiting_confirmation, scheduled, published, failed...), plus the empty queue slots still free in that range (`includeEmptySlots`). Each workspace comes with its time zone; times are UTC ISO strings. `planned` lists unscheduled content given a planning day (create_piece / update_piece `plannedFor`, with `plannedTime` when planned for a time of day) that falls in the range in its workspace's zone: planning entries, never schedules. Each post carries its `version` for reschedule_post's `expectedVersion`. Use it to find gaps before add_to_queue or request_schedule.","tags":["account"],"x-heyeveryone-kind":"query","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"from":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"to":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"workspaceIds":{"maxItems":50,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},"channelAccountIds":{"maxItems":200,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},"includeEmptySlots":{"default":true,"type":"boolean"},"includePlanned":{"default":true,"type":"boolean"}},"required":["from","to"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"workspaces":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"name":{"type":"string"},"timeZone":{"type":"string"}},"required":["id","name","timeZone"],"additionalProperties":false}},"posts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"pieceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"pieceTitle":{"type":"string"},"channel":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"platform":{"type":"string","enum":["x","linkedin","threads","bluesky","instagram","facebook","tiktok","youtube","sandbox"]},"handle":{"type":["string","null"]},"displayName":{"type":["string","null"]},"avatarUrl":{"type":["string","null"]},"status":{"type":"string","enum":["active","reconnect_required","disconnected"]}},"required":["id","platform","handle","displayName","avatarUrl","status"],"additionalProperties":false},"format":{"type":"string"},"state":{"type":"string","enum":["draft","ready","awaiting_confirmation","scheduled","publishing","published","failed_retrying","needs_attention","failed","manual"]},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"scheduledAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"publishedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"permalink":{"type":["string","null"]},"preview":{"type":"string"},"requestedByAgent":{"type":["string","null"]}},"required":["id","workspaceId","pieceId","pieceTitle","channel","format","state","version","at","scheduledAt","publishedAt","permalink","preview","requestedByAgent"],"additionalProperties":false}},"emptySlots":{"type":"array","items":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"channelAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["workspaceId","channelAccountId","at"],"additionalProperties":false}},"planned":{"type":"array","items":{"type":"object","properties":{"pieceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"title":{"type":"string"},"plannedFor":{"type":"string"},"plannedTime":{"type":["string","null"]},"status":{"type":"string","enum":["idea","drafting","in_review","scheduled","published"]},"platforms":{"type":"array","items":{"type":"string","enum":["x","linkedin","threads","bluesky","instagram","facebook","tiktok","youtube","sandbox"]}},"channels":{"type":"array","items":{"type":"object","properties":{"platform":{"type":"string","enum":["x","linkedin","threads","bluesky","instagram","facebook","tiktok","youtube","sandbox"]},"emulates":{"anyOf":[{"type":"string","enum":["x","linkedin","threads","bluesky","instagram","facebook","tiktok","youtube"]},{"type":"null"}]}},"required":["platform","emulates"],"additionalProperties":false}},"hasUnscheduledWork":{"type":"boolean"},"preview":{"type":"string"}},"required":["pieceId","workspaceId","title","plannedFor","plannedTime","status","platforms","channels","hasUnscheduledWork","preview"],"additionalProperties":false}}},"required":["workspaces","posts","emptySlots","planned"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/get_campaign_results":{"post":{"operationId":"get_campaign_results","summary":"Get results per campaign","description":"Roll published posts' latest results up per campaign label (content's campaignLabels), over an optional publishedAt range (from/to) and channel/platform filter. Content with several labels counts in each of them; content with none is the `campaign: null` group, listed last. Counts are honest: a metric's total only adds posts whose platform reported it, `reportedBy` says how many that is, `average` is total / reportedBy, `unavailable` counts posts on platforms that report nothing and `notFetched` posts not checked yet (about 1 hour, 24 hours and 7 days after going live). `metric` picks what `results.metric`, the sort order and `best` use; `engagements` (default) is likes + comments + shares + saves as each platform reports them. `best` marks the labelled campaign with the highest average, only when at least two have data and there is no tie; weigh `reportedBy` before acting on a small sample. `overall` covers every matching post once. Reads at most 5,000 posts (`scope.truncated`).","tags":["workspace"],"x-heyeveryone-kind":"query","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"from":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"to":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"channelAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"platform":{"type":"string","enum":["x","linkedin","threads","bluesky","instagram","facebook","tiktok","youtube","sandbox"]},"campaign":{"type":"string","minLength":1,"maxLength":60},"metric":{"default":"engagements","type":"string","enum":["impressions","views","likes","comments","shares","saves","clicks","engagements"]}},"required":["workspaceId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"metric":{"type":"string","enum":["impressions","views","likes","comments","shares","saves","clicks","engagements"]},"scope":{"type":"object","properties":{"from":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"to":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"channelAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"platform":{"anyOf":[{"type":"string","enum":["x","linkedin","threads","bluesky","instagram","facebook","tiktok","youtube","sandbox"]},{"type":"null"}]},"campaign":{"type":["string","null"]},"truncated":{"type":"boolean"},"newestFetchAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"oldestFetchAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]}},"required":["from","to","channelAccountId","platform","campaign","truncated","newestFetchAt","oldestFetchAt"],"additionalProperties":false},"overall":{"type":"object","properties":{"posts":{"type":"integer","minimum":0,"maximum":9007199254740991},"unavailable":{"type":"integer","minimum":0,"maximum":9007199254740991},"notFetched":{"type":"integer","minimum":0,"maximum":9007199254740991},"metric":{"type":"object","properties":{"metric":{"type":"string","enum":["impressions","views","likes","comments","shares","saves","clicks","engagements"]},"total":{"type":"number","minimum":0},"reportedBy":{"type":"integer","minimum":0,"maximum":9007199254740991},"average":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}},"required":["metric","total","reportedBy","average"],"additionalProperties":false},"totals":{"type":"array","items":{"type":"object","properties":{"metric":{"type":"string","enum":["impressions","views","likes","comments","shares","saves","clicks","engagements"]},"total":{"type":"number","minimum":0},"reportedBy":{"type":"integer","minimum":0,"maximum":9007199254740991},"average":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}},"required":["metric","total","reportedBy","average"],"additionalProperties":false}}},"required":["posts","unavailable","notFetched","metric","totals"],"additionalProperties":false},"campaigns":{"type":"array","items":{"type":"object","properties":{"campaign":{"type":["string","null"]},"pieces":{"type":"integer","minimum":0,"maximum":9007199254740991},"results":{"type":"object","properties":{"posts":{"type":"integer","minimum":0,"maximum":9007199254740991},"unavailable":{"type":"integer","minimum":0,"maximum":9007199254740991},"notFetched":{"type":"integer","minimum":0,"maximum":9007199254740991},"metric":{"type":"object","properties":{"metric":{"type":"string","enum":["impressions","views","likes","comments","shares","saves","clicks","engagements"]},"total":{"type":"number","minimum":0},"reportedBy":{"type":"integer","minimum":0,"maximum":9007199254740991},"average":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}},"required":["metric","total","reportedBy","average"],"additionalProperties":false},"totals":{"type":"array","items":{"type":"object","properties":{"metric":{"type":"string","enum":["impressions","views","likes","comments","shares","saves","clicks","engagements"]},"total":{"type":"number","minimum":0},"reportedBy":{"type":"integer","minimum":0,"maximum":9007199254740991},"average":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}},"required":["metric","total","reportedBy","average"],"additionalProperties":false}}},"required":["posts","unavailable","notFetched","metric","totals"],"additionalProperties":false},"best":{"type":"boolean"}},"required":["campaign","pieces","results","best"],"additionalProperties":false}}},"required":["metric","scope","overall","campaigns"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/get_channel_capabilities":{"post":{"operationId":"get_channel_capabilities","summary":"Get channel capabilities","description":"Get what each platform accepts: its post formats (text, thread, image, carousel, reel, short, video...), text limits and how characters are counted, thread limits, media counts, image and video specs (types, sizes, durations, aspect ratios), required settings (for example a YouTube title), features only the platform's own app can do, and whether heyeveryone may publish there yet (access: available, pending_review, private_only). A null limit means it is not confirmed and is not checked. Call it before writing a post for a platform, and pass a format id from here to validate_post. Give a platform (and optionally a format) to narrow the answer; omit both for every platform. For a Sandbox account that behaves like a platform (list_channel_accounts shows `emulates`), pass platform 'sandbox' with that `emulates`: the answer is the platform's rules with its format ids prefixed (x__text, tiktok__video...), which are the formats that account takes.","tags":["account"],"x-heyeveryone-kind":"query","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"platform":{"type":"string","enum":["x","linkedin","threads","bluesky","instagram","facebook","tiktok","youtube","sandbox"]},"format":{"type":"string","pattern":"^[a-z][a-z0-9_]*$"},"emulates":{"type":"string","enum":["x","linkedin","threads","bluesky","instagram","facebook","tiktok","youtube"]}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"platforms":{"type":"array","items":{"type":"object","properties":{"platform":{"type":"string","enum":["x","linkedin","threads","bluesky","instagram","facebook","tiktok","youtube","sandbox"]},"label":{"type":"string"},"access":{"type":"string","enum":["available","pending_review","private_only"]},"accessNote":{"type":"string"},"connectNote":{"type":"string"},"accountTypes":{"minItems":1,"type":"array","items":{"type":"string"}},"connectChoices":{"minItems":2,"type":"array","items":{"type":"object","properties":{"accountType":{"type":"string","pattern":"^[a-z][a-z_]{0,30}$"},"label":{"type":"string"},"description":{"type":"string"}},"required":["accountType","label","description"],"additionalProperties":false}},"formats":{"minItems":1,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]*$"},"label":{"type":"string"},"description":{"type":"string"},"text":{"type":"object","properties":{"required":{"type":"boolean"},"maxChars":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"counting":{"type":"string","enum":["characters","graphemes","x_weighted","utf8_bytes","characters_emoji_utf8"]},"maxBytes":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"linkLength":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"maxHashtags":{"type":"integer","minimum":0,"maximum":9007199254740991},"maxMentions":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["required","maxChars","counting"],"additionalProperties":false},"thread":{"type":"object","properties":{"supported":{"type":"boolean"},"maxSegments":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["supported"],"additionalProperties":false},"media":{"type":"object","properties":{"minCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"maxCount":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"kinds":{"type":"array","items":{"type":"string","enum":["image","video"]}},"mixed":{"type":"boolean"},"perKind":{"type":"object","properties":{"image":{"type":"object","properties":{"min":{"type":"integer","minimum":0,"maximum":9007199254740991},"max":{"type":"integer","minimum":0,"maximum":9007199254740991}},"additionalProperties":false},"video":{"type":"object","properties":{"min":{"type":"integer","minimum":0,"maximum":9007199254740991},"max":{"type":"integer","minimum":0,"maximum":9007199254740991}},"additionalProperties":false}},"additionalProperties":false},"image":{"type":"object","properties":{"mimeTypes":{"anyOf":[{"minItems":1,"type":"array","items":{"type":"string"}},{"type":"null"}]},"maxBytes":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"minWidth":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"minHeight":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"maxWidth":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"maxHeight":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"aspectRatio":{"type":"object","properties":{"min":{"type":"number","exclusiveMinimum":0},"max":{"type":"number","exclusiveMinimum":0},"labels":{"default":[],"type":"array","items":{"type":"string"}}},"required":["min","max","labels"],"additionalProperties":false}},"required":["mimeTypes","maxBytes"],"additionalProperties":false},"video":{"type":"object","properties":{"mimeTypes":{"anyOf":[{"minItems":1,"type":"array","items":{"type":"string"}},{"type":"null"}]},"videoCodecs":{"type":"array","items":{"type":"string"}},"audioCodecs":{"type":"array","items":{"type":"string"}},"maxBytes":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"minDurationMs":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"maxDurationMs":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"minWidth":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"maxWidth":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"maxFrameRate":{"type":"number","exclusiveMinimum":0},"aspectRatio":{"type":"object","properties":{"min":{"type":"number","exclusiveMinimum":0},"max":{"type":"number","exclusiveMinimum":0},"labels":{"default":[],"type":"array","items":{"type":"string"}}},"required":["min","max","labels"],"additionalProperties":false}},"required":["mimeTypes","maxBytes","minDurationMs","maxDurationMs"],"additionalProperties":false},"altText":{"type":"object","properties":{"supported":{"type":["boolean","null"]},"maxChars":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["supported"],"additionalProperties":false}},"required":["minCount","maxCount","kinds","mixed","altText"],"additionalProperties":false},"settings":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^[a-z][a-zA-Z0-9]*$"},"label":{"type":"string"},"description":{"type":"string"},"type":{"type":"string","enum":["text","long_text","enum","boolean","url","tags"]},"required":{"type":"boolean"},"maxChars":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"options":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string"},"label":{"type":"string"}},"required":["value","label"],"additionalProperties":false}},"default":{"anyOf":[{"type":"string"},{"type":"boolean"},{"type":"array","items":{"type":"string"}}]}},"required":["key","label","description","type","required"],"additionalProperties":false}},"manualOnly":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^[a-z][a-z0-9_]*$"},"description":{"type":"string"}},"required":["key","description"],"additionalProperties":false}},"mediaTransfer":{"type":"string","enum":["public_url","upload","either"]},"delivery":{"type":"string","enum":["publish","draft"]}},"required":["id","label","description","text","thread","media","settings","manualOnly","mediaTransfer"],"additionalProperties":false}},"metrics":{"type":"array","items":{"type":"string","enum":["impressions","views","likes","comments","shares","saves","clicks"]}},"sources":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"url":{"type":"string","format":"uri"},"checkedOn":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["title","url","checkedOn"],"additionalProperties":false}},"notes":{"default":[],"type":"array","items":{"type":"string"}}},"required":["platform","label","access","accountTypes","formats","sources","notes"],"additionalProperties":false}}},"required":["platforms"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Service-specific errors: unknown_format","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/get_credit_balance":{"post":{"operationId":"get_credit_balance","summary":"Get credit balance","description":"Return the account's AI credit balance. Credits pay only for heyeveryone's own AI (adapting content, transcripts, alt text...); MCP and API calls are free. Check it before calling a tool that costs credits, and tell the person when the balance is too low (they manage credits in Usage and billing).","tags":["account"],"x-heyeveryone-kind":"query","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"accountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"accountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"balance":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["accountId","balance"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/get_format_results":{"post":{"operationId":"get_format_results","summary":"Get best-performing formats per channel","description":"Compare formats (post, thread, reel, short, carousel… as the capability matrix names them) within each connected channel account, from published posts' latest results over an optional publishedAt range (from/to) and channel/platform/campaign filter. Formats are compared only within one channel, because platforms report different metrics. `metric` picks what to rank by; `engagements` (default) is likes + comments + shares + saves as the platform reports them. Each format's `results.metric.average` divides by `reportedBy` (posts that reported it), never by all posts; `unavailable` posts are on a platform that reports nothing and `notFetched` ones haven't been checked yet. `bestFormat` is set only when at least two formats have data and the top one doesn't tie; a best format backed by one or two posts is a hint, not a rule, so check `reportedBy`. Use it to suggest which format to adapt new content to. Reads at most 5,000 posts (`scope.truncated`).","tags":["workspace"],"x-heyeveryone-kind":"query","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"from":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"to":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"channelAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"platform":{"type":"string","enum":["x","linkedin","threads","bluesky","instagram","facebook","tiktok","youtube","sandbox"]},"campaign":{"type":"string","minLength":1,"maxLength":60},"metric":{"default":"engagements","type":"string","enum":["impressions","views","likes","comments","shares","saves","clicks","engagements"]}},"required":["workspaceId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"metric":{"type":"string","enum":["impressions","views","likes","comments","shares","saves","clicks","engagements"]},"scope":{"type":"object","properties":{"from":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"to":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"channelAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"platform":{"anyOf":[{"type":"string","enum":["x","linkedin","threads","bluesky","instagram","facebook","tiktok","youtube","sandbox"]},{"type":"null"}]},"campaign":{"type":["string","null"]},"truncated":{"type":"boolean"},"newestFetchAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"oldestFetchAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]}},"required":["from","to","channelAccountId","platform","campaign","truncated","newestFetchAt","oldestFetchAt"],"additionalProperties":false},"channels":{"type":"array","items":{"type":"object","properties":{"channelAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"platform":{"type":"string","enum":["x","linkedin","threads","bluesky","instagram","facebook","tiktok","youtube","sandbox"]},"channelLabel":{"type":"string"},"handle":{"type":["string","null"]},"bestFormat":{"type":["string","null"]},"formats":{"type":"array","items":{"type":"object","properties":{"format":{"type":"string"},"formatLabel":{"type":"string"},"results":{"type":"object","properties":{"posts":{"type":"integer","minimum":0,"maximum":9007199254740991},"unavailable":{"type":"integer","minimum":0,"maximum":9007199254740991},"notFetched":{"type":"integer","minimum":0,"maximum":9007199254740991},"metric":{"type":"object","properties":{"metric":{"type":"string","enum":["impressions","views","likes","comments","shares","saves","clicks","engagements"]},"total":{"type":"number","minimum":0},"reportedBy":{"type":"integer","minimum":0,"maximum":9007199254740991},"average":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}},"required":["metric","total","reportedBy","average"],"additionalProperties":false},"totals":{"type":"array","items":{"type":"object","properties":{"metric":{"type":"string","enum":["impressions","views","likes","comments","shares","saves","clicks","engagements"]},"total":{"type":"number","minimum":0},"reportedBy":{"type":"integer","minimum":0,"maximum":9007199254740991},"average":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}},"required":["metric","total","reportedBy","average"],"additionalProperties":false}}},"required":["posts","unavailable","notFetched","metric","totals"],"additionalProperties":false},"best":{"type":"boolean"}},"required":["format","formatLabel","results","best"],"additionalProperties":false}}},"required":["channelAccountId","platform","channelLabel","handle","bestFormat","formats"],"additionalProperties":false}}},"required":["metric","scope","channels"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/get_history":{"post":{"operationId":"get_history","summary":"Get version history","description":"Read the version history of a content item's original draft and posts, newest first. Every saved change is a version with a full snapshot (master: text and media; post: format, segments and settings) and who made it (a person or an agent). Filter with `postId` for one post, or `target: master` for the original draft. To restore an old version, write its content back with update_master or update_post.","tags":["workspace"],"x-heyeveryone-kind":"query","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"pieceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"target":{"type":"string","enum":["master","post"]},"postId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"limit":{"default":50,"type":"integer","minimum":1,"maximum":200}},"required":["workspaceId","pieceId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"versions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"pieceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"target":{"type":"string","enum":["master","post"]},"postId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"content":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"createdByAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdByAgentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"author":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["member","guest","agent","system"]},"accountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"agentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"guestId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"name":{"type":"string"}},"required":["kind","accountId","agentClientId","guestId","name"],"additionalProperties":false},{"type":"null"}]}},"required":["id","workspaceId","pieceId","target","postId","version","content","createdByAccountId","createdByAgentClientId","createdAt","author"],"additionalProperties":false}}},"required":["versions"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/get_media":{"post":{"operationId":"get_media","summary":"Get media","description":"Get one media asset: its status (poll this after upload_media_from_url until 'ready' or 'failed'), probe data (dimensions, duration, codecs, frame rate), public URL, alt text, cover frames (videos; the first is the chosen cover), its fit for every platform and format (which checks fail and why, from the capability matrix), and where it is used (original drafts and posts, with their state). `deletable` is false while a post that will still go out uses it.","tags":["workspace"],"x-heyeveryone-kind":"query","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"mediaAssetId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},"required":["workspaceId","mediaAssetId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"mediaAsset":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"kind":{"type":"string","enum":["image","video"]},"status":{"type":"string","enum":["uploading","processing","ready","failed"]},"storageProvider":{"type":"string","enum":["supabase","r2"]},"storageBucket":{"type":"string"},"storageKey":{"type":"string"},"publicUrl":{"type":["string","null"]},"filename":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":["string","null"]},"width":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"height":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"durationMs":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"probe":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"probeError":{"type":["string","null"]},"covers":{"type":"array","items":{"type":"object","properties":{"storageKey":{"type":"string"},"width":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"height":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"atMs":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["storageKey","width","height","atMs"],"additionalProperties":false}},"altText":{"type":["string","null"]},"createdByAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdByAgentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"previewUrl":{"type":["string","null"]},"coverFrames":{"type":"array","items":{"type":"object","properties":{"atMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"width":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"height":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"url":{"type":"string"}},"required":["atMs","width","height","url"],"additionalProperties":false}},"fitsPlatforms":{"type":"array","items":{"type":"string","enum":["x","linkedin","threads","bluesky","instagram","facebook","tiktok","youtube","sandbox"]}}},"required":["id","workspaceId","kind","status","storageProvider","storageBucket","storageKey","publicUrl","filename","mimeType","sizeBytes","width","height","durationMs","probe","probeError","covers","altText","createdByAccountId","createdByAgentClientId","createdAt","updatedAt","previewUrl","coverFrames","fitsPlatforms"],"additionalProperties":false},"fit":{"type":"array","items":{"type":"object","properties":{"platform":{"type":"string","enum":["x","linkedin","threads","bluesky","instagram","facebook","tiktok","youtube","sandbox"]},"label":{"type":"string"},"fits":{"type":"boolean"},"summary":{"type":"string"},"formats":{"type":"array","items":{"type":"object","properties":{"format":{"type":"string","pattern":"^[a-z][a-z0-9_]*$"},"label":{"type":"string"},"fits":{"type":"boolean"},"errors":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}}},"required":["format","label","fits","errors","warnings"],"additionalProperties":false}}},"required":["platform","label","fits","summary","formats"],"additionalProperties":false}},"usedIn":{"type":"array","items":{"type":"object","properties":{"pieceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"pieceTitle":{"type":"string"},"postId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"channelAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"platform":{"anyOf":[{"type":"string","enum":["x","linkedin","threads","bluesky","instagram","facebook","tiktok","youtube","sandbox"]},{"type":"null"}]},"state":{"anyOf":[{"type":"string","enum":["draft","ready","awaiting_confirmation","scheduled","publishing","published","failed_retrying","needs_attention","failed","manual"]},{"type":"null"}]},"scheduledAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]}},"required":["pieceId","pieceTitle","postId","channelAccountId","platform","state","scheduledAt"],"additionalProperties":false}},"deletable":{"type":"boolean"}},"required":["mediaAsset","fit","usedIn","deletable"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/get_media_upload_request":{"post":{"operationId":"get_media_upload_request","summary":"Check a file upload","description":"Status of a request_media_upload: waiting, uploading, finished (with mediaAssetId and the asset) or expired (ask again).","tags":["workspace"],"x-heyeveryone-kind":"query","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"uploadRequestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},"required":["workspaceId","uploadRequestId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"uploadRequest":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"status":{"type":"string","enum":["waiting","uploading","finished","expired"]},"accepts":{"type":"array","items":{"type":"string","enum":["image","video"]}},"maxBytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"note":{"type":["string","null"]},"expiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"uploadExpiresAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"mediaAssetId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","workspaceId","status","accepts","maxBytes","note","expiresAt","uploadExpiresAt","mediaAssetId","createdAt"],"additionalProperties":false},"mediaAsset":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"kind":{"type":"string","enum":["image","video"]},"status":{"type":"string","enum":["uploading","processing","ready","failed"]},"storageProvider":{"type":"string","enum":["supabase","r2"]},"storageBucket":{"type":"string"},"storageKey":{"type":"string"},"publicUrl":{"type":["string","null"]},"filename":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":["string","null"]},"width":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"height":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"durationMs":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"probe":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"probeError":{"type":["string","null"]},"covers":{"type":"array","items":{"type":"object","properties":{"storageKey":{"type":"string"},"width":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"height":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"atMs":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["storageKey","width","height","atMs"],"additionalProperties":false}},"altText":{"type":["string","null"]},"createdByAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdByAgentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"previewUrl":{"type":["string","null"]},"coverFrames":{"type":"array","items":{"type":"object","properties":{"atMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"width":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"height":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"url":{"type":"string"}},"required":["atMs","width","height","url"],"additionalProperties":false}},"fitsPlatforms":{"type":"array","items":{"type":"string","enum":["x","linkedin","threads","bluesky","instagram","facebook","tiktok","youtube","sandbox"]}}},"required":["id","workspaceId","kind","status","storageProvider","storageBucket","storageKey","publicUrl","filename","mimeType","sizeBytes","width","height","durationMs","probe","probeError","covers","altText","createdByAccountId","createdByAgentClientId","createdAt","updatedAt","previewUrl","coverFrames","fitsPlatforms"],"additionalProperties":false},{"type":"null"}]},"mediaUrl":{"type":["string","null"]}},"required":["uploadRequest","mediaAsset","mediaUrl"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/get_notification_preferences":{"post":{"operationId":"get_notification_preferences","summary":"Get notification preferences","description":"Read your notification settings: whether notifications are emailed (batched: one email for a burst), which kinds are muted from email, the opt-in digest (daily, or weekly on Mondays) with its UTC hour, and whether you get the getting-started emails (lifecycleEmails). Also lists every notification kind.","tags":["account"],"x-heyeveryone-kind":"query","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"preferences":{"type":"object","properties":{"emailEnabled":{"type":"boolean"},"mutedKinds":{"type":"array","items":{"type":"string","enum":["post.failed","post.needs_attention","post.manual","post.late","post.published_with_notice","channel.reconnect_required","channel.expiring","feedback.received","agent.request","review.requested","webhook.failing"]}},"dailyDigest":{"type":"boolean"},"digestHourUtc":{"type":"integer","minimum":0,"maximum":23},"digestFrequency":{"type":"string","enum":["daily","weekly"]},"lifecycleEmails":{"type":"boolean"},"kinds":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["post.failed","post.needs_attention","post.manual","post.late","post.published_with_notice","channel.reconnect_required","channel.expiring","feedback.received","agent.request","review.requested","webhook.failing"]},"label":{"type":"string"}},"required":["kind","label"],"additionalProperties":false}}},"required":["emailEnabled","mutedKinds","dailyDigest","digestHourUtc","digestFrequency","lifecycleEmails","kinds"],"additionalProperties":false}},"required":["preferences"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/get_piece":{"post":{"operationId":"get_piece","summary":"Get a content item","description":"Read one content item with everything on it: the original draft, sources (with fetched text for URLs), every post (channel, format, segments, settings, state, schedule, version, open comments, sign-off), comment counts, review state (share links, verdicts, whether sign-off is required), the next scheduled time and whether a post failed. `media` lists every library file the original draft and posts reference (this workspace's only) with status, dimensions, duration, alt text, publicUrl, previewUrl (the image, or a video's chosen cover), posterUrl (videos: the cover frame), coverFrames and fitsPlatforms, so you can check a content item's media without list_media. Use it before editing: pass a post's `version` as `expectedVersion` to update_post so you never overwrite a newer edit. Archived content can be read too. `url` (and each post's `url`) is the content page to give the person.","tags":["workspace"],"x-heyeveryone-kind":"query","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"pieceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},"required":["workspaceId","pieceId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"piece":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"title":{"type":"string"},"status":{"type":"string","enum":["idea","drafting","in_review","scheduled","published"]},"campaignLabels":{"type":"array","items":{"type":"string"}},"ownerAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"boardPosition":{"type":"string"},"archivedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"createdByAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdByAgentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"signoffRequired":{"type":"boolean"},"plannedFor":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"plannedTime":{"anyOf":[{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},{"type":"null"}]}},"required":["id","workspaceId","title","status","campaignLabels","ownerAccountId","boardPosition","archivedAt","createdByAccountId","createdByAgentClientId","createdAt","updatedAt","signoffRequired"],"additionalProperties":false},"url":{"type":"string","description":"The content page in heyeveryone. Give it to the person so they can open the draft."},"owner":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["member","guest","agent","system"]},"accountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"agentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"guestId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"name":{"type":"string"}},"required":["kind","accountId","agentClientId","guestId","name"],"additionalProperties":false},{"type":"null"}]},"createdBy":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["member","guest","agent","system"]},"accountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"agentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"guestId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"name":{"type":"string"}},"required":["kind","accountId","agentClientId","guestId","name"],"additionalProperties":false},{"type":"null"}]},"master":{"anyOf":[{"type":"object","properties":{"pieceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"text":{"type":"string"},"media":{"type":"array","items":{"type":"object","properties":{"mediaAssetId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"altText":{"type":"string","maxLength":2000}},"required":["mediaAssetId"],"additionalProperties":false}},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"updatedByAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"updatedByAgentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["pieceId","workspaceId","text","media","version","updatedByAccountId","updatedByAgentClientId","createdAt","updatedAt"],"additionalProperties":false},{"type":"null"}]},"sources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"pieceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"kind":{"type":"string","enum":["url","media","note","transcript"]},"title":{"type":["string","null"]},"url":{"type":["string","null"]},"mediaAssetId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"note":{"type":["string","null"]},"fetchedText":{"type":["string","null"]},"fetchStatus":{"type":"string","enum":["not_applicable","pending","fetching","fetched","failed"]},"fetchError":{"type":["string","null"]},"fetchedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"createdByAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdByAgentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"description":{"type":["string","null"]}},"required":["id","workspaceId","pieceId","kind","title","url","mediaAssetId","note","fetchedText","fetchStatus","fetchError","fetchedAt","createdByAccountId","createdByAgentClientId","createdAt","updatedAt","description"],"additionalProperties":false}},"posts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"pieceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"channelAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"format":{"type":"string","pattern":"^[a-z][a-z0-9_]*$"},"segments":{"minItems":1,"type":"array","items":{"type":"object","properties":{"text":{"type":"string"},"media":{"type":"array","items":{"type":"object","properties":{"mediaAssetId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"altText":{"type":"string","maxLength":2000}},"required":["mediaAssetId"],"additionalProperties":false}}},"required":["text","media"],"additionalProperties":false}},"settings":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"state":{"type":"string","enum":["draft","ready","awaiting_confirmation","scheduled","publishing","published","failed_retrying","needs_attention","failed","manual"]},"scheduledAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"scheduleSource":{"anyOf":[{"type":"string","enum":["manual","queue"]},{"type":"null"}]},"isSkipped":{"type":"boolean"},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"followsOriginal":{"type":"boolean"},"followIssue":{"type":["string","null"]},"requestedByAgentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"confirmedByAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"confirmedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"lastError":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"fix":{"type":"string"}},"required":["code","message"],"additionalProperties":false},{"type":"null"}]},"publishedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"permalink":{"type":["string","null"]},"createdByAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdByAgentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"channel":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"platform":{"type":"string","enum":["x","linkedin","threads","bluesky","instagram","facebook","tiktok","youtube","sandbox"]},"handle":{"type":["string","null"]},"displayName":{"type":["string","null"]},"avatarUrl":{"type":["string","null"]},"status":{"type":"string","enum":["active","reconnect_required","disconnected"]}},"required":["id","platform","handle","displayName","avatarUrl","status"],"additionalProperties":false},"openCommentCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"signoff":{"type":"object","properties":{"approved":{"type":"boolean"},"changesRequested":{"type":"boolean"}},"required":["approved","changesRequested"],"additionalProperties":false},"url":{"type":"string","description":"The content page in heyeveryone. Give it to the person so they can open the draft."}},"required":["id","workspaceId","pieceId","channelAccountId","format","segments","settings","state","scheduledAt","scheduleSource","isSkipped","version","followsOriginal","followIssue","requestedByAgentClientId","confirmedByAccountId","confirmedAt","lastError","publishedAt","permalink","createdByAccountId","createdByAgentClientId","createdAt","updatedAt","channel","openCommentCount","signoff"],"additionalProperties":false}},"media":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"kind":{"type":"string","enum":["image","video"]},"status":{"type":"string","enum":["uploading","processing","ready","failed"]},"storageProvider":{"type":"string","enum":["supabase","r2"]},"storageBucket":{"type":"string"},"storageKey":{"type":"string"},"publicUrl":{"type":["string","null"]},"filename":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":["string","null"]},"width":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"height":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"durationMs":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"probe":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"probeError":{"type":["string","null"]},"covers":{"type":"array","items":{"type":"object","properties":{"storageKey":{"type":"string"},"width":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"height":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"atMs":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["storageKey","width","height","atMs"],"additionalProperties":false}},"altText":{"type":["string","null"]},"createdByAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdByAgentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"previewUrl":{"type":["string","null"]},"coverFrames":{"type":"array","items":{"type":"object","properties":{"atMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"width":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"height":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"url":{"type":"string"}},"required":["atMs","width","height","url"],"additionalProperties":false}},"fitsPlatforms":{"type":"array","items":{"type":"string","enum":["x","linkedin","threads","bluesky","instagram","facebook","tiktok","youtube","sandbox"]}},"posterUrl":{"type":["string","null"]}},"required":["id","workspaceId","kind","status","storageProvider","storageBucket","storageKey","publicUrl","filename","mimeType","sizeBytes","width","height","durationMs","probe","probeError","covers","altText","createdByAccountId","createdByAgentClientId","createdAt","updatedAt","previewUrl","coverFrames","fitsPlatforms","posterUrl"],"additionalProperties":false}},"comments":{"type":"object","properties":{"open":{"type":"integer","minimum":0,"maximum":9007199254740991},"resolved":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["open","resolved"],"additionalProperties":false},"review":{"type":"object","properties":{"state":{"type":"string","enum":["none","in_review","changes_requested","approved"]},"signoffRequired":{"type":"boolean"},"shareLinks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"pieceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"revokedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"allowSignoff":{"type":"boolean"},"lastUsedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"createdByAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdByAgentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","workspaceId","pieceId","expiresAt","revokedAt","allowSignoff","lastUsedAt","createdByAccountId","createdByAgentClientId","createdAt"],"additionalProperties":false}},"verdicts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"postId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"reviewer":{"type":"object","properties":{"kind":{"type":"string","enum":["member","guest","agent","system"]},"accountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"agentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"guestId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"name":{"type":"string"}},"required":["kind","accountId","agentClientId","guestId","name"],"additionalProperties":false},"decision":{"type":"string","enum":["approved","changes_requested"]},"note":{"type":["string","null"]},"contentVersion":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"countsAsSignoff":{"type":"boolean"},"createdAt":{"type":"string"}},"required":["id","postId","reviewer","decision","note","contentVersion","countsAsSignoff","createdAt"],"additionalProperties":false}}},"required":["state","signoffRequired","shareLinks","verdicts"],"additionalProperties":false},"nextScheduledAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"hasFailure":{"type":"boolean"}},"required":["piece","owner","createdBy","master","sources","posts","media","comments","review","nextScheduledAt","hasFailure"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/get_post_status":{"post":{"operationId":"get_post_status","summary":"Get a post's publishing status","description":"Check where one post is in publishing: its state (scheduled, publishing, published, failed_retrying, needs_attention, failed, manual...), the permalink once live, the last error in plain words with a fix, the next automatic retry, and every publish attempt. Use it after scheduling to confirm a post went out, or when a post shows up in Updates, before calling retry_post or mark_post_published_manually.","tags":["workspace"],"x-heyeveryone-kind":"query","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"postId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},"required":["workspaceId","postId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"object","properties":{"postId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"pieceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"channelAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"platform":{"type":"string","enum":["x","linkedin","threads","bluesky","instagram","facebook","tiktok","youtube","sandbox"]},"state":{"type":"string","enum":["draft","ready","awaiting_confirmation","scheduled","publishing","published","failed_retrying","needs_attention","failed","manual"]},"scheduledAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"publishedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"permalink":{"type":["string","null"]},"lastError":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"fix":{"type":"string"}},"required":["code","message"],"additionalProperties":false},{"type":"null"}]},"needsYou":{"type":"boolean"},"waitingForReconnect":{"type":"boolean"},"nextRetryAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"automaticRetriesUsed":{"type":"integer","minimum":0,"maximum":9007199254740991},"publication":{"anyOf":[{"type":"object","properties":{"status":{"type":"string","enum":["pending","published","failed"]},"platformPostId":{"type":["string","null"]},"permalink":{"type":["string","null"]},"publishedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"notices":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}}},"required":["status","platformPostId","permalink","publishedAt","notices"],"additionalProperties":false},{"type":"null"}]},"attempts":{"type":"array","items":{"type":"object","properties":{"attemptNumber":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"outcome":{"type":"string","enum":["in_flight","succeeded","failed","ambiguous"]},"errorCode":{"anyOf":[{"type":"string","enum":["auth_expired","rate_limited","rejected_content","media_unsupported","platform_error","timeout_after_send","not_permitted"]},{"type":"null"}]},"errorMessage":{"type":["string","null"]},"startedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"finishedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"durationMs":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["attemptNumber","outcome","errorCode","errorMessage","startedAt","finishedAt","durationMs"],"additionalProperties":false}},"nextStep":{"type":"string"}},"required":["postId","pieceId","channelAccountId","platform","state","scheduledAt","publishedAt","permalink","lastError","needsYou","waitingForReconnect","nextRetryAt","automaticRetriesUsed","publication","attempts","nextStep"],"additionalProperties":false}},"required":["status"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/get_posting_time_results":{"post":{"operationId":"get_posting_time_results","summary":"Get results by posting time","description":"How results are distributed over the time posts went live: by hour of day (0–23), by day of week (0 = Monday … 6 = Sunday) and by day × hour, in the workspace's time zone unless `timeZone` (IANA, for example Europe/Berlin) is passed. Built from published posts' latest results over an optional publishedAt range (from/to) and channel/platform/campaign filter. `metric` picks the number; `engagements` (default) is likes + comments + shares + saves as each platform reports them. Each bucket's `average` divides by `reportedBy` (posts that reported the metric), never by all posts, so platforms that report nothing and posts not fetched yet don't pull a time down. `bestHour` / `bestDay` are set only when at least two buckets have data and the top one doesn't tie. Useful before picking queue times; small samples are noisy, so check `reportedBy`. Reads at most 5,000 posts (`scope.truncated`).","tags":["workspace"],"x-heyeveryone-kind":"query","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"from":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"to":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"channelAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"platform":{"type":"string","enum":["x","linkedin","threads","bluesky","instagram","facebook","tiktok","youtube","sandbox"]},"campaign":{"type":"string","minLength":1,"maxLength":60},"metric":{"default":"engagements","type":"string","enum":["impressions","views","likes","comments","shares","saves","clicks","engagements"]},"timeZone":{"type":"string","minLength":1,"maxLength":64}},"required":["workspaceId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"metric":{"type":"string","enum":["impressions","views","likes","comments","shares","saves","clicks","engagements"]},"timeZone":{"type":"string"},"scope":{"type":"object","properties":{"from":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"to":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"channelAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"platform":{"anyOf":[{"type":"string","enum":["x","linkedin","threads","bluesky","instagram","facebook","tiktok","youtube","sandbox"]},{"type":"null"}]},"campaign":{"type":["string","null"]},"truncated":{"type":"boolean"},"newestFetchAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"oldestFetchAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]}},"required":["from","to","channelAccountId","platform","campaign","truncated","newestFetchAt","oldestFetchAt"],"additionalProperties":false},"overall":{"type":"object","properties":{"posts":{"type":"integer","minimum":0,"maximum":9007199254740991},"unavailable":{"type":"integer","minimum":0,"maximum":9007199254740991},"notFetched":{"type":"integer","minimum":0,"maximum":9007199254740991},"metric":{"type":"object","properties":{"metric":{"type":"string","enum":["impressions","views","likes","comments","shares","saves","clicks","engagements"]},"total":{"type":"number","minimum":0},"reportedBy":{"type":"integer","minimum":0,"maximum":9007199254740991},"average":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}},"required":["metric","total","reportedBy","average"],"additionalProperties":false},"totals":{"type":"array","items":{"type":"object","properties":{"metric":{"type":"string","enum":["impressions","views","likes","comments","shares","saves","clicks","engagements"]},"total":{"type":"number","minimum":0},"reportedBy":{"type":"integer","minimum":0,"maximum":9007199254740991},"average":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}},"required":["metric","total","reportedBy","average"],"additionalProperties":false}}},"required":["posts","unavailable","notFetched","metric","totals"],"additionalProperties":false},"byHour":{"type":"array","items":{"type":"object","properties":{"posts":{"type":"integer","minimum":0,"maximum":9007199254740991},"reportedBy":{"type":"integer","minimum":0,"maximum":9007199254740991},"total":{"type":"number","minimum":0},"average":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"hour":{"type":"integer","minimum":0,"maximum":23}},"required":["posts","reportedBy","total","average","hour"],"additionalProperties":false}},"byDay":{"type":"array","items":{"type":"object","properties":{"posts":{"type":"integer","minimum":0,"maximum":9007199254740991},"reportedBy":{"type":"integer","minimum":0,"maximum":9007199254740991},"total":{"type":"number","minimum":0},"average":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"dayOfWeek":{"type":"integer","minimum":0,"maximum":6}},"required":["posts","reportedBy","total","average","dayOfWeek"],"additionalProperties":false}},"cells":{"type":"array","items":{"type":"object","properties":{"posts":{"type":"integer","minimum":0,"maximum":9007199254740991},"reportedBy":{"type":"integer","minimum":0,"maximum":9007199254740991},"total":{"type":"number","minimum":0},"average":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"dayOfWeek":{"type":"integer","minimum":0,"maximum":6},"hour":{"type":"integer","minimum":0,"maximum":23}},"required":["posts","reportedBy","total","average","dayOfWeek","hour"],"additionalProperties":false}},"bestHour":{"anyOf":[{"type":"integer","minimum":0,"maximum":23},{"type":"null"}]},"bestDay":{"anyOf":[{"type":"integer","minimum":0,"maximum":6},{"type":"null"}]}},"required":["metric","timeZone","scope","overall","byHour","byDay","cells","bestHour","bestDay"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/get_publish_plan":{"post":{"operationId":"get_publish_plan","summary":"Get the publish plan of content","description":"Everything needed to ship a content item, per channel version: account, current `version` (pass as `expectedVersion` to schedule_versions), checks as `errors` (block) and `warnings`, the approval state (`voided` when edited after approval), state and time, next free queue slot, and whether it can be scheduled (`schedule`) or posted now (`postNow`) with reasons. `schedule.needsConfirmation`: an agent without auto-publish only asks a person. Approval is a state: with sign-off required, a version without approval of its current text can't ship (`signoff_required`). `nearDuplicates`: similar text on the channel in the last 30 days or scheduled (warning only; tell the person). X versions warn `x_allowance`; the plan can block (`x_allowance`, `plan_limit_reached`). `rules` explains it in plain words: tell the person. `url` opens the content page. Read-only; act with schedule_versions.","tags":["workspace"],"x-heyeveryone-kind":"query","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"pieceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},"required":["workspaceId","pieceId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"piece":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"title":{"type":"string"},"status":{"type":"string","enum":["idea","drafting","in_review","scheduled","published"]},"signoffRequired":{"type":"boolean"},"archived":{"type":"boolean"},"url":{"type":"string","description":"The content page in heyeveryone. Give it to the person so they can open the draft."}},"required":["id","title","status","signoffRequired","archived"],"additionalProperties":false},"timeZone":{"type":"string"},"callerMayPublish":{"type":"boolean"},"rules":{"type":"array","items":{"type":"string"}},"versions":{"type":"array","items":{"type":"object","properties":{"postId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"url":{"type":"string","description":"The content page in heyeveryone. Give it to the person so they can open the draft."},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"state":{"type":"string","enum":["draft","ready","awaiting_confirmation","scheduled","publishing","published","failed_retrying","needs_attention","failed","manual"]},"isSkipped":{"type":"boolean"},"format":{"type":"string"},"formatLabel":{"type":"string"},"channel":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"platform":{"type":"string","enum":["x","linkedin","threads","bluesky","instagram","facebook","tiktok","youtube","sandbox"]},"platformLabel":{"type":"string"},"handle":{"type":["string","null"]},"displayName":{"type":["string","null"]},"avatarUrl":{"type":["string","null"]},"status":{"type":"string","enum":["active","reconnect_required","disconnected"]},"statusReason":{"type":["string","null"]}},"required":["id","platform","platformLabel","handle","displayName","avatarUrl","status","statusReason"],"additionalProperties":false},"preview":{"type":"string"},"titles":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"value":{"type":["string","null"]}},"required":["key","label","value"],"additionalProperties":false}},"mediaCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"scheduledAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"scheduleSource":{"anyOf":[{"type":"string","enum":["manual","queue"]},{"type":"null"}]},"confirmedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"nextQueueSlot":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"checks":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning"]},"segmentIndex":{"type":"integer","minimum":0,"maximum":9007199254740991},"field":{"type":"string"}},"required":["code","message","severity"],"additionalProperties":false}},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning"]},"segmentIndex":{"type":"integer","minimum":0,"maximum":9007199254740991},"field":{"type":"string"}},"required":["code","message","severity"],"additionalProperties":false}}},"required":["errors","warnings"],"additionalProperties":false},"approval":{"type":"object","properties":{"required":{"type":"boolean"},"state":{"type":"string","enum":["approved","changes_requested","voided","none"]},"signedOff":{"type":"boolean"},"verdicts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"reviewer":{"type":"object","properties":{"kind":{"type":"string","enum":["member","guest","agent","system"]},"accountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"agentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"guestId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"name":{"type":"string"}},"required":["kind","accountId","agentClientId","guestId","name"],"additionalProperties":false},"decision":{"type":"string","enum":["approved","changes_requested"]},"scope":{"type":"string","enum":["post","piece"]},"forVersion":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"voided":{"type":"boolean"},"counts":{"type":"boolean"},"at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","reviewer","decision","scope","forVersion","voided","counts","at"],"additionalProperties":false}}},"required":["required","state","signedOff","verdicts"],"additionalProperties":false},"nearDuplicates":{"type":"array","items":{"type":"object","properties":{"postId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"pieceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"pieceTitle":{"type":"string"},"state":{"type":"string","enum":["draft","ready","awaiting_confirmation","scheduled","publishing","published","failed_retrying","needs_attention","failed","manual"]},"at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"similarity":{"type":"number","minimum":0,"maximum":1},"url":{"type":"string"}},"required":["postId","pieceId","pieceTitle","state","at","similarity","url"],"additionalProperties":false}},"schedule":{"type":"object","properties":{"allowed":{"type":"boolean"},"needsConfirmation":{"type":"boolean"},"reasons":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}}},"required":["allowed","needsConfirmation","reasons"],"additionalProperties":false},"postNow":{"type":"object","properties":{"allowed":{"type":"boolean"},"alreadyDue":{"type":"boolean"},"reasons":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}}},"required":["allowed","alreadyDue","reasons"],"additionalProperties":false}},"required":["postId","version","state","isSkipped","format","formatLabel","channel","preview","titles","mediaCount","scheduledAt","scheduleSource","confirmedAt","nextQueueSlot","checks","approval","schedule","postNow"],"additionalProperties":false}},"summary":{"type":"object","properties":{"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"schedulable":{"type":"integer","minimum":0,"maximum":9007199254740991},"postableNow":{"type":"integer","minimum":0,"maximum":9007199254740991},"blocked":{"type":"integer","minimum":0,"maximum":9007199254740991},"skipped":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["total","schedulable","postableNow","blocked","skipped"],"additionalProperties":false}},"required":["piece","timeZone","callerMayPublish","versions","summary"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/get_results":{"post":{"operationId":"get_results","summary":"Get post results","description":"Read how published posts did: filter by content, by channel account, by platform, and/or by a publishedAt date range (from/to). For each post: its latest result metrics (impressions, views, likes, comments, shares, saves, clicks — platforms fill what they report), when they were last fetched (freshness), the full history of fetches, and metricsAvailable: false for a platform that reports no metrics at all (shown as 'not available on this platform', never as a stuck fetch). Results are fetched automatically about 1 hour, 24 hours and 7 days after a post goes live; a very recent post may have no snapshot yet.","tags":["workspace"],"x-heyeveryone-kind":"query","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"pieceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"channelAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"platform":{"type":"string","enum":["x","linkedin","threads","bluesky","instagram","facebook","tiktok","youtube","sandbox"]},"from":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"to":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"limit":{"default":50,"type":"integer","minimum":1,"maximum":200}},"required":["workspaceId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"posts":{"type":"array","items":{"type":"object","properties":{"postId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"pieceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"pieceTitle":{"type":"string"},"channelAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"platform":{"type":"string","enum":["x","linkedin","threads","bluesky","instagram","facebook","tiktok","youtube","sandbox"]},"handle":{"type":["string","null"]},"publishedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"permalink":{"type":["string","null"]},"metricsAvailable":{"type":"boolean"},"metrics":{"anyOf":[{"type":"object","properties":{"impressions":{"type":"number","minimum":0},"views":{"type":"number","minimum":0},"likes":{"type":"number","minimum":0},"comments":{"type":"number","minimum":0},"shares":{"type":"number","minimum":0},"saves":{"type":"number","minimum":0},"clicks":{"type":"number","minimum":0}},"additionalProperties":false},{"type":"null"}]},"fetchedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"snapshots":{"type":"array","items":{"type":"object","properties":{"fetchedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"metrics":{"type":"object","properties":{"impressions":{"type":"number","minimum":0},"views":{"type":"number","minimum":0},"likes":{"type":"number","minimum":0},"comments":{"type":"number","minimum":0},"shares":{"type":"number","minimum":0},"saves":{"type":"number","minimum":0},"clicks":{"type":"number","minimum":0}},"additionalProperties":false}},"required":["fetchedAt","metrics"],"additionalProperties":false}}},"required":["postId","pieceId","pieceTitle","channelAccountId","platform","handle","publishedAt","permalink","metricsAvailable","metrics","fetchedAt","snapshots"],"additionalProperties":false}}},"required":["posts"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/get_source":{"post":{"operationId":"get_source","summary":"Get a source","description":"One source in full: its note, transcript or fetched text, title, URL and fetch state. A URL source's text exists only once `fetchStatus` is fetched.","tags":["workspace"],"x-heyeveryone-kind":"query","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"sourceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},"required":["workspaceId","sourceId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"source":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"pieceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"kind":{"type":"string","enum":["url","media","note","transcript"]},"title":{"type":["string","null"]},"url":{"type":["string","null"]},"mediaAssetId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"note":{"type":["string","null"]},"fetchedText":{"type":["string","null"]},"fetchStatus":{"type":"string","enum":["not_applicable","pending","fetching","fetched","failed"]},"fetchError":{"type":["string","null"]},"fetchedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"createdByAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdByAgentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"description":{"type":["string","null"]}},"required":["id","workspaceId","pieceId","kind","title","url","mediaAssetId","note","fetchedText","fetchStatus","fetchError","fetchedAt","createdByAccountId","createdByAgentClientId","createdAt","updatedAt","description"],"additionalProperties":false}},"required":["source"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/get_template":{"post":{"operationId":"get_template","summary":"Get a template","description":"One content template in full: title pattern, original draft, campaign labels, target channel accounts with their text, and its placeholders. Placeholders are written `{name}` (a letter first; letters, digits, spaces, `_` or `-`), for example `{product}` or `{episode number}`; the template's `placeholders` lists them, and create_piece_from_template fills them from `values`.","tags":["workspace"],"x-heyeveryone-kind":"query","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"templateId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},"required":["workspaceId","templateId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"template":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"name":{"type":"string"},"description":{"type":["string","null"]},"titlePattern":{"type":"string"},"masterText":{"type":"string"},"campaignLabels":{"type":"array","items":{"type":"string"}},"channels":{"type":"array","items":{"type":"object","properties":{"channelAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"platform":{"type":"string","enum":["x","linkedin","threads","bluesky","instagram","facebook","tiktok","youtube","sandbox"]},"handle":{"type":["string","null"]},"displayName":{"type":["string","null"]},"status":{"type":"string","enum":["active","reconnect_required","disconnected"]},"format":{"anyOf":[{"type":"string","pattern":"^[a-z][a-z0-9_]*$"},{"type":"null"}]},"segments":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]}},"required":["channelAccountId","platform","handle","displayName","status","format","segments"],"additionalProperties":false}},"placeholders":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","name","description","titlePattern","masterText","campaignLabels","channels","placeholders","createdAt","updatedAt"],"additionalProperties":false}},"required":["template"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/get_tiktok_creator_info":{"post":{"operationId":"get_tiktok_creator_info","summary":"Get a TikTok account's creator info","description":"What TikTok last said about a TikTok account (or a Sandbox account that behaves like TikTok): the creator's nickname and username, the privacy levels they may choose (privacyLevelOptions: pick privacyLevel from these; there is no default), whether they turned comments, Duet or Stitch off (then allowComment / allowDuet / allowStitch must stay false), the longest video they may post (maxVideoPostDurationSec), and canPost: false with cannotPostReason when TikTok says they can't post right now (a daily cap; try again later, don't post). `fetchedAt` says when TikTok answered; `stale` is true when there is no answer or it is over five minutes old: call refresh_tiktok_creator_info first, then this again. `lastError` is a failed read that came after the answer. Read-only; never costs credits.","tags":["workspace"],"x-heyeveryone-kind":"query","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"channelAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},"required":["workspaceId","channelAccountId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"channelAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"info":{"anyOf":[{"type":"object","properties":{"nickname":{"type":["string","null"]},"username":{"type":["string","null"]},"privacyLevelOptions":{"type":"array","items":{"type":"string"}},"commentDisabled":{"type":"boolean"},"duetDisabled":{"type":"boolean"},"stitchDisabled":{"type":"boolean"},"maxVideoPostDurationSec":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"canPost":{"type":"boolean"},"cannotPostCode":{"type":["string","null"]},"cannotPostReason":{"type":["string","null"]},"fetchedAt":{"type":"string"},"source":{"type":"string","enum":["tiktok","sandbox"]}},"required":["nickname","username","privacyLevelOptions","commentDisabled","duetDisabled","stitchDisabled","maxVideoPostDurationSec","canPost","cannotPostCode","cannotPostReason","fetchedAt","source"],"additionalProperties":false},{"type":"null"}]},"lastError":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"at":{"type":"string"}},"required":["code","message","at"],"additionalProperties":false},{"type":"null"}]},"stale":{"type":"boolean"}},"required":["channelAccountId","info","lastError","stale"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Service-specific errors: not_tiktok","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/get_transcript":{"post":{"operationId":"get_transcript","summary":"Get a transcript","description":"Read one transcription run's status and, once ready, its text, segments and subtitle files.","tags":["workspace"],"x-heyeveryone-kind":"query","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"transcriptId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},"required":["workspaceId","transcriptId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"transcript":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"mediaAssetId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"status":{"type":"string","enum":["pending","processing","ready","failed"]},"provider":{"type":"string"},"language":{"type":["string","null"]},"text":{"type":["string","null"]},"segments":{"type":"array","items":{"type":"object","properties":{"startMs":{"type":"number"},"endMs":{"type":"number"},"text":{"type":"string"}},"required":["startMs","endMs","text"],"additionalProperties":false}},"srt":{"type":["string","null"]},"vtt":{"type":["string","null"]},"error":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","workspaceId","mediaAssetId","status","provider","language","text","segments","srt","vtt","error","createdAt","updatedAt"],"additionalProperties":false}},"required":["transcript"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Service-specific errors: not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/get_utm_settings":{"post":{"operationId":"get_utm_settings","summary":"Get UTM tagging settings","description":"Read this workspace's UTM tagging defaults for links in published posts: whether tagging is on (enabled), the utm_medium override (default 'social' when null), and the utm_campaign override (default: the content item's campaign label, or its id, when null). utm_source is always the platform and is not editable.","tags":["workspace"],"x-heyeveryone-kind":"query","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},"required":["workspaceId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"settings":{"type":"object","properties":{"enabled":{"type":"boolean"},"utmMedium":{"type":["string","null"]},"utmCampaign":{"type":["string","null"]}},"required":["enabled","utmMedium","utmCampaign"],"additionalProperties":false}},"required":["settings"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/get_voice_profile":{"post":{"operationId":"get_voice_profile","summary":"Get the voice profile","description":"Read the workspace's voice profile (how this brand writes): the plain-language description, structured traits and the samples it was built from. Returns null if none has been built yet.","tags":["workspace"],"x-heyeveryone-kind":"query","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},"required":["workspaceId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"voiceProfile":{"anyOf":[{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"description":{"type":"string"},"traits":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"samples":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string"},"source":{"type":"string"}},"required":["text"],"additionalProperties":false}},"updatedByAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"updatedByAgentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["workspaceId","description","traits","samples","updatedByAccountId","updatedByAgentClientId","createdAt","updatedAt"],"additionalProperties":false},{"type":"null"}]}},"required":["voiceProfile"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/get_workspace":{"post":{"operationId":"get_workspace","summary":"Get a workspace","description":"Read one workspace with its settings: name, slug, time zone (the calendar and queue run in it), the default lifetime of review links, whether new content requires sign-off, your role, and how many members, connected channels and content items it has.","tags":["workspace"],"x-heyeveryone-kind":"query","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},"required":["workspaceId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"name":{"type":"string"},"slug":{"type":"string"},"timeZone":{"type":"string"},"shareLinkExpiresDays":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"signoffDefault":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"role":{"type":"string","enum":["owner","editor"]},"billingOwnerAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"counts":{"type":"object","properties":{"members":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"channelAccounts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"pieces":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["members","channelAccounts","pieces"],"additionalProperties":false}},"required":["id","name","slug","timeZone","shareLinkExpiresDays","signoffDefault","createdAt","role","billingOwnerAccountId","counts"],"additionalProperties":false}},"required":["workspace"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/import_content":{"post":{"operationId":"import_content","summary":"Import content","description":"Import a file exported from Buffer or Typefully, or a CSV, into this workspace: each item becomes content on the board (Idea, Drafting or In review) with its text as the original draft, its tags as campaigns and its date as a planning date, plus a draft post for each channel it names that has a connected account. Nothing is ever scheduled or published on import: a person schedules the drafts later. Call preview_import first and show the person what will be created and skipped. The whole file imports or nothing does. Idempotent per file and options: importing the same file again with the same format, `defaultChannelAccountId` and `includePublished` creates nothing and returns the earlier import (`alreadyImported: true`); with other options it imports again, and items already imported (with any file) are skipped one by one, so e.g. turning on includePublished brings in only the published items. An item without a channel of its own imported with another default channel counts as a new item. Formats and limits: as in preview_import. Free: imports never cost credits.","tags":["workspace"],"x-heyeveryone-kind":"mutation","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"content":{"type":"string","maxLength":1048576},"format":{"default":"auto","type":"string","enum":["auto","csv","buffer","buffer_insights","typefully"]},"fileName":{"type":"string","minLength":1,"maxLength":255},"defaultChannelAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"includePublished":{"default":false,"type":"boolean"}},"required":["workspaceId","content"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"import":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"fileName":{"type":["string","null"]},"format":{"type":"string","enum":["csv","buffer","buffer_insights","typefully"]},"formatLabel":{"type":"string"},"rowCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"createdCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"skippedCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"postCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"createdByAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdByAgentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"defaultChannelAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"includePublished":{"type":"boolean"}},"required":["id","fileName","format","formatLabel","rowCount","createdCount","skippedCount","postCount","createdAt","createdByAccountId","createdByAgentClientId","defaultChannelAccountId","includePublished"],"additionalProperties":false},"alreadyImported":{"type":"boolean"},"rows":{"type":"array","items":{"type":"object","properties":{"row":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"action":{"type":"string","enum":["create","skip"]},"reason":{"type":["string","null"]},"title":{"type":"string"},"excerpt":{"type":"string"},"status":{"type":"string","enum":["idea","drafting","in_review"]},"plannedFor":{"type":["string","null"]},"labels":{"type":"array","items":{"type":"string"}},"channels":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"platform":{"anyOf":[{"type":"string","enum":["x","linkedin","threads","bluesky","instagram","facebook","tiktok","youtube","sandbox"]},{"type":"null"}]},"channelAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"handle":{"type":["string","null"]},"issue":{"anyOf":[{"type":"object","properties":{"label":{"type":"string"},"message":{"type":"string"}},"required":["label","message"],"additionalProperties":false},{"type":"null"}]}},"required":["name","platform","channelAccountId","handle","issue"],"additionalProperties":false}},"warnings":{"type":"array","items":{"type":"string"}},"pieceId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]}},"required":["row","action","reason","title","excerpt","status","plannedFor","labels","channels","warnings","pieceId"],"additionalProperties":false}},"summary":{"type":"object","properties":{"rows":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"create":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"skip":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"posts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["rows","create","skip","posts"],"additionalProperties":false},"pieceIds":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}},"required":["import","alreadyImported","rows","summary","pieceIds"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Service-specific errors: invalid_file, file_too_large, too_many_rows","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/link_post_to_channel_post":{"post":{"operationId":"link_post_to_channel_post","summary":"Link a post to its live post","description":"Mark that post published, linked to the live post picked from find_post_on_channel (id, link and time re-read from the platform). Never retries. Needs publish permission.","tags":["workspace"],"x-heyeveryone-kind":"mutation","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"postId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"platformPostId":{"type":"string","minLength":1,"maxLength":512}},"required":["workspaceId","postId","platformPostId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"postId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"platformPostId":{"type":"string"},"permalink":{"type":["string","null"]},"publishedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"readCost":{"anyOf":[{"type":"object","properties":{"estimatedUsd":{"type":"number","minimum":0},"postsRead":{"type":"integer","minimum":0,"maximum":9007199254740991},"note":{"type":"string"}},"required":["estimatedUsd","postsRead","note"],"additionalProperties":false},{"type":"null"}]}},"required":["postId","platformPostId","permalink","publishedAt","readCost"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Service-specific errors: not_findable, channel_needs_reconnect, not_configured, platform_unavailable, connection_refreshing, not_on_channel, already_linked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/list_channel_accounts":{"post":{"operationId":"list_channel_accounts","summary":"List channel accounts","description":"List the social accounts connected to a workspace (X, LinkedIn, Threads, Bluesky, Instagram, Facebook Pages, TikTok, YouTube, and Sandbox test accounts), with each one's status. Use the returned id as channelAccountId when creating or validating posts. status 'reconnect_required' means a person must reconnect it before posts can go out; access 'pending_review' means posts go to a post kit for manual posting; 'private_only' means posts are published privately for now. Disconnected accounts are hidden unless includeDisconnected is true. Never returns tokens.","tags":["workspace"],"x-heyeveryone-kind":"query","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"platform":{"type":"string","enum":["x","linkedin","threads","bluesky","instagram","facebook","tiktok","youtube","sandbox"]},"includeDisconnected":{"default":false,"type":"boolean"}},"required":["workspaceId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"channelAccounts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"platform":{"type":"string","enum":["x","linkedin","threads","bluesky","instagram","facebook","tiktok","youtube","sandbox"]},"externalId":{"type":"string"},"handle":{"type":["string","null"]},"displayName":{"type":["string","null"]},"avatarUrl":{"type":["string","null"]},"accountType":{"type":["string","null"]},"status":{"type":"string","enum":["active","reconnect_required","disconnected"]},"statusReason":{"type":["string","null"]},"scopes":{"type":"array","items":{"type":"string"}},"tokenExpiresAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"lastHealthCheckAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"createdByAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdByAgentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"platformLabel":{"type":"string"},"access":{"type":"string","enum":["available","pending_review","private_only"]},"feedUrl":{"type":["string","null"]},"emulates":{"anyOf":[{"type":"string","enum":["x","linkedin","threads","bluesky","instagram","facebook","tiktok","youtube"]},{"type":"null"}]}},"required":["id","workspaceId","platform","externalId","handle","displayName","avatarUrl","accountType","status","statusReason","scopes","tokenExpiresAt","lastHealthCheckAt","metadata","createdByAccountId","createdByAgentClientId","createdAt","updatedAt","platformLabel","access","feedUrl","emulates"],"additionalProperties":false}}},"required":["channelAccounts"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/list_comments":{"post":{"operationId":"list_comments","summary":"List comments","description":"Read the comments on content, oldest first, from members, reviewers (guests on a share link) and agents. Filter by `postId` or `target`, and leave out resolved ones with `includeResolved: false`. Each comment says who wrote it and, for comments on a text range, whether the quoted text is still there (`anchorStatus` current or moved, with `currentRange`) or `outdated` (the text changed; read `quotedText`). Replies carry `parentCommentId`. Address feedback, then resolve_comment.","tags":["workspace"],"x-heyeveryone-kind":"query","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"pieceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"postId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"target":{"type":"string","enum":["piece","master","post"]},"includeResolved":{"default":true,"type":"boolean"}},"required":["workspaceId","pieceId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"comments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"pieceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"target":{"type":"string","enum":["piece","master","post"]},"postId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"segmentIndex":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"rangeStart":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"rangeEnd":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"quotedText":{"type":["string","null"]},"anchorVersion":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"parentCommentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"body":{"type":"string"},"authorKind":{"type":"string","enum":["member","guest","agent"]},"authorAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"authorGuestId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"authorAgentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"resolvedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"resolvedByAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"author":{"type":"object","properties":{"kind":{"type":"string","enum":["member","guest","agent","system"]},"accountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"agentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"guestId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"name":{"type":"string"}},"required":["kind","accountId","agentClientId","guestId","name"],"additionalProperties":false},"anchorStatus":{"type":"string","enum":["whole","current","moved","outdated"]},"outdated":{"type":"boolean"},"currentRange":{"anyOf":[{"type":"object","properties":{"start":{"type":"integer","minimum":0,"maximum":9007199254740991},"end":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["start","end"],"additionalProperties":false},{"type":"null"}]}},"required":["id","workspaceId","pieceId","target","postId","segmentIndex","rangeStart","rangeEnd","quotedText","anchorVersion","parentCommentId","body","authorKind","authorAccountId","authorGuestId","authorAgentClientId","resolvedAt","resolvedByAccountId","createdAt","updatedAt","author","anchorStatus","outdated","currentRange"],"additionalProperties":false}}},"required":["comments"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/list_content":{"post":{"operationId":"list_content","summary":"List content","description":"The content list of a workspace, newest activity first: one row per content item with its title, the start of its original draft, and its channel versions. Filter with `filter`: `in_progress` (being written: no channel version yet, or a version that is a draft, ready, awaiting confirmation, failed, needs attention or with the post kit), `scheduled` (scheduled, publishing or retrying) or `published`. A content item with versions in different states appears under each matching filter, and `matchingPostIds` names the versions that matched. `text` searches the title, the original draft and the channel text. `counts` gives the size of each filter for the same search. Hidden (skipped) versions are listed but never match a filter. Use get_piece for the full content.","tags":["workspace"],"x-heyeveryone-kind":"query","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"filter":{"type":"string","enum":["in_progress","scheduled","published"]},"text":{"type":"string","minLength":1,"maxLength":200},"includeArchived":{"default":false,"type":"boolean"},"limit":{"default":50,"type":"integer","minimum":1,"maximum":200},"offset":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["workspaceId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"pieceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"title":{"type":"string"},"excerpt":{"type":"string"},"status":{"type":"string","enum":["idea","drafting","in_review","scheduled","published"]},"plannedFor":{"type":["string","null"]},"buckets":{"type":"array","items":{"type":"string","enum":["in_progress","scheduled","published"]}},"matchingPostIds":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},"channels":{"type":"array","items":{"type":"object","properties":{"postId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"channelAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"platform":{"type":"string","enum":["x","linkedin","threads","bluesky","instagram","facebook","tiktok","youtube","sandbox"]},"handle":{"type":["string","null"]},"displayName":{"type":["string","null"]},"state":{"type":"string","enum":["draft","ready","awaiting_confirmation","scheduled","publishing","published","failed_retrying","needs_attention","failed","manual"]},"isSkipped":{"type":"boolean"},"bucket":{"anyOf":[{"type":"string","enum":["in_progress","scheduled","published"]},{"type":"null"}]},"scheduledAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"publishedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]}},"required":["postId","channelAccountId","platform","handle","displayName","state","isSkipped","bucket","scheduledAt","publishedAt"],"additionalProperties":false}},"attention":{"type":"boolean"},"draftedByAgent":{"type":["string","null"]},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["pieceId","workspaceId","title","excerpt","status","plannedFor","buckets","matchingPostIds","channels","attention","draftedByAgent","updatedAt"],"additionalProperties":false}},"counts":{"type":"object","properties":{"in_progress":{"type":"integer","minimum":0,"maximum":9007199254740991},"scheduled":{"type":"integer","minimum":0,"maximum":9007199254740991},"published":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["in_progress","scheduled","published"],"additionalProperties":false},"hasMore":{"type":"boolean"}},"required":["items","counts","hasMore"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/list_credit_ledger":{"post":{"operationId":"list_credit_ledger","summary":"List credit history","description":"List the account's credit history, newest first: grants (sign-up and monthly allowance), top-ups, spends on AI actions (with what they were for), refunds of failed AI actions, and staff adjustments. The balance is always the sum of these entries. Pass `cursor` from the previous page to see older entries.","tags":["account"],"x-heyeveryone-kind":"query","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"limit":{"default":50,"type":"integer","minimum":1,"maximum":200},"cursor":{"type":"string","pattern":"^(\\d{4}-\\d{2}-\\d{2}T[^|]+)\\|([0-9a-f-]{36})$"},"accountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"accountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"balance":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"entries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"accountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"kind":{"type":"string","enum":["grant","spend","refund","topup","adjustment"]},"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"reason":{"type":"string"},"idempotencyKey":{"type":"string"},"refersToEntryId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"workspaceId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"createdByAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdByAgentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","accountId","kind","amount","reason","idempotencyKey","refersToEntryId","workspaceId","metadata","createdByAccountId","createdByAgentClientId","createdAt"],"additionalProperties":false}},"nextCursor":{"type":["string","null"]}},"required":["accountId","balance","entries","nextCursor"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/list_imports":{"post":{"operationId":"list_imports","summary":"List imports","description":"List the files imported into this workspace (import_content), newest first: file name, format, when, who, and how many items were created or skipped and how many draft posts were added. Use it to check whether a file was already imported before importing it again (the same file with the same options imports once), and the options each import used (`defaultChannelAccountId`, `includePublished`).","tags":["workspace"],"x-heyeveryone-kind":"query","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"limit":{"default":20,"type":"integer","minimum":1,"maximum":100}},"required":["workspaceId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"imports":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"fileName":{"type":["string","null"]},"format":{"type":"string","enum":["csv","buffer","buffer_insights","typefully"]},"formatLabel":{"type":"string"},"rowCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"createdCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"skippedCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"postCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"createdByAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdByAgentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"defaultChannelAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"includePublished":{"type":"boolean"}},"required":["id","fileName","format","formatLabel","rowCount","createdCount","skippedCount","postCount","createdAt","createdByAccountId","createdByAgentClientId","defaultChannelAccountId","includePublished"],"additionalProperties":false}}},"required":["imports"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/list_media":{"post":{"operationId":"list_media","summary":"List media","description":"List the workspace's media library, newest first: images and finished videos with their status (uploading, processing, ready, failed), dimensions, duration, alt text, public URL, cover frames, and fitsPlatforms (the platforms whose formats take the file as is, from the capability matrix). Filter by kind, status, a platform the file must fit (fitsPlatform), or a file-name search (query). Pages of `limit` items; pass nextCursor back as cursor for the next page. Use get_media for one asset's per-format fit details and where it is used.","tags":["workspace"],"x-heyeveryone-kind":"query","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"kind":{"type":"string","enum":["image","video"]},"status":{"type":"string","enum":["uploading","processing","ready","failed"]},"fitsPlatform":{"type":"string","enum":["x","linkedin","threads","bluesky","instagram","facebook","tiktok","youtube","sandbox"]},"query":{"type":"string","maxLength":200},"limit":{"default":60,"type":"integer","minimum":1,"maximum":200},"cursor":{"type":"string","maxLength":200}},"required":["workspaceId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"mediaAssets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"kind":{"type":"string","enum":["image","video"]},"status":{"type":"string","enum":["uploading","processing","ready","failed"]},"storageProvider":{"type":"string","enum":["supabase","r2"]},"storageBucket":{"type":"string"},"storageKey":{"type":"string"},"publicUrl":{"type":["string","null"]},"filename":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":["string","null"]},"width":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"height":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"durationMs":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"probe":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"probeError":{"type":["string","null"]},"covers":{"type":"array","items":{"type":"object","properties":{"storageKey":{"type":"string"},"width":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"height":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"atMs":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["storageKey","width","height","atMs"],"additionalProperties":false}},"altText":{"type":["string","null"]},"createdByAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdByAgentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"previewUrl":{"type":["string","null"]},"coverFrames":{"type":"array","items":{"type":"object","properties":{"atMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"width":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"height":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"url":{"type":"string"}},"required":["atMs","width","height","url"],"additionalProperties":false}},"fitsPlatforms":{"type":"array","items":{"type":"string","enum":["x","linkedin","threads","bluesky","instagram","facebook","tiktok","youtube","sandbox"]}}},"required":["id","workspaceId","kind","status","storageProvider","storageBucket","storageKey","publicUrl","filename","mimeType","sizeBytes","width","height","durationMs","probe","probeError","covers","altText","createdByAccountId","createdByAgentClientId","createdAt","updatedAt","previewUrl","coverFrames","fitsPlatforms"],"additionalProperties":false}},"nextCursor":{"type":["string","null"]},"storage":{"type":"object","properties":{"videos":{"type":"string","enum":["r2","supabase"]},"videoStandIn":{"type":"boolean"}},"required":["videos","videoStandIn"],"additionalProperties":false}},"required":["mediaAssets","nextCursor","storage"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/list_members":{"post":{"operationId":"list_members","summary":"List workspace members","description":"List the people in a workspace with their role (owner or editor), and, for owners, the invites that are still open. `seats` shows how many members the plan allows in this workspace (open invites count). Use it to know who can review or sign off. Read-only.","tags":["workspace"],"x-heyeveryone-kind":"query","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},"required":["workspaceId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"members":{"type":"array","items":{"type":"object","properties":{"accountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"email":{"type":"string"},"displayName":{"type":["string","null"]},"role":{"type":"string","enum":["owner","editor"]},"joinedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"isYou":{"type":"boolean"},"isBillingOwner":{"type":"boolean"}},"required":["accountId","email","displayName","role","joinedAt","isYou","isBillingOwner"],"additionalProperties":false}},"invites":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"email":{"type":"string"},"role":{"type":"string","enum":["owner","editor"]},"invitedBy":{"type":["string","null"]},"expiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"expired":{"type":"boolean"},"emailStatus":{"type":"string","enum":["sending","retrying","sent","not_sent"]}},"required":["id","email","role","invitedBy","expiresAt","createdAt","expired","emailStatus"],"additionalProperties":false}},"yourRole":{"type":"string","enum":["owner","editor"]},"seats":{"type":"object","properties":{"used":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"max":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["used","max"],"additionalProperties":false}},"required":["members","invites","yourRole","seats"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/list_needs_you":{"post":{"operationId":"list_needs_you","summary":"List what needs a human","description":"Everything waiting on a person, across all your workspaces (or one, with `workspaceId`): failed posts, posts that need attention (unclear outcome or expired token), posts handed to the post kit for manual posting, agent requests awaiting confirmation, channel connections that need reconnecting or expire within 7 days, and open feedback (unresolved comments from others and \"Needs changes\" verdicts). Each item has a plain-words reason and fix; `counts` feeds the badge. Agents can read it to report status, but only people confirm.","tags":["account"],"x-heyeveryone-kind":"query","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["failed","needs_attention","manual","awaiting_confirmation","expiring_connection","feedback"]},"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"workspaceName":{"type":"string"},"title":{"type":"string"},"reason":{"type":["string","null"]},"fix":{"type":["string","null"]},"pieceId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"pieceTitle":{"type":["string","null"]},"postId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"postVersion":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"commentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"channelAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"platform":{"anyOf":[{"type":"string","enum":["x","linkedin","threads","bluesky","instagram","facebook","tiktok","youtube","sandbox"]},{"type":"null"}]},"emulates":{"anyOf":[{"type":"string","enum":["x","linkedin","threads","bluesky","instagram","facebook","tiktok","youtube"]},{"type":"null"}]},"at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"from":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["member","guest","agent","system"]},"accountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"agentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"guestId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"name":{"type":"string"}},"required":["kind","accountId","agentClientId","guestId","name"],"additionalProperties":false},{"type":"null"}]},"error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"fix":{"type":"string"}},"required":["code","message"],"additionalProperties":false},{"type":"null"}]}},"required":["kind","workspaceId","workspaceName","title","reason","fix","pieceId","pieceTitle","postId","commentId","channelAccountId","platform","emulates","at","from","error"],"additionalProperties":false}},"counts":{"type":"object","properties":{"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"failed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"needs_attention":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"manual":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"awaiting_confirmation":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"expiring_connection":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"feedback":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["total","failed","needs_attention","manual","awaiting_confirmation","expiring_connection","feedback"],"additionalProperties":false}},"required":["items","counts"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/list_notifications":{"post":{"operationId":"list_notifications","summary":"List notifications","description":"List your notifications, newest first: failed posts, posts that need you or must be posted by hand, late posts, channels to reconnect or expiring, feedback from reviewers, and agent requests waiting for confirmation. Filter to one workspace or to unread ones. Page with `before` (the nextCursor of the previous page). Each has a link to where to act.","tags":["account"],"x-heyeveryone-kind":"query","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"unreadOnly":{"default":false,"type":"boolean"},"limit":{"default":30,"type":"integer","minimum":1,"maximum":100},"before":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"notifications":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"accountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"workspaceId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"kind":{"type":"string"},"title":{"type":"string"},"body":{"type":["string","null"]},"link":{"type":["string","null"]},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"readAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"emailedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","accountId","workspaceId","kind","title","body","link","data","readAt","emailedAt","createdAt"],"additionalProperties":false}},"unreadCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"nextCursor":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]}},"required":["notifications","unreadCount","nextCursor"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/list_piece_comments":{"post":{"operationId":"list_piece_comments","summary":"List comments across all versions","description":"Every comment on a content item, oldest first, from the whole content, the original draft and every channel version, each with `version` saying where it is (`label` like \"Original draft\" or \"LinkedIn · @acme\", `currentVersion`). Same comment fields as list_comments (author, anchor status, replies via `parentCommentId`). `versions` lists every version, with or without comments, for grouping. Leave out resolved comments with `includeResolved: false`.","tags":["workspace"],"x-heyeveryone-kind":"query","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"pieceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"includeResolved":{"default":true,"type":"boolean"}},"required":["workspaceId","pieceId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"comments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"pieceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"target":{"type":"string","enum":["piece","master","post"]},"postId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"segmentIndex":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"rangeStart":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"rangeEnd":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"quotedText":{"type":["string","null"]},"anchorVersion":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"parentCommentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"body":{"type":"string"},"authorKind":{"type":"string","enum":["member","guest","agent"]},"authorAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"authorGuestId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"authorAgentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"resolvedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"resolvedByAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"author":{"type":"object","properties":{"kind":{"type":"string","enum":["member","guest","agent","system"]},"accountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"agentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"guestId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"name":{"type":"string"}},"required":["kind","accountId","agentClientId","guestId","name"],"additionalProperties":false},"anchorStatus":{"type":"string","enum":["whole","current","moved","outdated"]},"outdated":{"type":"boolean"},"currentRange":{"anyOf":[{"type":"object","properties":{"start":{"type":"integer","minimum":0,"maximum":9007199254740991},"end":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["start","end"],"additionalProperties":false},{"type":"null"}]},"version":{"type":"object","properties":{"key":{"type":"string"},"target":{"type":"string","enum":["piece","master","post"]},"postId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"channelAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"platform":{"anyOf":[{"type":"string","enum":["x","linkedin","threads","bluesky","instagram","facebook","tiktok","youtube","sandbox"]},{"type":"null"}]},"handle":{"type":["string","null"]},"label":{"type":"string"},"currentVersion":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"isSkipped":{"type":"boolean"}},"required":["key","target","postId","channelAccountId","platform","handle","label","currentVersion","isSkipped"],"additionalProperties":false}},"required":["id","workspaceId","pieceId","target","postId","segmentIndex","rangeStart","rangeEnd","quotedText","anchorVersion","parentCommentId","body","authorKind","authorAccountId","authorGuestId","authorAgentClientId","resolvedAt","resolvedByAccountId","createdAt","updatedAt","author","anchorStatus","outdated","currentRange","version"],"additionalProperties":false}},"versions":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"target":{"type":"string","enum":["piece","master","post"]},"postId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"channelAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"platform":{"anyOf":[{"type":"string","enum":["x","linkedin","threads","bluesky","instagram","facebook","tiktok","youtube","sandbox"]},{"type":"null"}]},"handle":{"type":["string","null"]},"label":{"type":"string"},"currentVersion":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"isSkipped":{"type":"boolean"}},"required":["key","target","postId","channelAccountId","platform","handle","label","currentVersion","isSkipped"],"additionalProperties":false}},"counts":{"type":"object","properties":{"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"open":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["total","open"],"additionalProperties":false}},"required":["comments","versions","counts"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/list_proposals":{"post":{"operationId":"list_proposals","summary":"List suggestions","description":"Suggested edits waiting for (or decided by) a person, newest first: from built-in AI (adapt_piece with `mode: propose`, rewrite_text with `proposeFor`) and from agents (propose_edit). Filter by `pieceId` and/or `postId`; `status` defaults to pending. Each has its author, the version it was made against, the suggested content, and `stale` (with `staleReason`) when the content has changed since, in which case it can only be rejected.","tags":["workspace"],"x-heyeveryone-kind":"query","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"pieceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"postId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"status":{"default":["pending"],"minItems":1,"type":"array","items":{"type":"string","enum":["pending","accepted","rejected"]}},"limit":{"default":50,"type":"integer","minimum":1,"maximum":200}},"required":["workspaceId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"proposals":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"pieceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"target":{"type":"string","enum":["master","post"]},"postId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"channelAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"format":{"anyOf":[{"type":"string","pattern":"^[a-z][a-z0-9_]*$"},{"type":"null"}]},"baseVersion":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"content":{"type":"object","properties":{"text":{"type":"string"},"segments":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string"},"media":{"type":"array","items":{"type":"object","properties":{"mediaAssetId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"altText":{"type":"string","maxLength":2000}},"required":["mediaAssetId"],"additionalProperties":false}}},"required":["text","media"],"additionalProperties":false}}},"additionalProperties":false},"origin":{"type":"string","enum":["adapt_piece","rewrite_text","agent","member"]},"note":{"type":["string","null"]},"creditsSpent":{"type":"integer","minimum":0,"maximum":9007199254740991},"status":{"type":"string","enum":["pending","accepted","rejected"]},"stale":{"type":"boolean"},"staleReason":{"type":["string","null"]},"currentVersion":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"author":{"type":"object","properties":{"kind":{"type":"string","enum":["member","guest","agent","system"]},"accountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"agentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"guestId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"name":{"type":"string"}},"required":["kind","accountId","agentClientId","guestId","name"],"additionalProperties":false},"decidedBy":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["member","guest","agent","system"]},"accountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"agentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"guestId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"name":{"type":"string"}},"required":["kind","accountId","agentClientId","guestId","name"],"additionalProperties":false},{"type":"null"}]},"decidedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"decisionNote":{"type":["string","null"]},"resultVersion":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","workspaceId","pieceId","target","postId","channelAccountId","format","baseVersion","content","origin","note","creditsSpent","status","stale","staleReason","currentVersion","author","decidedBy","decidedAt","decisionNote","resultVersion","createdAt"],"additionalProperties":false}}},"required":["proposals"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/list_queue_slots":{"post":{"operationId":"list_queue_slots","summary":"List queue slots","description":"Read the weekly queue slots of the workspace's channel accounts (or one, with `channelAccountId`): the days and local times, in the workspace's time zone, that add_to_queue fills. Each queue also lists its next free slot times. Days are 0 = Monday ... 6 = Sunday.","tags":["workspace"],"x-heyeveryone-kind":"query","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"channelAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},"required":["workspaceId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"timeZone":{"type":"string"},"queues":{"type":"array","items":{"type":"object","properties":{"channelAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"slots":{"type":"array","items":{"type":"object","properties":{"dayOfWeek":{"type":"integer","minimum":0,"maximum":6},"localTime":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"day":{"type":"string"}},"required":["dayOfWeek","localTime","id","day"],"additionalProperties":false}},"nextFree":{"type":"array","items":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}}},"required":["channelAccountId","slots","nextFree"],"additionalProperties":false}}},"required":["timeZone","queues"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/list_recent_pieces":{"post":{"operationId":"list_recent_pieces","summary":"List recently opened content","description":"The content the person last opened in this workspace, most recent first (the sidebar's Recents), with its board stage and platforms. Archived content is left out. For an agent, this is the list of the account it acts for.","tags":["workspace"],"x-heyeveryone-kind":"query","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"limit":{"default":8,"type":"integer","minimum":1,"maximum":20}},"required":["workspaceId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"pieceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"title":{"type":"string"},"stage":{"type":"string","enum":["idea","drafting","in_review","scheduled","published"]},"platforms":{"type":"array","items":{"type":"string","enum":["x","linkedin","threads","bluesky","instagram","facebook","tiktok","youtube","sandbox"]}},"visitedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["pieceId","title","stage","platforms","visitedAt"],"additionalProperties":false}}},"required":["items"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/list_snippets":{"post":{"operationId":"list_snippets","summary":"List snippets","description":"The workspace's snippets: short reusable text (a sign-off, a disclaimer, a hashtag set) people insert into drafts from the editor. Sorted by name; filter by `text` (name or body). To use one in content, put its `body` into the text you pass to update_master or update_post.","tags":["workspace"],"x-heyeveryone-kind":"query","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"text":{"type":"string","minLength":1,"maxLength":200}},"required":["workspaceId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"snippets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"name":{"type":"string"},"body":{"type":"string"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","name","body","createdAt","updatedAt"],"additionalProperties":false}}},"required":["snippets"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/list_sources":{"post":{"operationId":"list_sources","summary":"List sources","description":"Every source attached to the workspace's content (URLs, notes, media, transcripts), newest first, with the content item it belongs to, an excerpt and its fetch state (a URL is only read once `fetchStatus` is fetched). Filter by `pieceId`, `kind` or `text` (title, URL, note or fetched text). Read one source in full with get_source; add one with add_source.","tags":["workspace"],"x-heyeveryone-kind":"query","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"pieceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"kind":{"minItems":1,"type":"array","items":{"type":"string","enum":["url","media","note","transcript"]}},"text":{"type":"string","minLength":1,"maxLength":200},"includeArchived":{"default":false,"type":"boolean"},"limit":{"default":50,"type":"integer","minimum":1,"maximum":100},"offset":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["workspaceId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"sources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"pieceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"pieceTitle":{"type":"string"},"kind":{"type":"string","enum":["url","media","note","transcript"]},"title":{"type":["string","null"]},"url":{"type":["string","null"]},"mediaAssetId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"excerpt":{"type":"string"},"textLength":{"type":"integer","minimum":0,"maximum":9007199254740991},"fetchStatus":{"type":"string","enum":["not_applicable","pending","fetching","fetched","failed"]},"fetchError":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","pieceId","pieceTitle","kind","title","url","mediaAssetId","excerpt","textLength","fetchStatus","fetchError","createdAt","updatedAt"],"additionalProperties":false}},"hasMore":{"type":"boolean"}},"required":["sources","hasMore"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/list_templates":{"post":{"operationId":"list_templates","summary":"List templates","description":"The workspace's content templates (recurring formats such as a launch, changelog or episode), by name, each with its title pattern, original draft, campaign labels, target channel accounts (with their own text, or null to start from the original draft) and the `placeholders` to fill. Filter by `text` (name, description or title pattern). Create content from one with create_piece_from_template.","tags":["workspace"],"x-heyeveryone-kind":"query","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"text":{"type":"string","minLength":1,"maxLength":200}},"required":["workspaceId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"templates":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"name":{"type":"string"},"description":{"type":["string","null"]},"titlePattern":{"type":"string"},"masterText":{"type":"string"},"campaignLabels":{"type":"array","items":{"type":"string"}},"channels":{"type":"array","items":{"type":"object","properties":{"channelAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"platform":{"type":"string","enum":["x","linkedin","threads","bluesky","instagram","facebook","tiktok","youtube","sandbox"]},"handle":{"type":["string","null"]},"displayName":{"type":["string","null"]},"status":{"type":"string","enum":["active","reconnect_required","disconnected"]},"format":{"anyOf":[{"type":"string","pattern":"^[a-z][a-z0-9_]*$"},{"type":"null"}]},"segments":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]}},"required":["channelAccountId","platform","handle","displayName","status","format","segments"],"additionalProperties":false}},"placeholders":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","name","description","titlePattern","masterText","campaignLabels","channels","placeholders","createdAt","updatedAt"],"additionalProperties":false}}},"required":["templates"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/list_updates":{"post":{"operationId":"list_updates","summary":"List updates","description":"The Updates feed, across all your workspaces (or one, with `workspaceId`), in groups: `publishing` (failed posts, unclear outcomes, posts waiting in the post kit, connections to fix), `requests` (agent scheduling requests awaiting confirmation, pending suggested edits, and open review requests for content you own), `feedback` (open comments and \"Needs changes\"), and `activity` (posts published and approvals given in the last `sinceDays` days, 7 by default; informational). Each item has a stable `key`, a plain-words reason and fix, and an `href` to the affected content. `counts` covers only what waits on a person. Reading it changes nothing: people confirm, resolve and accept through their own services. list_needs_you remains for the same actionable items without grouping.","tags":["account"],"x-heyeveryone-kind":"query","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"sinceDays":{"default":7,"type":"integer","minimum":1,"maximum":30}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"groups":{"type":"object","properties":{"publishing":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"group":{"type":"string","enum":["publishing","requests","feedback","activity"]},"kind":{"type":"string","enum":["failed","needs_attention","manual","awaiting_confirmation","expiring_connection","feedback","proposal","review_request","published","approved"]},"actionable":{"type":"boolean"},"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"workspaceName":{"type":"string"},"title":{"type":"string"},"reason":{"type":["string","null"]},"fix":{"type":["string","null"]},"pieceId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"pieceTitle":{"type":["string","null"]},"postId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"postVersion":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"commentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"proposalId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"channelAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"platform":{"anyOf":[{"type":"string","enum":["x","linkedin","threads","bluesky","instagram","facebook","tiktok","youtube","sandbox"]},{"type":"null"}]},"emulates":{"anyOf":[{"type":"string","enum":["x","linkedin","threads","bluesky","instagram","facebook","tiktok","youtube"]},{"type":"null"}]},"at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"from":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["member","guest","agent","system"]},"accountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"agentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"guestId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"name":{"type":"string"}},"required":["kind","accountId","agentClientId","guestId","name"],"additionalProperties":false},{"type":"null"}]},"error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"fix":{"type":"string"}},"required":["code","message"],"additionalProperties":false},{"type":"null"}]},"permalink":{"type":["string","null"]},"href":{"type":"string"}},"required":["key","group","kind","actionable","workspaceId","workspaceName","title","reason","fix","pieceId","pieceTitle","postId","commentId","proposalId","channelAccountId","platform","emulates","at","from","error","permalink","href"],"additionalProperties":false}},"requests":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"group":{"type":"string","enum":["publishing","requests","feedback","activity"]},"kind":{"type":"string","enum":["failed","needs_attention","manual","awaiting_confirmation","expiring_connection","feedback","proposal","review_request","published","approved"]},"actionable":{"type":"boolean"},"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"workspaceName":{"type":"string"},"title":{"type":"string"},"reason":{"type":["string","null"]},"fix":{"type":["string","null"]},"pieceId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"pieceTitle":{"type":["string","null"]},"postId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"postVersion":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"commentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"proposalId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"channelAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"platform":{"anyOf":[{"type":"string","enum":["x","linkedin","threads","bluesky","instagram","facebook","tiktok","youtube","sandbox"]},{"type":"null"}]},"emulates":{"anyOf":[{"type":"string","enum":["x","linkedin","threads","bluesky","instagram","facebook","tiktok","youtube"]},{"type":"null"}]},"at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"from":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["member","guest","agent","system"]},"accountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"agentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"guestId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"name":{"type":"string"}},"required":["kind","accountId","agentClientId","guestId","name"],"additionalProperties":false},{"type":"null"}]},"error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"fix":{"type":"string"}},"required":["code","message"],"additionalProperties":false},{"type":"null"}]},"permalink":{"type":["string","null"]},"href":{"type":"string"}},"required":["key","group","kind","actionable","workspaceId","workspaceName","title","reason","fix","pieceId","pieceTitle","postId","commentId","proposalId","channelAccountId","platform","emulates","at","from","error","permalink","href"],"additionalProperties":false}},"feedback":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"group":{"type":"string","enum":["publishing","requests","feedback","activity"]},"kind":{"type":"string","enum":["failed","needs_attention","manual","awaiting_confirmation","expiring_connection","feedback","proposal","review_request","published","approved"]},"actionable":{"type":"boolean"},"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"workspaceName":{"type":"string"},"title":{"type":"string"},"reason":{"type":["string","null"]},"fix":{"type":["string","null"]},"pieceId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"pieceTitle":{"type":["string","null"]},"postId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"postVersion":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"commentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"proposalId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"channelAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"platform":{"anyOf":[{"type":"string","enum":["x","linkedin","threads","bluesky","instagram","facebook","tiktok","youtube","sandbox"]},{"type":"null"}]},"emulates":{"anyOf":[{"type":"string","enum":["x","linkedin","threads","bluesky","instagram","facebook","tiktok","youtube"]},{"type":"null"}]},"at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"from":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["member","guest","agent","system"]},"accountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"agentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"guestId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"name":{"type":"string"}},"required":["kind","accountId","agentClientId","guestId","name"],"additionalProperties":false},{"type":"null"}]},"error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"fix":{"type":"string"}},"required":["code","message"],"additionalProperties":false},{"type":"null"}]},"permalink":{"type":["string","null"]},"href":{"type":"string"}},"required":["key","group","kind","actionable","workspaceId","workspaceName","title","reason","fix","pieceId","pieceTitle","postId","commentId","proposalId","channelAccountId","platform","emulates","at","from","error","permalink","href"],"additionalProperties":false}},"activity":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"group":{"type":"string","enum":["publishing","requests","feedback","activity"]},"kind":{"type":"string","enum":["failed","needs_attention","manual","awaiting_confirmation","expiring_connection","feedback","proposal","review_request","published","approved"]},"actionable":{"type":"boolean"},"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"workspaceName":{"type":"string"},"title":{"type":"string"},"reason":{"type":["string","null"]},"fix":{"type":["string","null"]},"pieceId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"pieceTitle":{"type":["string","null"]},"postId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"postVersion":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"commentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"proposalId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"channelAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"platform":{"anyOf":[{"type":"string","enum":["x","linkedin","threads","bluesky","instagram","facebook","tiktok","youtube","sandbox"]},{"type":"null"}]},"emulates":{"anyOf":[{"type":"string","enum":["x","linkedin","threads","bluesky","instagram","facebook","tiktok","youtube"]},{"type":"null"}]},"at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"from":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["member","guest","agent","system"]},"accountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"agentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"guestId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"name":{"type":"string"}},"required":["kind","accountId","agentClientId","guestId","name"],"additionalProperties":false},{"type":"null"}]},"error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"fix":{"type":"string"}},"required":["code","message"],"additionalProperties":false},{"type":"null"}]},"permalink":{"type":["string","null"]},"href":{"type":"string"}},"required":["key","group","kind","actionable","workspaceId","workspaceName","title","reason","fix","pieceId","pieceTitle","postId","commentId","proposalId","channelAccountId","platform","emulates","at","from","error","permalink","href"],"additionalProperties":false}}},"required":["publishing","requests","feedback","activity"],"additionalProperties":false},"counts":{"type":"object","properties":{"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"publishing":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"requests":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"feedback":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["total","publishing","requests","feedback"],"additionalProperties":false}},"required":["groups","counts"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/list_webhook_deliveries":{"post":{"operationId":"list_webhook_deliveries","summary":"List webhook deliveries","description":"An endpoint's delivery log, newest first (kept 30 days): event, status (pending while retrying, delivered, failed, skipped), attempts, last HTTP status and error. Bodies aren't returned.","tags":["workspace"],"x-heyeveryone-kind":"query","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"endpointId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"limit":{"default":25,"type":"integer","minimum":1,"maximum":100}},"required":["workspaceId","endpointId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"deliveries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"eventId":{"type":"string"},"eventType":{"type":"string"},"status":{"type":"string","enum":["pending","delivered","failed","skipped"]},"attempts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"lastAttemptAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"lastStatusCode":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"lastError":{"type":["string","null"]},"deliveredAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","eventId","eventType","status","attempts","lastAttemptAt","lastStatusCode","lastError","deliveredAt","createdAt"],"additionalProperties":false}}},"required":["deliveries"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/list_webhook_endpoints":{"post":{"operationId":"list_webhook_endpoints","summary":"List webhook endpoints","description":"The workspace's outgoing webhook endpoints: URL, chosen events, on/off, and delivery health (failures in a row, last success and failure). Never returns signing secrets. `eventTypes` lists every event. Owners add and change endpoints in Settings > Webhooks.","tags":["workspace"],"x-heyeveryone-kind":"query","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},"required":["workspaceId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"endpoints":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"url":{"type":"string"},"description":{"type":["string","null"]},"events":{"type":"array","items":{"type":"string","enum":["post.published","post.failed","post.needs_attention","post.awaiting_confirmation","review.verdict"]}},"status":{"type":"string","enum":["active","disabled"]},"disabledAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"disabledReason":{"type":["string","null"]},"consecutiveFailures":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"failingSince":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"lastSuccessAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"lastFailureAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"lastFailureMessage":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","url","description","events","status","disabledAt","disabledReason","consecutiveFailures","failingSince","lastSuccessAt","lastFailureAt","lastFailureMessage","createdAt"],"additionalProperties":false}},"eventTypes":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["post.published","post.failed","post.needs_attention","post.awaiting_confirmation","review.verdict"]},"label":{"type":"string"}},"required":["type","label"],"additionalProperties":false}}},"required":["endpoints","eventTypes"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/list_workspaces":{"post":{"operationId":"list_workspaces","summary":"List workspaces","description":"List the workspaces (brands: a company or a side project) you can work in, with your role in each. Call this first: every other tool takes a workspaceId from this list. An agent only sees the workspaces its owner granted it.","tags":["account"],"x-heyeveryone-kind":"query","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"workspaces":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"name":{"type":"string"},"timeZone":{"type":"string"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"role":{"type":"string","enum":["owner","editor"]}},"required":["id","name","timeZone","createdAt","role"],"additionalProperties":false}}},"required":["workspaces"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/mark_notifications_read":{"post":{"operationId":"mark_notifications_read","summary":"Mark notifications read","description":"Mark your notifications as read: pass their ids, or all: true (optionally within one workspaceId). Reading does not change the posts they are about; failed posts stay in Updates until handled.","tags":["account"],"x-heyeveryone-kind":"mutation","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"minItems":1,"maxItems":200,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},"all":{"default":false,"type":"boolean"},"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"marked":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["marked"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/mark_post_published_manually":{"post":{"operationId":"mark_post_published_manually","summary":"Mark a post as posted by hand","description":"Record that a post went live outside heyeveryone: posted by hand with the post kit (state manual), or found live after an unknown outcome (needs_attention), or posted by hand after a failure. Pass the live post's URL as permalink when you have it. The post becomes published and is never sent again. Requires publish permission (a member, or an agent with auto-publish).","tags":["workspace"],"x-heyeveryone-kind":"mutation","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"postId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"permalink":{"type":"string","maxLength":2000,"format":"uri"},"publishedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["workspaceId","postId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"object","properties":{"postId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"pieceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"channelAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"platform":{"type":"string","enum":["x","linkedin","threads","bluesky","instagram","facebook","tiktok","youtube","sandbox"]},"state":{"type":"string","enum":["draft","ready","awaiting_confirmation","scheduled","publishing","published","failed_retrying","needs_attention","failed","manual"]},"scheduledAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"publishedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"permalink":{"type":["string","null"]},"lastError":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"fix":{"type":"string"}},"required":["code","message"],"additionalProperties":false},{"type":"null"}]},"needsYou":{"type":"boolean"},"waitingForReconnect":{"type":"boolean"},"nextRetryAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"automaticRetriesUsed":{"type":"integer","minimum":0,"maximum":9007199254740991},"publication":{"anyOf":[{"type":"object","properties":{"status":{"type":"string","enum":["pending","published","failed"]},"platformPostId":{"type":["string","null"]},"permalink":{"type":["string","null"]},"publishedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"notices":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}}},"required":["status","platformPostId","permalink","publishedAt","notices"],"additionalProperties":false},{"type":"null"}]},"attempts":{"type":"array","items":{"type":"object","properties":{"attemptNumber":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"outcome":{"type":"string","enum":["in_flight","succeeded","failed","ambiguous"]},"errorCode":{"anyOf":[{"type":"string","enum":["auth_expired","rate_limited","rejected_content","media_unsupported","platform_error","timeout_after_send","not_permitted"]},{"type":"null"}]},"errorMessage":{"type":["string","null"]},"startedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"finishedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"durationMs":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["attemptNumber","outcome","errorCode","errorMessage","startedAt","finishedAt","durationMs"],"additionalProperties":false}},"nextStep":{"type":"string"}},"required":["postId","pieceId","channelAccountId","platform","state","scheduledAt","publishedAt","permalink","lastError","needsYou","waitingForReconnect","nextRetryAt","automaticRetriesUsed","publication","attempts","nextStep"],"additionalProperties":false}},"required":["status"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Service-specific errors: not_markable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/preview_ai_cost":{"post":{"operationId":"preview_ai_cost","summary":"Preview an AI action's cost","description":"See the credit cost of an in-app AI action before running it, using the same price the action itself will charge, so the cost is always shown up front. Pass the service name (for example 'adapt_piece') and the input you're about to send it; for a service priced per unit (adapt_piece is priced per target channel) the estimate reflects that input. For transcribe_media the quote reads the media asset's probed duration, so it always matches what transcribe_media will actually charge; if the asset hasn't been probed yet, `unknownUntilProbed` is true and `credits` is only the minimum floor (label it 'from N credits').","tags":["account"],"x-heyeveryone-kind":"query","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"service":{"type":"string"},"input":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["service"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"credits":{"type":"integer","minimum":0,"maximum":9007199254740991},"description":{"type":"string"},"unknownUntilProbed":{"default":false,"type":"boolean"}},"required":["credits","description","unknownUntilProbed"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Service-specific errors: not_ai_service","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/preview_import":{"post":{"operationId":"preview_import","summary":"Preview an import","description":"Show what importing a Buffer or Typefully export or a CSV would do, changing nothing: per item the content to create (title, column, date, campaigns, channel accounts) or why it's skipped, plus warnings (no account for a channel, unreadable date, still scheduled in the other tool). Call before import_content and show the person. `alreadyImported`: this file was imported with the same options (import_content then creates nothing). Formats: (1) CSV with a header row and the columns title, text, channel, scheduled_at, status, tags (channel: x, linkedin, threads, bluesky, instagram, facebook, tiktok, youtube, optionally with a handle like `x:@acme`, several separated by commas; scheduled_at: YYYY-MM-DD, YYYY-MM-DD HH:mm or ISO 8601; status: idea, draft, in_review, scheduled or published; tags: comma-separated, they become campaigns). Comma, semicolon or tab delimited; common synonyms (content, caption, platform, date, labels) work. (2) Buffer's bulk upload CSV (Text, Image URL, Tags, Posting Time); it has no channel column, so pass `defaultChannelAccountId`. (3) Buffer's posts export CSV (posts.csv from the Insights export zip): published posts. (4) Typefully drafts as returned by Typefully's API v2 (one draft, an array, or a list response `{results: [...]}`), with threads per platform. `format: auto` detects which. Limits: 512 KB and 500 items per file. Free: imports never cost credits.","tags":["workspace"],"x-heyeveryone-kind":"query","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"content":{"type":"string","maxLength":1048576},"format":{"default":"auto","type":"string","enum":["auto","csv","buffer","buffer_insights","typefully"]},"fileName":{"type":"string","minLength":1,"maxLength":255},"defaultChannelAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"includePublished":{"default":false,"type":"boolean"}},"required":["workspaceId","content"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"format":{"type":"string","enum":["csv","buffer","buffer_insights","typefully"]},"formatLabel":{"type":"string"},"fileHash":{"type":"string"},"alreadyImported":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"fileName":{"type":["string","null"]},"format":{"type":"string","enum":["csv","buffer","buffer_insights","typefully"]},"formatLabel":{"type":"string"},"rowCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"createdCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"skippedCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"postCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"createdByAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdByAgentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"defaultChannelAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"includePublished":{"type":"boolean"}},"required":["id","fileName","format","formatLabel","rowCount","createdCount","skippedCount","postCount","createdAt","createdByAccountId","createdByAgentClientId","defaultChannelAccountId","includePublished"],"additionalProperties":false},{"type":"null"}]},"rows":{"type":"array","items":{"type":"object","properties":{"row":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"action":{"type":"string","enum":["create","skip"]},"reason":{"type":["string","null"]},"title":{"type":"string"},"excerpt":{"type":"string"},"status":{"type":"string","enum":["idea","drafting","in_review"]},"plannedFor":{"type":["string","null"]},"labels":{"type":"array","items":{"type":"string"}},"channels":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"platform":{"anyOf":[{"type":"string","enum":["x","linkedin","threads","bluesky","instagram","facebook","tiktok","youtube","sandbox"]},{"type":"null"}]},"channelAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"handle":{"type":["string","null"]},"issue":{"anyOf":[{"type":"object","properties":{"label":{"type":"string"},"message":{"type":"string"}},"required":["label","message"],"additionalProperties":false},{"type":"null"}]}},"required":["name","platform","channelAccountId","handle","issue"],"additionalProperties":false}},"warnings":{"type":"array","items":{"type":"string"}},"pieceId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]}},"required":["row","action","reason","title","excerpt","status","plannedFor","labels","channels","warnings","pieceId"],"additionalProperties":false}},"summary":{"type":"object","properties":{"rows":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"create":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"skip":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"posts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["rows","create","skip","posts"],"additionalProperties":false}},"required":["format","formatLabel","fileHash","alreadyImported","rows","summary"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Service-specific errors: invalid_file, file_too_large, too_many_rows","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/propose_edit":{"post":{"operationId":"propose_edit","summary":"Suggest an edit","description":"Suggest a change for a person to review instead of writing it directly: new `text` for the original draft (`target: master`), new `segments` for a channel version (`target: post` with `postId`), or a new channel version (`target: post` with `channelAccountId` and `format`, when the content item has none for that account). Pass the `version` you read as `baseVersion` (not needed for a new channel version); a mismatch fails with `version_conflict`. Nothing changes until a person accepts it (accept_proposal) from the editor; if the content changes first, the suggestion becomes stale and can only be rejected. Free: suggestions from agents never cost credits. Use list_proposals to follow it.","tags":["workspace"],"x-heyeveryone-kind":"mutation","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"pieceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"target":{"type":"string","enum":["master","post"]},"postId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"channelAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"format":{"type":"string","pattern":"^[a-z][a-z0-9_]*$"},"baseVersion":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"text":{"type":"string","maxLength":100000},"segments":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"text":{"type":"string","maxLength":100000},"media":{"default":[],"maxItems":35,"type":"array","items":{"type":"object","properties":{"mediaAssetId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"altText":{"type":"string","maxLength":2000}},"required":["mediaAssetId"]}}},"required":["text"]}},"note":{"type":"string","maxLength":2000}},"required":["workspaceId","pieceId","target"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"proposal":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"pieceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"target":{"type":"string","enum":["master","post"]},"postId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"channelAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"format":{"anyOf":[{"type":"string","pattern":"^[a-z][a-z0-9_]*$"},{"type":"null"}]},"baseVersion":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"content":{"type":"object","properties":{"text":{"type":"string"},"segments":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string"},"media":{"type":"array","items":{"type":"object","properties":{"mediaAssetId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"altText":{"type":"string","maxLength":2000}},"required":["mediaAssetId"],"additionalProperties":false}}},"required":["text","media"],"additionalProperties":false}}},"additionalProperties":false},"origin":{"type":"string","enum":["adapt_piece","rewrite_text","agent","member"]},"note":{"type":["string","null"]},"creditsSpent":{"type":"integer","minimum":0,"maximum":9007199254740991},"status":{"type":"string","enum":["pending","accepted","rejected"]},"stale":{"type":"boolean"},"staleReason":{"type":["string","null"]},"currentVersion":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"author":{"type":"object","properties":{"kind":{"type":"string","enum":["member","guest","agent","system"]},"accountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"agentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"guestId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"name":{"type":"string"}},"required":["kind","accountId","agentClientId","guestId","name"],"additionalProperties":false},"decidedBy":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["member","guest","agent","system"]},"accountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"agentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"guestId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"name":{"type":"string"}},"required":["kind","accountId","agentClientId","guestId","name"],"additionalProperties":false},{"type":"null"}]},"decidedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"decisionNote":{"type":["string","null"]},"resultVersion":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","workspaceId","pieceId","target","postId","channelAccountId","format","baseVersion","content","origin","note","creditsSpent","status","stale","staleReason","currentVersion","author","decidedBy","decidedAt","decisionNote","resultVersion","createdAt"],"additionalProperties":false}},"required":["proposal"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Service-specific errors: version_conflict, post_locked, post_exists, channel_unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/publish_now":{"post":{"operationId":"publish_now","summary":"Publish a post now","description":"Publish one post right away. Pass the `version` you showed the person as `expectedVersion`; if the post changed since, nothing happens (`version_conflict`). Same checks as scheduling: validation (`invalid_post`), required sign-off (`signoff_required`), channel health (`channel_unavailable`), skipped posts (`skipped`) and state (`not_schedulable`). The post enters `scheduled` at the current time and the publisher picks it up; follow it with get_post_status. Calling it again while the post is already due changes nothing. People can use it; an agent only when the workspace owner allowed it to auto-publish (`confirmation_required` otherwise: use request_schedule so a human confirms).\n\nA human confirms the result in heyeveryone's Needs you tray unless the account owner gave this agent auto-publish permission for the workspace (see whoami).","tags":["workspace"],"x-heyeveryone-kind":"mutation","x-heyeveryone-requires-confirmation":true,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"postId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"expectedVersion":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["workspaceId","postId","expectedVersion"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"post":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"pieceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"channelAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"format":{"type":"string","pattern":"^[a-z][a-z0-9_]*$"},"segments":{"minItems":1,"type":"array","items":{"type":"object","properties":{"text":{"type":"string"},"media":{"type":"array","items":{"type":"object","properties":{"mediaAssetId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"altText":{"type":"string","maxLength":2000}},"required":["mediaAssetId"],"additionalProperties":false}}},"required":["text","media"],"additionalProperties":false}},"settings":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"state":{"type":"string","enum":["draft","ready","awaiting_confirmation","scheduled","publishing","published","failed_retrying","needs_attention","failed","manual"]},"scheduledAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"scheduleSource":{"anyOf":[{"type":"string","enum":["manual","queue"]},{"type":"null"}]},"isSkipped":{"type":"boolean"},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"followsOriginal":{"type":"boolean"},"followIssue":{"type":["string","null"]},"requestedByAgentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"confirmedByAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"confirmedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"lastError":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"fix":{"type":"string"}},"required":["code","message"],"additionalProperties":false},{"type":"null"}]},"publishedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"permalink":{"type":["string","null"]},"createdByAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdByAgentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","workspaceId","pieceId","channelAccountId","format","segments","settings","state","scheduledAt","scheduleSource","isSkipped","version","followsOriginal","followIssue","requestedByAgentClientId","confirmedByAccountId","confirmedAt","lastError","publishedAt","permalink","createdByAccountId","createdByAgentClientId","createdAt","updatedAt"],"additionalProperties":false},"queued":{"type":"boolean"}},"required":["post","queued"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Service-specific errors: not_schedulable, time_in_past, invalid_post, signoff_required, channel_unavailable, skipped, no_queue_slots, queue_full, plan_limit_reached, version_conflict, confirmation_required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/query_content":{"post":{"operationId":"query_content","summary":"Query content","description":"The workspace's content as a table: one row per content item with its board stage, owner (member or agent), campaign labels, channel versions (platform, account, state, times), next scheduled time, comment count and approval summary. Filter by `text`, `stages` (board columns), `buckets` (in_progress / scheduled / published versions), `platforms`, `channelAccountIds`, `campaigns` / `noCampaign`, owners (`ownerAccountIds`, `ownerAgentClientIds`, `unowned`; combined by OR), `attention`, and a date range `from`/`to` (exclusive) on `dateField` (calendar = a version's scheduled/published time or the planning day). `not` takes the same fields and leaves out what each matches (\"is not\": `not: { channelAccountIds: [...] }` hides content with a version on those accounts; content without an owner is kept by `not: { ownerAccountIds }`). Dates in `not` use its own `dateField` (default calendar). Sort by `updated` (default), `scheduled`, `created` or `title`; page with `nextCursor`. `counts` gives stage and bucket sizes for the same filters. The same filters serve the Table, Board and Calendar views. Use get_piece or get_publish_plan for one item.","tags":["workspace"],"x-heyeveryone-kind":"query","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":200},"stages":{"maxItems":5,"type":"array","items":{"type":"string","enum":["idea","drafting","in_review","scheduled","published"]}},"buckets":{"maxItems":3,"type":"array","items":{"type":"string","enum":["in_progress","scheduled","published"]}},"platforms":{"maxItems":20,"type":"array","items":{"type":"string","enum":["x","linkedin","threads","bluesky","instagram","facebook","tiktok","youtube","sandbox"]}},"channelAccountIds":{"maxItems":50,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},"campaigns":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":100}},"noCampaign":{"type":"boolean"},"ownerAccountIds":{"maxItems":50,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},"ownerAgentClientIds":{"maxItems":50,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},"unowned":{"type":"boolean"},"attention":{"type":"boolean"},"dateField":{"default":"calendar","type":"string","enum":["scheduled","planned","calendar","created","updated"]},"from":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"to":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"not":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":200},"stages":{"maxItems":5,"type":"array","items":{"type":"string","enum":["idea","drafting","in_review","scheduled","published"]}},"buckets":{"maxItems":3,"type":"array","items":{"type":"string","enum":["in_progress","scheduled","published"]}},"platforms":{"maxItems":20,"type":"array","items":{"type":"string","enum":["x","linkedin","threads","bluesky","instagram","facebook","tiktok","youtube","sandbox"]}},"channelAccountIds":{"maxItems":50,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},"campaigns":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":100}},"noCampaign":{"type":"boolean"},"ownerAccountIds":{"maxItems":50,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},"ownerAgentClientIds":{"maxItems":50,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},"unowned":{"type":"boolean"},"attention":{"type":"boolean"},"dateField":{"default":"calendar","type":"string","enum":["scheduled","planned","calendar","created","updated"]},"from":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"to":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}}},"includeArchived":{"default":false,"type":"boolean"},"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"sort":{"default":"updated","type":"string","enum":["updated","scheduled","created","title"]},"direction":{"type":"string","enum":["asc","desc"]},"cursor":{"type":"string","minLength":1,"maxLength":2000},"limit":{"default":50,"type":"integer","minimum":1,"maximum":200}},"required":["workspaceId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"pieceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"title":{"type":"string"},"excerpt":{"type":"string"},"stage":{"type":"string","enum":["idea","drafting","in_review","scheduled","published"]},"buckets":{"type":"array","items":{"type":"string","enum":["in_progress","scheduled","published"]}},"plannedFor":{"type":["string","null"]},"archived":{"type":"boolean"},"owner":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["member","agent"]},"accountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"agentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"name":{"type":"string"},"initials":{"type":"string"},"avatarUrl":{"type":["string","null"]}},"required":["kind","accountId","agentClientId","name","initials","avatarUrl"],"additionalProperties":false},{"type":"null"}]},"campaigns":{"type":"array","items":{"type":"string"}},"campaign":{"type":["string","null"]},"channels":{"type":"array","items":{"type":"object","properties":{"postId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"channelAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"platform":{"type":"string","enum":["x","linkedin","threads","bluesky","instagram","facebook","tiktok","youtube","sandbox"]},"emulates":{"anyOf":[{"type":"string","enum":["x","linkedin","threads","bluesky","instagram","facebook","tiktok","youtube"]},{"type":"null"}]},"handle":{"type":["string","null"]},"displayName":{"type":["string","null"]},"avatarUrl":{"type":["string","null"]},"state":{"type":"string","enum":["draft","ready","awaiting_confirmation","scheduled","publishing","published","failed_retrying","needs_attention","failed","manual"]},"isSkipped":{"type":"boolean"},"bucket":{"anyOf":[{"type":"string","enum":["in_progress","scheduled","published"]},{"type":"null"}]},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"scheduledAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"publishedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"permalink":{"type":["string","null"]}},"required":["postId","channelAccountId","platform","emulates","handle","displayName","avatarUrl","state","isSkipped","bucket","version","scheduledAt","publishedAt","permalink"],"additionalProperties":false}},"scheduledAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"publishedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"commentCount":{"type":"object","properties":{"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"open":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["total","open"],"additionalProperties":false},"approval":{"type":"object","properties":{"state":{"type":"string","enum":["none","in_review","changes_requested","approved"]},"required":{"type":"boolean"},"approvedVersions":{"type":"integer","minimum":0,"maximum":9007199254740991},"totalVersions":{"type":"integer","minimum":0,"maximum":9007199254740991},"latest":{"anyOf":[{"type":"object","properties":{"reviewer":{"type":"object","properties":{"kind":{"type":"string","enum":["member","guest","agent","system"]},"accountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"agentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"guestId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"name":{"type":"string"}},"required":["kind","accountId","agentClientId","guestId","name"],"additionalProperties":false},"decision":{"type":"string","enum":["approved","changes_requested"]}},"required":["reviewer","decision"],"additionalProperties":false},{"type":"null"}]}},"required":["state","required","approvedVersions","totalVersions","latest"],"additionalProperties":false},"attention":{"type":"boolean"},"draftedByAgent":{"anyOf":[{"type":"object","properties":{"agentClientId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"name":{"type":"string"}},"required":["agentClientId","name"],"additionalProperties":false},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["pieceId","workspaceId","title","excerpt","stage","buckets","plannedFor","archived","owner","campaigns","campaign","channels","scheduledAt","publishedAt","commentCount","approval","attention","draftedByAgent","createdAt","updatedAt"],"additionalProperties":false}},"nextCursor":{"type":["string","null"]},"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"counts":{"type":"object","properties":{"byStage":{"type":"object","propertyNames":{"type":"string","enum":["idea","drafting","in_review","scheduled","published"]},"additionalProperties":{"type":"integer","minimum":0,"maximum":9007199254740991},"required":["idea","drafting","in_review","scheduled","published"]},"byBucket":{"type":"object","propertyNames":{"type":"string","enum":["in_progress","scheduled","published"]},"additionalProperties":{"type":"integer","minimum":0,"maximum":9007199254740991},"required":["in_progress","scheduled","published"]}},"required":["byStage","byBucket"],"additionalProperties":false}},"required":["items","nextCursor","total","counts"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/refresh_tiktok_creator_info":{"post":{"operationId":"refresh_tiktok_creator_info","summary":"Read a TikTok account's creator info again","description":"Ask TikTok for a TikTok account's current creator info, as TikTok requires before posting (the posting screen does it whenever it opens). For a real TikTok account the read runs in the background and usually lands within a few seconds (queued: true): poll get_tiktok_creator_info until its `info.fetchedAt` (or `lastError.at`) is at or after `requestedAt`. A Sandbox account that behaves like TikTok answers at once (queued: false, `creatorInfo` is its answer). An answer under 15 seconds old is not read again (queued: false). Returns the current creator info either way. Never costs credits.","tags":["workspace"],"x-heyeveryone-kind":"mutation","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"channelAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},"required":["workspaceId","channelAccountId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"queued":{"type":"boolean"},"requestedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"creatorInfo":{"type":"object","properties":{"channelAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"info":{"anyOf":[{"type":"object","properties":{"nickname":{"type":["string","null"]},"username":{"type":["string","null"]},"privacyLevelOptions":{"type":"array","items":{"type":"string"}},"commentDisabled":{"type":"boolean"},"duetDisabled":{"type":"boolean"},"stitchDisabled":{"type":"boolean"},"maxVideoPostDurationSec":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"canPost":{"type":"boolean"},"cannotPostCode":{"type":["string","null"]},"cannotPostReason":{"type":["string","null"]},"fetchedAt":{"type":"string"},"source":{"type":"string","enum":["tiktok","sandbox"]}},"required":["nickname","username","privacyLevelOptions","commentDisabled","duetDisabled","stitchDisabled","maxVideoPostDurationSec","canPost","cannotPostCode","cannotPostReason","fetchedAt","source"],"additionalProperties":false},{"type":"null"}]},"lastError":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"at":{"type":"string"}},"required":["code","message","at"],"additionalProperties":false},{"type":"null"}]},"stale":{"type":"boolean"}},"required":["channelAccountId","info","lastError","stale"],"additionalProperties":false}},"required":["queued","requestedAt","creatorInfo"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Service-specific errors: not_tiktok, disconnected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/remove_source":{"post":{"operationId":"remove_source","summary":"Remove a source","description":"Detach a source from its content item and delete it (a URL's fetched text and a note go with it; a media asset stays in the library). Content already written from it doesn't change.","tags":["workspace"],"x-heyeveryone-kind":"mutation","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"sourceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},"required":["workspaceId","sourceId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"removed":{"type":"boolean","const":true},"sourceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},"required":["removed","sourceId"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/reopen_comment":{"post":{"operationId":"reopen_comment","summary":"Reopen a comment","description":"Reopen a resolved comment when its feedback still needs work: it shows as open again in list_comments, get_piece counts and Updates. Reopening an open comment is harmless.","tags":["workspace"],"x-heyeveryone-kind":"mutation","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"commentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},"required":["workspaceId","commentId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"comment":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"pieceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"target":{"type":"string","enum":["piece","master","post"]},"postId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"segmentIndex":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"rangeStart":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"rangeEnd":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"quotedText":{"type":["string","null"]},"anchorVersion":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"parentCommentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"body":{"type":"string"},"authorKind":{"type":"string","enum":["member","guest","agent"]},"authorAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"authorGuestId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"authorAgentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"resolvedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"resolvedByAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"author":{"type":"object","properties":{"kind":{"type":"string","enum":["member","guest","agent","system"]},"accountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"agentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"guestId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"name":{"type":"string"}},"required":["kind","accountId","agentClientId","guestId","name"],"additionalProperties":false},"anchorStatus":{"type":"string","enum":["whole","current","moved","outdated"]},"outdated":{"type":"boolean"},"currentRange":{"anyOf":[{"type":"object","properties":{"start":{"type":"integer","minimum":0,"maximum":9007199254740991},"end":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["start","end"],"additionalProperties":false},{"type":"null"}]}},"required":["id","workspaceId","pieceId","target","postId","segmentIndex","rangeStart","rangeEnd","quotedText","anchorVersion","parentCommentId","body","authorKind","authorAccountId","authorGuestId","authorAgentClientId","resolvedAt","resolvedByAccountId","createdAt","updatedAt","author","anchorStatus","outdated","currentRange"],"additionalProperties":false}},"required":["comment"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/request_media_upload":{"post":{"operationId":"request_media_upload","summary":"Ask the person for a file","description":"Ask the person to upload an image or video from their device to the media library (you can't send file bytes). MCP Apps hosts show an upload box; otherwise give them uploadUrl (once, 15 min). Images ≤50 MB, videos ≤1 GB. Then get_media_upload_request gives mediaAssetId. Nothing is posted.","tags":["workspace"],"x-heyeveryone-kind":"mutation","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"kind":{"type":"string","enum":["image","video"]},"note":{"type":"string","minLength":1,"maxLength":200}},"required":["workspaceId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"uploadRequest":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"status":{"type":"string","enum":["waiting","uploading","finished","expired"]},"accepts":{"type":"array","items":{"type":"string","enum":["image","video"]}},"maxBytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"note":{"type":["string","null"]},"expiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"uploadExpiresAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"mediaAssetId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","workspaceId","status","accepts","maxBytes","note","expiresAt","uploadExpiresAt","mediaAssetId","createdAt"],"additionalProperties":false},"uploadUrl":{"type":"string"}},"required":["uploadRequest","uploadUrl"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/request_review":{"post":{"operationId":"request_review","summary":"Ask for a review","description":"Ask a person to review a content item, with an optional `note` for the reviewer (what to look at, what changed). The content's owner gets an Update and a notification, and decides how it is reviewed: they create the review link and send it (review links are made by people, not agents), or review it themselves. The request stays open until a review link is created or a verdict or sign-off is recorded; asking again while it is open returns it (`alreadyRequested: true`) and notifies no one again. It shares, approves, schedules and publishes nothing. Approval is a state: when the content requires sign-off, nothing on it can be scheduled or posted until a reviewer approves the current text. `recipients` names who was told; `url` is the content page to give the person.","tags":["workspace"],"x-heyeveryone-kind":"mutation","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"pieceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"note":{"type":"string","minLength":1,"maxLength":1000}},"required":["workspaceId","pieceId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"reviewRequest":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"pieceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"note":{"type":["string","null"]},"requestedBy":{"type":"object","properties":{"kind":{"type":"string","enum":["member","guest","agent","system"]},"accountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"agentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"guestId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"name":{"type":"string"}},"required":["kind","accountId","agentClientId","guestId","name"],"additionalProperties":false},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","pieceId","note","requestedBy","createdAt"],"additionalProperties":false},"alreadyRequested":{"type":"boolean"},"recipients":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["member","guest","agent","system"]},"accountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"agentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"guestId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"name":{"type":"string"}},"required":["kind","accountId","agentClientId","guestId","name"],"additionalProperties":false}},"url":{"type":"string","description":"The content page in heyeveryone. Give it to the person so they can open the draft."}},"required":["reviewRequest","alreadyRequested","recipients","url"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/request_schedule":{"post":{"operationId":"request_schedule","summary":"Schedule a post at a time","description":"Schedule one post at an exact time (ISO 8601 with offset, at least a minute ahead). For an agent without auto-publish the post goes to `awaiting_confirmation` and a human confirms it from Updates (`needsYouUrl`); nothing goes live until then. A person, or an agent the workspace owner allowed to auto-publish, schedules it directly. Works for draft, ready, awaiting, scheduled and failed posts. Refused when the post has validation errors (`invalid_post`), its content requires sign-off that it lacks (`signoff_required`), its channel needs reconnecting (`channel_unavailable`), or it is skipped. Pass `expectedVersion` with the version you last saw: a post that changed since is refused with `version_conflict` instead of being scheduled unseen. Optional, for callers that show the content first; omit it if you don't track versions. To pick the next free slot instead, use add_to_queue.\n\nA human confirms the result in heyeveryone's Needs you tray unless the account owner gave this agent auto-publish permission for the workspace (see whoami).","tags":["workspace"],"x-heyeveryone-kind":"mutation","x-heyeveryone-requires-confirmation":true,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"postId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"scheduledAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"expectedVersion":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["workspaceId","postId","scheduledAt"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"post":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"pieceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"channelAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"format":{"type":"string","pattern":"^[a-z][a-z0-9_]*$"},"segments":{"minItems":1,"type":"array","items":{"type":"object","properties":{"text":{"type":"string"},"media":{"type":"array","items":{"type":"object","properties":{"mediaAssetId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"altText":{"type":"string","maxLength":2000}},"required":["mediaAssetId"],"additionalProperties":false}}},"required":["text","media"],"additionalProperties":false}},"settings":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"state":{"type":"string","enum":["draft","ready","awaiting_confirmation","scheduled","publishing","published","failed_retrying","needs_attention","failed","manual"]},"scheduledAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"scheduleSource":{"anyOf":[{"type":"string","enum":["manual","queue"]},{"type":"null"}]},"isSkipped":{"type":"boolean"},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"followsOriginal":{"type":"boolean"},"followIssue":{"type":["string","null"]},"requestedByAgentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"confirmedByAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"confirmedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"lastError":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"fix":{"type":"string"}},"required":["code","message"],"additionalProperties":false},{"type":"null"}]},"publishedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"permalink":{"type":["string","null"]},"createdByAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdByAgentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","workspaceId","pieceId","channelAccountId","format","segments","settings","state","scheduledAt","scheduleSource","isSkipped","version","followsOriginal","followIssue","requestedByAgentClientId","confirmedByAccountId","confirmedAt","lastError","publishedAt","permalink","createdByAccountId","createdByAgentClientId","createdAt","updatedAt"],"additionalProperties":false},"needsConfirmation":{"type":"boolean"},"needsYouUrl":{"type":["string","null"]},"url":{"type":"string","description":"The content page in heyeveryone. Give it to the person so they can open the draft."}},"required":["post","needsConfirmation","needsYouUrl","url"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Service-specific errors: not_schedulable, time_in_past, invalid_post, signoff_required, channel_unavailable, skipped, no_queue_slots, queue_full, plan_limit_reached, version_conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/reschedule_post":{"post":{"operationId":"reschedule_post","summary":"Move a post to another time","description":"Move a post that already has a time (awaiting confirmation, scheduled, or failed) to a new time, for example by dragging it on the calendar. The same rules as request_schedule apply: an agent without auto-publish moving a confirmed post sends it back to awaiting_confirmation for a human. Pass `expectedVersion` with the version you last saw: a post that changed since is refused with `version_conflict` instead of being moved unseen. Optional, for callers that show the content first.\n\nA human confirms the result in heyeveryone's Needs you tray unless the account owner gave this agent auto-publish permission for the workspace (see whoami).","tags":["workspace"],"x-heyeveryone-kind":"mutation","x-heyeveryone-requires-confirmation":true,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"postId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"scheduledAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"expectedVersion":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["workspaceId","postId","scheduledAt"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"post":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"pieceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"channelAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"format":{"type":"string","pattern":"^[a-z][a-z0-9_]*$"},"segments":{"minItems":1,"type":"array","items":{"type":"object","properties":{"text":{"type":"string"},"media":{"type":"array","items":{"type":"object","properties":{"mediaAssetId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"altText":{"type":"string","maxLength":2000}},"required":["mediaAssetId"],"additionalProperties":false}}},"required":["text","media"],"additionalProperties":false}},"settings":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"state":{"type":"string","enum":["draft","ready","awaiting_confirmation","scheduled","publishing","published","failed_retrying","needs_attention","failed","manual"]},"scheduledAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"scheduleSource":{"anyOf":[{"type":"string","enum":["manual","queue"]},{"type":"null"}]},"isSkipped":{"type":"boolean"},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"followsOriginal":{"type":"boolean"},"followIssue":{"type":["string","null"]},"requestedByAgentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"confirmedByAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"confirmedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"lastError":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"fix":{"type":"string"}},"required":["code","message"],"additionalProperties":false},{"type":"null"}]},"publishedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"permalink":{"type":["string","null"]},"createdByAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdByAgentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","workspaceId","pieceId","channelAccountId","format","segments","settings","state","scheduledAt","scheduleSource","isSkipped","version","followsOriginal","followIssue","requestedByAgentClientId","confirmedByAccountId","confirmedAt","lastError","publishedAt","permalink","createdByAccountId","createdByAgentClientId","createdAt","updatedAt"],"additionalProperties":false},"needsConfirmation":{"type":"boolean"},"needsYouUrl":{"type":["string","null"]},"url":{"type":"string","description":"The content page in heyeveryone. Give it to the person so they can open the draft."}},"required":["post","needsConfirmation","needsYouUrl","url"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Service-specific errors: not_schedulable, time_in_past, invalid_post, signoff_required, channel_unavailable, skipped, no_queue_slots, queue_full, plan_limit_reached, version_conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/resolve_comment":{"post":{"operationId":"resolve_comment","summary":"Resolve a comment","description":"Mark a comment as resolved once its feedback is addressed. It stays readable (list_comments with includeResolved) and can be reopened with reopen_comment. Resolving twice is harmless.","tags":["workspace"],"x-heyeveryone-kind":"mutation","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"commentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},"required":["workspaceId","commentId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"comment":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"pieceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"target":{"type":"string","enum":["piece","master","post"]},"postId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"segmentIndex":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"rangeStart":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"rangeEnd":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"quotedText":{"type":["string","null"]},"anchorVersion":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"parentCommentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"body":{"type":"string"},"authorKind":{"type":"string","enum":["member","guest","agent"]},"authorAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"authorGuestId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"authorAgentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"resolvedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"resolvedByAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"author":{"type":"object","properties":{"kind":{"type":"string","enum":["member","guest","agent","system"]},"accountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"agentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"guestId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"name":{"type":"string"}},"required":["kind","accountId","agentClientId","guestId","name"],"additionalProperties":false},"anchorStatus":{"type":"string","enum":["whole","current","moved","outdated"]},"outdated":{"type":"boolean"},"currentRange":{"anyOf":[{"type":"object","properties":{"start":{"type":"integer","minimum":0,"maximum":9007199254740991},"end":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["start","end"],"additionalProperties":false},{"type":"null"}]}},"required":["id","workspaceId","pieceId","target","postId","segmentIndex","rangeStart","rangeEnd","quotedText","anchorVersion","parentCommentId","body","authorKind","authorAccountId","authorGuestId","authorAgentClientId","resolvedAt","resolvedByAccountId","createdAt","updatedAt","author","anchorStatus","outdated","currentRange"],"additionalProperties":false}},"required":["comment"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/retry_post":{"post":{"operationId":"retry_post","summary":"Retry publishing a post","description":"Publish a failed or stuck post again now: a post in failed, needs_attention, or failed_retrying (then it retries immediately instead of waiting). Requires publish permission: a member, or an agent a workspace owner gave auto-publish; other agents get forbidden and should ask a person. When the last attempt's outcome was unknown (the platform timed out after we sent it), the post may already be live: check the channel first and pass confirmNotLive: true only if it is not there, or you risk a double post. Same for a TikTok draft. If the channel needs reconnecting, reconnect it first (the post then resumes on its own).","tags":["workspace"],"x-heyeveryone-kind":"mutation","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"postId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"confirmNotLive":{"default":false,"type":"boolean"}},"required":["workspaceId","postId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"object","properties":{"postId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"pieceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"channelAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"platform":{"type":"string","enum":["x","linkedin","threads","bluesky","instagram","facebook","tiktok","youtube","sandbox"]},"state":{"type":"string","enum":["draft","ready","awaiting_confirmation","scheduled","publishing","published","failed_retrying","needs_attention","failed","manual"]},"scheduledAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"publishedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"permalink":{"type":["string","null"]},"lastError":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"fix":{"type":"string"}},"required":["code","message"],"additionalProperties":false},{"type":"null"}]},"needsYou":{"type":"boolean"},"waitingForReconnect":{"type":"boolean"},"nextRetryAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"automaticRetriesUsed":{"type":"integer","minimum":0,"maximum":9007199254740991},"publication":{"anyOf":[{"type":"object","properties":{"status":{"type":"string","enum":["pending","published","failed"]},"platformPostId":{"type":["string","null"]},"permalink":{"type":["string","null"]},"publishedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"notices":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}}},"required":["status","platformPostId","permalink","publishedAt","notices"],"additionalProperties":false},{"type":"null"}]},"attempts":{"type":"array","items":{"type":"object","properties":{"attemptNumber":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"outcome":{"type":"string","enum":["in_flight","succeeded","failed","ambiguous"]},"errorCode":{"anyOf":[{"type":"string","enum":["auth_expired","rate_limited","rejected_content","media_unsupported","platform_error","timeout_after_send","not_permitted"]},{"type":"null"}]},"errorMessage":{"type":["string","null"]},"startedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"finishedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"durationMs":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["attemptNumber","outcome","errorCode","errorMessage","startedAt","finishedAt","durationMs"],"additionalProperties":false}},"nextStep":{"type":"string"}},"required":["postId","pieceId","channelAccountId","platform","state","scheduledAt","publishedAt","permalink","lastError","needsYou","waitingForReconnect","nextRetryAt","automaticRetriesUsed","publication","attempts","nextStep"],"additionalProperties":false}},"required":["status"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Service-specific errors: not_retryable, confirmation_required, channel_needs_reconnect","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/revoke_post_kit_link":{"post":{"operationId":"revoke_post_kit_link","summary":"Turn off a post kit link","description":"Turn off a post kit link: the page stops working for anyone who has it. The post itself is not changed. Revoking twice is harmless.","tags":["workspace"],"x-heyeveryone-kind":"mutation","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"postKitLinkId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},"required":["workspaceId","postKitLinkId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"postKitLink":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"postId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"revokedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"lastUsedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"createdByAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdByAgentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","workspaceId","postId","expiresAt","revokedAt","lastUsedAt","createdByAccountId","createdByAgentClientId","createdAt"],"additionalProperties":false}},"required":["postKitLink"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/revoke_share_link":{"post":{"operationId":"revoke_share_link","summary":"Revoke a review link","description":"Revoke a share link: the review page stops working for everyone who has it (they see that the link was revoked). Comments and verdicts already given stay. Revoking twice is harmless.","tags":["workspace"],"x-heyeveryone-kind":"mutation","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"shareLinkId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},"required":["workspaceId","shareLinkId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"shareLink":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"pieceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"revokedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"allowSignoff":{"type":"boolean"},"lastUsedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"createdByAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdByAgentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","workspaceId","pieceId","expiresAt","revokedAt","allowSignoff","lastUsedAt","createdByAccountId","createdByAgentClientId","createdAt"],"additionalProperties":false}},"required":["shareLink"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/rewrite_text":{"post":{"operationId":"rewrite_text","summary":"Rewrite text","description":"Apply one rewrite action to a piece of text: `shorten` it (to `targetChars` if given), `sharpen_hook` (rewrites the opening line only), `change_tone` (to `tone`), `fix_grammar`, `rephrase` (same meaning in fresh words), `punchier` (shorter sentences, stronger verbs), `translate` (into `language`, required) or `thread` (split into a thread: `text` holds the posts separated by a line with only `---`, and `posts` lists them, each under `targetChars` if given; pass them to create_post / update_post as segments). Returns the rewritten text only; it does not save anything. With `proposeFor` the result is also stored as a pending suggestion for the original draft or one segment of a channel version, bound to `baseVersion` (checked before anything is charged: `version_conflict`); a `thread` for a post replaces that segment with the thread's posts. A person accepts or rejects it (accept_proposal / reject_proposal). Costs 1 credit, also when the suggestion is later rejected.\n\nUses heyeveryone AI and costs 1 credits (1 credit per rewrite). Tell the person before calling it.","tags":["workspace"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional; the same as the body's `idempotencyKey`. The same key from the same agent in the same workspace within 24 hours returns the first result instead of doing it again.","schema":{"type":"string","minLength":1,"maxLength":200}}],"x-heyeveryone-kind":"mutation","x-heyeveryone-uses-credits":true,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"text":{"type":"string","minLength":1,"maxLength":5000},"action":{"type":"string","enum":["shorten","sharpen_hook","change_tone","fix_grammar","rephrase","punchier","translate","thread"]},"tone":{"type":"string","maxLength":60},"targetChars":{"type":"integer","exclusiveMinimum":0,"maximum":5000},"language":{"type":"string","minLength":2,"maxLength":40},"proposeFor":{"oneOf":[{"type":"object","properties":{"target":{"type":"string","const":"master"},"pieceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"baseVersion":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["target","pieceId","baseVersion"]},{"type":"object","properties":{"target":{"type":"string","const":"post"},"pieceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"postId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"segmentIndex":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"baseVersion":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["target","pieceId","postId","baseVersion"]}]},"idempotencyKey":{"type":"string","minLength":1,"maxLength":200}},"required":["workspaceId","text","action"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string"},"posts":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"proposal":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"pieceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"target":{"type":"string","enum":["master","post"]},"postId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"channelAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"format":{"anyOf":[{"type":"string","pattern":"^[a-z][a-z0-9_]*$"},{"type":"null"}]},"baseVersion":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"content":{"type":"object","properties":{"text":{"type":"string"},"segments":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string"},"media":{"type":"array","items":{"type":"object","properties":{"mediaAssetId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"altText":{"type":"string","maxLength":2000}},"required":["mediaAssetId"],"additionalProperties":false}}},"required":["text","media"],"additionalProperties":false}}},"additionalProperties":false},"origin":{"type":"string","enum":["adapt_piece","rewrite_text","agent","member"]},"note":{"type":["string","null"]},"creditsSpent":{"type":"integer","minimum":0,"maximum":9007199254740991},"status":{"type":"string","enum":["pending","accepted","rejected"]},"stale":{"type":"boolean"},"staleReason":{"type":["string","null"]},"currentVersion":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"author":{"type":"object","properties":{"kind":{"type":"string","enum":["member","guest","agent","system"]},"accountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"agentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"guestId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"name":{"type":"string"}},"required":["kind","accountId","agentClientId","guestId","name"],"additionalProperties":false},"decidedBy":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["member","guest","agent","system"]},"accountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"agentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"guestId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"name":{"type":"string"}},"required":["kind","accountId","agentClientId","guestId","name"],"additionalProperties":false},{"type":"null"}]},"decidedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"decisionNote":{"type":["string","null"]},"resultVersion":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","workspaceId","pieceId","target","postId","channelAccountId","format","baseVersion","content","origin","note","creditsSpent","status","stale","staleReason","currentVersion","author","decidedBy","decidedAt","decisionNote","resultVersion","createdAt"],"additionalProperties":false},{"type":"null"}]}},"required":["text","posts","proposal"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Service-specific errors: ai_generation_failed, insufficient_credits, plan_limit_reached, idempotency_conflict, version_conflict, post_locked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/schedule_versions":{"post":{"operationId":"schedule_versions","summary":"Schedule or post several channel versions","description":"Ship several channel versions of one content item in one action, after one confirmation: each item `{ postId, expectedVersion, when }` where `when` is \"now\", \"queue\" (the channel's next free queue slot) or an ISO 8601 time at least a minute ahead. Pass the `version` you showed (get_publish_plan) as `expectedVersion`: a version that changed since is refused (`version_conflict`). Every version gets its own result and partial success is normal: one failing (`invalid_post`, `signoff_required`, `channel_unavailable`, `skipped`, `time_in_past`, `no_queue_slots`, `not_schedulable`...) never stops the others. `confirmationToken` is a fresh random id per confirmation (8-128 of A-Z a-z 0-9 _ -); sending the same request again with it returns the first results (`replayed: true`) and never schedules twice; reusing it for a different request is refused (`token_reused`). People put versions live directly. An agent without auto-publish only requests: timed versions wait in `awaiting_confirmation` for a person (`needsYouUrl`), and \"now\" is refused (`confirmation_required`). Follow each version with get_post_status.\n\nA human confirms the result in heyeveryone's Needs you tray unless the account owner gave this agent auto-publish permission for the workspace (see whoami).","tags":["workspace"],"x-heyeveryone-kind":"mutation","x-heyeveryone-requires-confirmation":true,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"pieceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"confirmationToken":{"type":"string","pattern":"^[A-Za-z0-9_-]{8,128}$"},"versions":{"minItems":1,"maxItems":25,"type":"array","items":{"type":"object","properties":{"postId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"expectedVersion":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"when":{"anyOf":[{"type":"string","const":"now"},{"type":"string","const":"queue"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}]}},"required":["postId","expectedVersion","when"]}}},"required":["workspaceId","pieceId","confirmationToken","versions"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"confirmationToken":{"type":"string"},"replayed":{"type":"boolean"},"results":{"type":"array","items":{"type":"object","properties":{"postId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"ok":{"type":"boolean"},"status":{"type":"string","enum":["scheduled","awaiting_confirmation","unchanged"]},"post":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"pieceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"channelAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"format":{"type":"string","pattern":"^[a-z][a-z0-9_]*$"},"segments":{"minItems":1,"type":"array","items":{"type":"object","properties":{"text":{"type":"string"},"media":{"type":"array","items":{"type":"object","properties":{"mediaAssetId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"altText":{"type":"string","maxLength":2000}},"required":["mediaAssetId"],"additionalProperties":false}}},"required":["text","media"],"additionalProperties":false}},"settings":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"state":{"type":"string","enum":["draft","ready","awaiting_confirmation","scheduled","publishing","published","failed_retrying","needs_attention","failed","manual"]},"scheduledAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"scheduleSource":{"anyOf":[{"type":"string","enum":["manual","queue"]},{"type":"null"}]},"isSkipped":{"type":"boolean"},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"followsOriginal":{"type":"boolean"},"followIssue":{"type":["string","null"]},"requestedByAgentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"confirmedByAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"confirmedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"lastError":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"fix":{"type":"string"}},"required":["code","message"],"additionalProperties":false},{"type":"null"}]},"publishedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"permalink":{"type":["string","null"]},"createdByAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdByAgentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","workspaceId","pieceId","channelAccountId","format","segments","settings","state","scheduledAt","scheduleSource","isSkipped","version","followsOriginal","followIssue","requestedByAgentClientId","confirmedByAccountId","confirmedAt","lastError","publishedAt","permalink","createdByAccountId","createdByAgentClientId","createdAt","updatedAt"],"additionalProperties":false},"scheduledAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"queued":{"type":"boolean"},"needsConfirmation":{"type":"boolean"},"idempotencyKey":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"}},"required":["postId","ok","idempotencyKey"],"additionalProperties":false}},"summary":{"type":"object","properties":{"requested":{"type":"integer","minimum":0,"maximum":9007199254740991},"succeeded":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991},"needsConfirmation":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["requested","succeeded","failed","needsConfirmation"],"additionalProperties":false},"needsYouUrl":{"type":["string","null"]},"url":{"type":"string","description":"The content page in heyeveryone. Give it to the person so they can open the draft."}},"required":["confirmationToken","replayed","results","summary","needsYouUrl"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Service-specific errors: token_reused","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/search_pieces":{"post":{"operationId":"search_pieces","summary":"Search content","description":"Find content (board cards) in a workspace. Every filter is optional and they combine with AND: `status` (board columns idea, drafting, in_review, scheduled, published), `channelAccountId` or `platform` (has a post there), `campaign` (label), `ownerAccountId`, `text` (in the title or original draft), and a date range `from`/`to` (has a post scheduled or published in it). Returns board cards sorted by column and position, with channels, next time, open comments, review state, the latest reviewer's verdict and a failure flag. Archived content is left out unless `includeArchived`. Use get_piece for the full content.","tags":["workspace"],"x-heyeveryone-kind":"query","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"status":{"minItems":1,"type":"array","items":{"type":"string","enum":["idea","drafting","in_review","scheduled","published"]}},"channelAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"platform":{"type":"string","enum":["x","linkedin","threads","bluesky","instagram","facebook","tiktok","youtube","sandbox"]},"campaign":{"type":"string","minLength":1,"maxLength":60},"ownerAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"text":{"type":"string","minLength":1,"maxLength":200},"from":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"to":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"includeArchived":{"default":false,"type":"boolean"},"limit":{"default":100,"type":"integer","minimum":1,"maximum":200},"offset":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["workspaceId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"pieces":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"title":{"type":"string"},"status":{"type":"string","enum":["idea","drafting","in_review","scheduled","published"]},"campaignLabels":{"type":"array","items":{"type":"string"}},"ownerAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"boardPosition":{"type":"string"},"archivedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"createdByAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdByAgentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"signoffRequired":{"type":"boolean"},"plannedFor":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"plannedTime":{"anyOf":[{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},{"type":"null"}]},"platforms":{"type":"array","items":{"type":"string","enum":["x","linkedin","threads","bluesky","instagram","facebook","tiktok","youtube","sandbox"]}},"channels":{"type":"array","items":{"type":"object","properties":{"platform":{"type":"string","enum":["x","linkedin","threads","bluesky","instagram","facebook","tiktok","youtube","sandbox"]},"emulates":{"anyOf":[{"type":"string","enum":["x","linkedin","threads","bluesky","instagram","facebook","tiktok","youtube"]},{"type":"null"}]}},"required":["platform","emulates"],"additionalProperties":false}},"postCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"nextScheduledAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"openCommentCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"reviewState":{"type":"string","enum":["none","in_review","changes_requested","approved"]},"hasFailure":{"type":"boolean"},"needsAttention":{"anyOf":[{"type":"object","properties":{"postId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"platform":{"type":"string","enum":["x","linkedin","threads","bluesky","instagram","facebook","tiktok","youtube","sandbox"]},"title":{"type":"string"},"reason":{"type":"string"},"fix":{"type":"string"}},"required":["postId","platform","title","reason","fix"],"additionalProperties":false},{"type":"null"}]},"draftedByAgent":{"type":["string","null"]},"latestVerdict":{"anyOf":[{"type":"object","properties":{"reviewer":{"type":"object","properties":{"kind":{"type":"string","enum":["member","guest","agent","system"]},"accountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"agentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"guestId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"name":{"type":"string"}},"required":["kind","accountId","agentClientId","guestId","name"],"additionalProperties":false},"decision":{"type":"string","enum":["approved","changes_requested"]}},"required":["reviewer","decision"],"additionalProperties":false},{"type":"null"}]}},"required":["id","workspaceId","title","status","campaignLabels","ownerAccountId","boardPosition","archivedAt","createdByAccountId","createdByAgentClientId","createdAt","updatedAt","signoffRequired","platforms","channels","postCount","nextScheduledAt","openCommentCount","reviewState","hasFailure","needsAttention","draftedByAgent","latestVerdict"],"additionalProperties":false}},"hasMore":{"type":"boolean"}},"required":["pieces","hasMore"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/set_cover":{"post":{"operationId":"set_cover","summary":"Set a video's cover","description":"Choose the cover frame of a ready video: the still platforms show before it plays (YouTube thumbnail, Reel and TikTok cover where the platform allows choosing one). Give atMs, a time in the video in milliseconds. get_media lists the candidate frames heyeveryone already extracted (coverFrames); picking one of those takes effect at once. Any other time is extracted in the background (pending: true); the new frame becomes the cover within a minute. The chosen cover is always coverFrames[0].","tags":["workspace"],"x-heyeveryone-kind":"mutation","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"mediaAssetId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"atMs":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["workspaceId","mediaAssetId","atMs"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"mediaAsset":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"kind":{"type":"string","enum":["image","video"]},"status":{"type":"string","enum":["uploading","processing","ready","failed"]},"storageProvider":{"type":"string","enum":["supabase","r2"]},"storageBucket":{"type":"string"},"storageKey":{"type":"string"},"publicUrl":{"type":["string","null"]},"filename":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":["string","null"]},"width":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"height":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"durationMs":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"probe":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"probeError":{"type":["string","null"]},"covers":{"type":"array","items":{"type":"object","properties":{"storageKey":{"type":"string"},"width":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"height":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"atMs":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["storageKey","width","height","atMs"],"additionalProperties":false}},"altText":{"type":["string","null"]},"createdByAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdByAgentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"previewUrl":{"type":["string","null"]},"coverFrames":{"type":"array","items":{"type":"object","properties":{"atMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"width":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"height":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"url":{"type":"string"}},"required":["atMs","width","height","url"],"additionalProperties":false}},"fitsPlatforms":{"type":"array","items":{"type":"string","enum":["x","linkedin","threads","bluesky","instagram","facebook","tiktok","youtube","sandbox"]}}},"required":["id","workspaceId","kind","status","storageProvider","storageBucket","storageKey","publicUrl","filename","mimeType","sizeBytes","width","height","durationMs","probe","probeError","covers","altText","createdByAccountId","createdByAgentClientId","createdAt","updatedAt","previewUrl","coverFrames","fitsPlatforms"],"additionalProperties":false},"pending":{"type":"boolean"}},"required":["mediaAsset","pending"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Service-specific errors: not_a_video, not_ready","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/set_piece_status":{"post":{"operationId":"set_piece_status","summary":"Move content to a board column","description":"Move content between the manual board columns: idea, drafting, in_review. Scheduled and Published are not set by hand: they follow the posts (a content item is Scheduled when every post that isn't skipped has a confirmed time, Published when all went live), so asking for them fails with `derived_status`. Moving to in_review opens a share link for reviewers if the content item has none; its URL is returned once as `shareLink` (send it to the reviewer); for an agent no link is made (`shareLink` is null): people create review links, so ask with request_review. The card goes to the bottom of its new column.","tags":["workspace"],"x-heyeveryone-kind":"mutation","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"pieceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"status":{"type":"string","enum":["idea","drafting","in_review","scheduled","published"]}},"required":["workspaceId","pieceId","status"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"piece":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"title":{"type":"string"},"status":{"type":"string","enum":["idea","drafting","in_review","scheduled","published"]},"campaignLabels":{"type":"array","items":{"type":"string"}},"ownerAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"boardPosition":{"type":"string"},"archivedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"createdByAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdByAgentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"signoffRequired":{"type":"boolean"},"plannedFor":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"plannedTime":{"anyOf":[{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},{"type":"null"}]}},"required":["id","workspaceId","title","status","campaignLabels","ownerAccountId","boardPosition","archivedAt","createdByAccountId","createdByAgentClientId","createdAt","updatedAt","signoffRequired"],"additionalProperties":false},"shareLink":{"anyOf":[{"type":"object","properties":{"shareLink":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"pieceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"revokedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"allowSignoff":{"type":"boolean"},"lastUsedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"createdByAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdByAgentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","workspaceId","pieceId","expiresAt","revokedAt","allowSignoff","lastUsedAt","createdByAccountId","createdByAgentClientId","createdAt"],"additionalProperties":false},"token":{"type":"string"},"url":{"type":"string"}},"required":["shareLink","token","url"],"additionalProperties":false},{"type":"null"}]}},"required":["piece","shareLink"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Service-specific errors: illegal_transition, derived_status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/set_queue_slots":{"post":{"operationId":"set_queue_slots","summary":"Set queue slots","description":"Replace a channel account's weekly queue slots: a list of { dayOfWeek (0 = Monday ... 6 = Sunday), localTime \"HH:MM\" } in the workspace's time zone. add_to_queue puts posts into the next free slot. Pass an empty list to clear the queue. Posts already scheduled keep their times.","tags":["workspace"],"x-heyeveryone-kind":"mutation","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"channelAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"slots":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"dayOfWeek":{"type":"integer","minimum":0,"maximum":6},"localTime":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["dayOfWeek","localTime"]}}},"required":["workspaceId","channelAccountId","slots"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"channelAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"slots":{"type":"array","items":{"type":"object","properties":{"dayOfWeek":{"type":"integer","minimum":0,"maximum":6},"localTime":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"day":{"type":"string"}},"required":["dayOfWeek","localTime","id","day"],"additionalProperties":false}},"nextFree":{"type":"array","items":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"timeZone":{"type":"string"}},"required":["channelAccountId","slots","nextFree","timeZone"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/skip_post":{"post":{"operationId":"skip_post","summary":"Skip a post","description":"Skip a content item's post for one channel (it stays on the content item but is left out of scheduling, its status and the review page), or bring it back with `skipped: false`. Skipping a post that is awaiting confirmation or scheduled cancels its schedule first. A post that is publishing, published or waiting on a publishing fix can't be skipped (`post_locked`).","tags":["workspace"],"x-heyeveryone-kind":"mutation","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"postId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"skipped":{"default":true,"type":"boolean"}},"required":["workspaceId","postId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"post":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"pieceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"channelAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"format":{"type":"string","pattern":"^[a-z][a-z0-9_]*$"},"segments":{"minItems":1,"type":"array","items":{"type":"object","properties":{"text":{"type":"string"},"media":{"type":"array","items":{"type":"object","properties":{"mediaAssetId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"altText":{"type":"string","maxLength":2000}},"required":["mediaAssetId"],"additionalProperties":false}}},"required":["text","media"],"additionalProperties":false}},"settings":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"state":{"type":"string","enum":["draft","ready","awaiting_confirmation","scheduled","publishing","published","failed_retrying","needs_attention","failed","manual"]},"scheduledAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"scheduleSource":{"anyOf":[{"type":"string","enum":["manual","queue"]},{"type":"null"}]},"isSkipped":{"type":"boolean"},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"followsOriginal":{"type":"boolean"},"followIssue":{"type":["string","null"]},"requestedByAgentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"confirmedByAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"confirmedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"lastError":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"fix":{"type":"string"}},"required":["code","message"],"additionalProperties":false},{"type":"null"}]},"publishedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"permalink":{"type":["string","null"]},"createdByAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdByAgentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","workspaceId","pieceId","channelAccountId","format","segments","settings","state","scheduledAt","scheduleSource","isSkipped","version","followsOriginal","followIssue","requestedByAgentClientId","confirmedByAccountId","confirmedAt","lastError","publishedAt","permalink","createdByAccountId","createdByAgentClientId","createdAt","updatedAt"],"additionalProperties":false}},"required":["post"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Service-specific errors: post_locked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/start_channel_connect":{"post":{"operationId":"start_channel_connect","summary":"Start connecting a channel","description":"Start connecting a social account to a workspace. For OAuth platforms it returns an authorizeUrl: a person must open it in their browser, while signed in to heyeveryone as the same account, and approve access on the platform; they then return to heyeveryone and the account appears in list_channel_accounts. The link works once and expires after 15 minutes. For Bluesky it returns the fields to fill in (handle and an app password), which a person enters in heyeveryone. Fails with not_configured when heyeveryone has no app credentials for that platform in this environment. For test accounts use connect_sandbox_account. Some platforms sign in separately for each account type, so you choose one with `accountType` (get_channel_capabilities lists them as connectChoices). LinkedIn: 'profile' (a personal profile, the default) or 'page' (company pages the person administers; not_configured until LinkedIn has approved company pages for heyeveryone here). Leave accountType out on every other platform.","tags":["workspace"],"x-heyeveryone-kind":"mutation","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"platform":{"type":"string","enum":["x","linkedin","threads","bluesky","instagram","facebook","tiktok","youtube","sandbox"]},"returnTo":{"type":"string","maxLength":500,"pattern":"^\\/(?!\\/)[^\\s\\\\]*$"},"accountType":{"type":"string","pattern":"^[a-z][a-z_]{0,30}$"}},"required":["workspaceId","platform"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"oauth2"},"authorizeUrl":{"type":"string","format":"uri"},"expiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["kind","authorizeUrl","expiresAt"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"credentials"},"fields":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"secret":{"type":"boolean"},"help":{"type":"string"}},"required":["key","label","secret","help"],"additionalProperties":false}}},"required":["kind","fields"],"additionalProperties":false}]}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Service-specific errors: not_configured, use_sandbox, connect_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/suggest_angles":{"post":{"operationId":"suggest_angles","summary":"Suggest angles","description":"Turn one source (a URL's fetched text, a content item's sources and original draft, or text you paste in) into 3-5 distinct content angles to write from. Pure ideation: nothing is saved. Costs 1 credit.\n\nUses heyeveryone AI and costs 1 credits (1 credit per suggestion). Tell the person before calling it.","tags":["workspace"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional; the same as the body's `idempotencyKey`. The same key from the same agent in the same workspace within 24 hours returns the first result instead of doing it again.","schema":{"type":"string","minLength":1,"maxLength":200}}],"x-heyeveryone-kind":"mutation","x-heyeveryone-uses-credits":true,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"pieceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"sourceText":{"type":"string","minLength":1,"maxLength":10000},"count":{"default":4,"type":"integer","minimum":3,"maximum":5},"idempotencyKey":{"type":"string","minLength":1,"maxLength":200}},"required":["workspaceId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"angles":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"}},"required":["title","description"],"additionalProperties":false}}},"required":["angles"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Service-specific errors: piece_not_found, insufficient_source, ai_generation_failed, insufficient_credits, plan_limit_reached, idempotency_conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/transcribe_media":{"post":{"operationId":"transcribe_media","summary":"Transcribe media","description":"Transcribe a video's audio to text with timestamped segments and an SRT/VTT subtitle file, so it can feed text posts. Runs as a background job; poll get_transcript for the result. Billed per minute of media (2 credits/minute, 2 minimum), spent up front and refunded automatically if the job fails.\n\nUses heyeveryone AI and costs credits: 2 credits per minute of media, 2 minimum (the exact amount is known once the job reads the media's duration). Tell the person before calling it.","tags":["workspace"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional; the same as the body's `idempotencyKey`. The same key from the same agent in the same workspace within 24 hours returns the first result instead of doing it again.","schema":{"type":"string","minLength":1,"maxLength":200}}],"x-heyeveryone-kind":"mutation","x-heyeveryone-uses-credits":true,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"mediaAssetId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"idempotencyKey":{"type":"string","minLength":1,"maxLength":200}},"required":["workspaceId","mediaAssetId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"transcriptId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"status":{"type":"string","const":"pending"}},"required":["transcriptId","status"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Service-specific errors: media_not_found, media_not_ready, insufficient_credits, plan_limit_reached, idempotency_conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/try_voice_profile":{"post":{"operationId":"try_voice_profile","summary":"Try the voice on a sample","description":"Rewrite a short sample text in the workspace's voice profile, to check the profile sounds right before relying on it. Saves nothing. Needs a voice profile (build_voice_profile). Costs 1 credit.\n\nUses heyeveryone AI and costs 1 credits (1 credit per try). Tell the person before calling it.","tags":["workspace"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional; the same as the body's `idempotencyKey`. The same key from the same agent in the same workspace within 24 hours returns the first result instead of doing it again.","schema":{"type":"string","minLength":1,"maxLength":200}}],"x-heyeveryone-kind":"mutation","x-heyeveryone-uses-credits":true,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"text":{"type":"string","minLength":1,"maxLength":2000},"idempotencyKey":{"type":"string","minLength":1,"maxLength":200}},"required":["workspaceId","text"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string"},"creditsSpent":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["text","creditsSpent"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Service-specific errors: no_voice_profile, ai_generation_failed, insufficient_credits, idempotency_conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/update_master":{"post":{"operationId":"update_master","summary":"Update the original draft","description":"Write a content item's original draft: the idea in its best form (text plus ordered media), which every channel post is adapted from. Pass `text` and/or `media` (replaces the list). Each change creates a new version (see get_history). Pass the `version` you read as `expectedVersion` to avoid overwriting someone else's newer edit; a mismatch fails with `version_conflict` and nothing is saved. Channel versions that follow the original (`followsOriginal`, see follow_original) take the edit too, as a new version of each, but only while they are a draft or ready and only when the result still passes their channel's rules; otherwise they stay as they were and their `followIssue` says why (a version that is awaiting confirmation, scheduled, publishing or published never changes this way). `following` lists those versions as they are after the edit. Customized versions never change: update them with update_post.","tags":["workspace"],"x-heyeveryone-kind":"mutation","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"pieceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"text":{"type":"string","maxLength":100000},"media":{"maxItems":35,"type":"array","items":{"type":"object","properties":{"mediaAssetId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"altText":{"type":"string","maxLength":2000}},"required":["mediaAssetId"]}},"expectedVersion":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["workspaceId","pieceId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"master":{"type":"object","properties":{"pieceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"text":{"type":"string"},"media":{"type":"array","items":{"type":"object","properties":{"mediaAssetId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"altText":{"type":"string","maxLength":2000}},"required":["mediaAssetId"],"additionalProperties":false}},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"updatedByAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"updatedByAgentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["pieceId","workspaceId","text","media","version","updatedByAccountId","updatedByAgentClientId","createdAt","updatedAt"],"additionalProperties":false},"changed":{"type":"boolean"},"following":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"pieceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"channelAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"format":{"type":"string","pattern":"^[a-z][a-z0-9_]*$"},"segments":{"minItems":1,"type":"array","items":{"type":"object","properties":{"text":{"type":"string"},"media":{"type":"array","items":{"type":"object","properties":{"mediaAssetId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"altText":{"type":"string","maxLength":2000}},"required":["mediaAssetId"],"additionalProperties":false}}},"required":["text","media"],"additionalProperties":false}},"settings":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"state":{"type":"string","enum":["draft","ready","awaiting_confirmation","scheduled","publishing","published","failed_retrying","needs_attention","failed","manual"]},"scheduledAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"scheduleSource":{"anyOf":[{"type":"string","enum":["manual","queue"]},{"type":"null"}]},"isSkipped":{"type":"boolean"},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"followsOriginal":{"type":"boolean"},"followIssue":{"type":["string","null"]},"requestedByAgentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"confirmedByAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"confirmedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"lastError":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"fix":{"type":"string"}},"required":["code","message"],"additionalProperties":false},{"type":"null"}]},"publishedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"permalink":{"type":["string","null"]},"createdByAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdByAgentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","workspaceId","pieceId","channelAccountId","format","segments","settings","state","scheduledAt","scheduleSource","isSkipped","version","followsOriginal","followIssue","requestedByAgentClientId","confirmedByAccountId","confirmedAt","lastError","publishedAt","permalink","createdByAccountId","createdByAgentClientId","createdAt","updatedAt"],"additionalProperties":false}},"url":{"type":"string","description":"The content page in heyeveryone. Give it to the person so they can open the draft."}},"required":["master","changed","following","url"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Service-specific errors: version_conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/update_media":{"post":{"operationId":"update_media","summary":"Update media","description":"Change a media asset's alt text (what screen readers say about the image or video; null or an empty string clears it) or its display file name. Alt text set on a post's media reference overrides this one for that post. To write alt text with AI, use generate_alt_text.","tags":["workspace"],"x-heyeveryone-kind":"mutation","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"mediaAssetId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"altText":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"filename":{"type":"string","minLength":1,"maxLength":255}},"required":["workspaceId","mediaAssetId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"mediaAsset":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"kind":{"type":"string","enum":["image","video"]},"status":{"type":"string","enum":["uploading","processing","ready","failed"]},"storageProvider":{"type":"string","enum":["supabase","r2"]},"storageBucket":{"type":"string"},"storageKey":{"type":"string"},"publicUrl":{"type":["string","null"]},"filename":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":["string","null"]},"width":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"height":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"durationMs":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"probe":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"probeError":{"type":["string","null"]},"covers":{"type":"array","items":{"type":"object","properties":{"storageKey":{"type":"string"},"width":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"height":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"atMs":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["storageKey","width","height","atMs"],"additionalProperties":false}},"altText":{"type":["string","null"]},"createdByAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdByAgentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"previewUrl":{"type":["string","null"]},"coverFrames":{"type":"array","items":{"type":"object","properties":{"atMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"width":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"height":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"url":{"type":"string"}},"required":["atMs","width","height","url"],"additionalProperties":false}},"fitsPlatforms":{"type":"array","items":{"type":"string","enum":["x","linkedin","threads","bluesky","instagram","facebook","tiktok","youtube","sandbox"]}}},"required":["id","workspaceId","kind","status","storageProvider","storageBucket","storageKey","publicUrl","filename","mimeType","sizeBytes","width","height","durationMs","probe","probeError","covers","altText","createdByAccountId","createdByAgentClientId","createdAt","updatedAt","previewUrl","coverFrames","fitsPlatforms"],"additionalProperties":false}},"required":["mediaAsset"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/update_piece":{"post":{"operationId":"update_piece","summary":"Update content","description":"Change a content item's title (rename), campaign labels (replaces the list), owner or planning date (`plannedFor`, YYYY-MM-DD in the workspace's time zone, null to clear; a planning aid that never schedules anything), planning time (`plannedTime`, HH:MM 24-hour on that day, null for the whole day; needs a planning date; clearing the date clears the time, moving the date keeps it), or move its card within its board column (`place`: the ids of the cards it should sit between; null for the top or bottom). To move a card to another column use set_piece_status; to change the idea's text use update_master.","tags":["workspace"],"x-heyeveryone-kind":"mutation","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"pieceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"title":{"type":"string","minLength":1,"maxLength":300},"campaignLabels":{"maxItems":10,"type":"array","items":{"type":"string","minLength":1,"maxLength":60}},"ownerAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"plannedFor":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"plannedTime":{"anyOf":[{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},{"type":"null"}]},"place":{"type":"object","properties":{"afterPieceId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"beforePieceId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]}},"required":["afterPieceId","beforePieceId"]}},"required":["workspaceId","pieceId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"piece":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"title":{"type":"string"},"status":{"type":"string","enum":["idea","drafting","in_review","scheduled","published"]},"campaignLabels":{"type":"array","items":{"type":"string"}},"ownerAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"boardPosition":{"type":"string"},"archivedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"createdByAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdByAgentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"signoffRequired":{"type":"boolean"},"plannedFor":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"plannedTime":{"anyOf":[{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},{"type":"null"}]}},"required":["id","workspaceId","title","status","campaignLabels","ownerAccountId","boardPosition","archivedAt","createdByAccountId","createdByAgentClientId","createdAt","updatedAt","signoffRequired"],"additionalProperties":false},"url":{"type":"string","description":"The content page in heyeveryone. Give it to the person so they can open the draft."}},"required":["piece","url"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/update_post":{"post":{"operationId":"update_post","summary":"Update a post","description":"Edit a channel post: `segments` (replaces them: one for a single post, several for a thread), `settings` (replaces them), `format`, or mark it `ready` (true) / back to draft (false). Every content change creates a new version and voids sign-offs on the post. Pass the `version` you read as `expectedVersion`; a mismatch fails with `version_conflict`. A scheduled post must stay valid (`invalid_post` otherwise). If an agent without auto-publish edits a scheduled post, the post goes back to awaiting_confirmation so a human confirms the new content. Posts that are publishing, published or need a publishing fix can't be edited (`post_locked`). Changing `segments` customizes a version that followed the original draft (`followsOriginal` becomes false; follow_original links it again). Returns validation `issues` for the new content.","tags":["workspace"],"x-heyeveryone-kind":"mutation","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"postId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"segments":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"text":{"type":"string","maxLength":100000},"media":{"default":[],"maxItems":35,"type":"array","items":{"type":"object","properties":{"mediaAssetId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"altText":{"type":"string","maxLength":2000}},"required":["mediaAssetId"]}}},"required":["text"]}},"settings":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"format":{"type":"string","pattern":"^[a-z][a-z0-9_]*$"},"ready":{"type":"boolean"},"expectedVersion":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["workspaceId","postId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"post":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"pieceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"channelAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"format":{"type":"string","pattern":"^[a-z][a-z0-9_]*$"},"segments":{"minItems":1,"type":"array","items":{"type":"object","properties":{"text":{"type":"string"},"media":{"type":"array","items":{"type":"object","properties":{"mediaAssetId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"altText":{"type":"string","maxLength":2000}},"required":["mediaAssetId"],"additionalProperties":false}}},"required":["text","media"],"additionalProperties":false}},"settings":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"state":{"type":"string","enum":["draft","ready","awaiting_confirmation","scheduled","publishing","published","failed_retrying","needs_attention","failed","manual"]},"scheduledAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"scheduleSource":{"anyOf":[{"type":"string","enum":["manual","queue"]},{"type":"null"}]},"isSkipped":{"type":"boolean"},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"followsOriginal":{"type":"boolean"},"followIssue":{"type":["string","null"]},"requestedByAgentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"confirmedByAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"confirmedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"lastError":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"fix":{"type":"string"}},"required":["code","message"],"additionalProperties":false},{"type":"null"}]},"publishedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"permalink":{"type":["string","null"]},"createdByAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdByAgentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","workspaceId","pieceId","channelAccountId","format","segments","settings","state","scheduledAt","scheduleSource","isSkipped","version","followsOriginal","followIssue","requestedByAgentClientId","confirmedByAccountId","confirmedAt","lastError","publishedAt","permalink","createdByAccountId","createdByAgentClientId","createdAt","updatedAt"],"additionalProperties":false},"changed":{"type":"boolean"},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning"]},"segmentIndex":{"type":"integer","minimum":0,"maximum":9007199254740991},"field":{"type":"string"}},"required":["code","message","severity"],"additionalProperties":false}},"url":{"type":"string","description":"The content page in heyeveryone. Give it to the person so they can open the draft."}},"required":["post","changed","issues","url"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Service-specific errors: version_conflict, post_locked, invalid_post, unknown_format","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/update_sandbox_settings":{"post":{"operationId":"update_sandbox_settings","summary":"Set Sandbox failure switches","description":"Change how a Sandbox account behaves, to rehearse failures: failNext makes the next publish(es) fail with a given error (auth_expired, rate_limited, rejected_content, media_unsupported, platform_error, not_permitted, or timeout_after_send, where the post DOES go live but the answer is lost), `times` publishes in a row (default 1), then clears itself; failNext null clears it. tokenExpired makes health checks ask for a reconnect and publishing fail with auth_expired. latencyMs slows every response. creatorInfo (accounts that behave like TikTok) sets what TikTok's creator info answers: commentDisabled / duetDisabled / stitchDisabled (the creator turned them off), maxVideoPostDurationSec, privacyLevelOptions, or cannotPost (spam_risk_too_many_posts, spam_risk_user_banned_from_posting, reached_active_user_cap: the creator can't post right now); null goes back to TikTok's defaults. Only fields you pass change. Works only on Sandbox accounts.","tags":["workspace"],"x-heyeveryone-kind":"mutation","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"channelAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"failNext":{"anyOf":[{"type":"object","properties":{"error":{"type":"string","enum":["auth_expired","rate_limited","rejected_content","media_unsupported","platform_error","timeout_after_send","not_permitted"]},"times":{"default":1,"type":"integer","minimum":1,"maximum":100},"message":{"type":"string","minLength":1,"maxLength":500}},"required":["error"]},{"type":"null"}]},"tokenExpired":{"type":"boolean"},"latencyMs":{"type":"integer","minimum":0,"maximum":60000},"creatorInfo":{"anyOf":[{"type":"object","properties":{"commentDisabled":{"type":"boolean"},"duetDisabled":{"type":"boolean"},"stitchDisabled":{"type":"boolean"},"maxVideoPostDurationSec":{"type":"integer","minimum":1,"maximum":3600},"privacyLevelOptions":{"minItems":1,"type":"array","items":{"type":"string","enum":["PUBLIC_TO_EVERYONE","MUTUAL_FOLLOW_FRIENDS","FOLLOWER_OF_CREATOR","SELF_ONLY"]}},"cannotPost":{"anyOf":[{"type":"string","enum":["spam_risk_too_many_posts","spam_risk_user_banned_from_posting","reached_active_user_cap"]},{"type":"null"}]}}},{"type":"null"}]}},"required":["workspaceId","channelAccountId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"settings":{"type":"object","properties":{"failNext":{"default":null,"anyOf":[{"type":"object","properties":{"error":{"type":"string","enum":["auth_expired","rate_limited","rejected_content","media_unsupported","platform_error","timeout_after_send","not_permitted"]},"remaining":{"type":"integer","minimum":1,"maximum":100},"message":{"type":"string","maxLength":500}},"required":["error","remaining"],"additionalProperties":false},{"type":"null"}]},"tokenExpired":{"default":false,"type":"boolean"},"latencyMs":{"default":0,"type":"integer","minimum":0,"maximum":60000},"creatorInfo":{"default":null,"anyOf":[{"type":"object","properties":{"commentDisabled":{"type":"boolean"},"duetDisabled":{"type":"boolean"},"stitchDisabled":{"type":"boolean"},"maxVideoPostDurationSec":{"type":"integer","minimum":1,"maximum":3600},"privacyLevelOptions":{"minItems":1,"type":"array","items":{"type":"string","enum":["PUBLIC_TO_EVERYONE","MUTUAL_FOLLOW_FRIENDS","FOLLOWER_OF_CREATOR","SELF_ONLY"]}},"cannotPost":{"anyOf":[{"type":"string","enum":["spam_risk_too_many_posts","spam_risk_user_banned_from_posting","reached_active_user_cap"]},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]}},"required":["failNext","tokenExpired","latencyMs","creatorInfo"],"additionalProperties":false}},"required":["settings"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Service-specific errors: not_sandbox","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/update_snippet":{"post":{"operationId":"update_snippet","summary":"Edit a snippet","description":"Change a snippet's `name` or `body`. Drafts that already use the snippet keep the text they have.","tags":["workspace"],"x-heyeveryone-kind":"mutation","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"snippetId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"name":{"type":"string","minLength":1,"maxLength":80},"body":{"type":"string","maxLength":10000}},"required":["workspaceId","snippetId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"snippet":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"name":{"type":"string"},"body":{"type":"string"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","name","body","createdAt","updatedAt"],"additionalProperties":false}},"required":["snippet"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Service-specific errors: name_taken","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/update_source":{"post":{"operationId":"update_source","summary":"Edit a source","description":"Change a source's `title` (null clears it), the text of a note (`note`), or the text of a transcript (`transcript`). What was fetched from a URL, and media, can't be edited: they are what was read. Editing a source doesn't change content already written from it.","tags":["workspace"],"x-heyeveryone-kind":"mutation","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"sourceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"title":{"anyOf":[{"type":"string","minLength":1,"maxLength":300},{"type":"null"}]},"note":{"type":"string","minLength":1,"maxLength":50000},"transcript":{"type":"string","minLength":1,"maxLength":500000}},"required":["workspaceId","sourceId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"source":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"pieceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"kind":{"type":"string","enum":["url","media","note","transcript"]},"title":{"type":["string","null"]},"url":{"type":["string","null"]},"mediaAssetId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"note":{"type":["string","null"]},"fetchedText":{"type":["string","null"]},"fetchStatus":{"type":"string","enum":["not_applicable","pending","fetching","fetched","failed"]},"fetchError":{"type":["string","null"]},"fetchedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"createdByAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdByAgentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"description":{"type":["string","null"]}},"required":["id","workspaceId","pieceId","kind","title","url","mediaAssetId","note","fetchedText","fetchStatus","fetchError","fetchedAt","createdByAccountId","createdByAgentClientId","createdAt","updatedAt","description"],"additionalProperties":false}},"required":["source"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Service-specific errors: not_editable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/update_template":{"post":{"operationId":"update_template","summary":"Edit a template","description":"Change a template's `name`, `description` (null clears it), `titlePattern`, `masterText`, `campaignLabels` or `channels`. `channels`, when given, replaces the whole list (send every channel you want to keep, in order). Content already created from the template doesn't change. Placeholders are written `{name}` (a letter first; letters, digits, spaces, `_` or `-`), for example `{product}` or `{episode number}`; the template's `placeholders` lists them, and create_piece_from_template fills them from `values`.","tags":["workspace"],"x-heyeveryone-kind":"mutation","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"templateId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"name":{"type":"string","minLength":1,"maxLength":120},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"titlePattern":{"type":"string","minLength":1,"maxLength":300},"masterText":{"type":"string","maxLength":100000},"campaignLabels":{"maxItems":10,"type":"array","items":{"type":"string","minLength":1,"maxLength":60}},"channels":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"channelAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"format":{"anyOf":[{"type":"string","pattern":"^[a-z][a-z0-9_]*$"},{"type":"null"}]},"segments":{"anyOf":[{"minItems":1,"maxItems":25,"type":"array","items":{"type":"string","maxLength":100000}},{"type":"null"}]}},"required":["channelAccountId"]}}},"required":["workspaceId","templateId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"template":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"name":{"type":"string"},"description":{"type":["string","null"]},"titlePattern":{"type":"string"},"masterText":{"type":"string"},"campaignLabels":{"type":"array","items":{"type":"string"}},"channels":{"type":"array","items":{"type":"object","properties":{"channelAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"platform":{"type":"string","enum":["x","linkedin","threads","bluesky","instagram","facebook","tiktok","youtube","sandbox"]},"handle":{"type":["string","null"]},"displayName":{"type":["string","null"]},"status":{"type":"string","enum":["active","reconnect_required","disconnected"]},"format":{"anyOf":[{"type":"string","pattern":"^[a-z][a-z0-9_]*$"},{"type":"null"}]},"segments":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]}},"required":["channelAccountId","platform","handle","displayName","status","format","segments"],"additionalProperties":false}},"placeholders":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","name","description","titlePattern","masterText","campaignLabels","channels","placeholders","createdAt","updatedAt"],"additionalProperties":false}},"required":["template"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Service-specific errors: name_taken","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/update_voice_profile":{"post":{"operationId":"update_voice_profile","summary":"Edit the voice profile","description":"Hand-edit the workspace's voice profile description and/or traits. A plain edit by a person or an agent, not an AI action - free, no credits.","tags":["workspace"],"x-heyeveryone-kind":"mutation","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"description":{"type":"string","maxLength":4000},"traits":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["workspaceId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"voiceProfile":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"description":{"type":"string"},"traits":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"samples":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string"},"source":{"type":"string"}},"required":["text"],"additionalProperties":false}},"updatedByAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"updatedByAgentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["workspaceId","description","traits","samples","updatedByAccountId","updatedByAgentClientId","createdAt","updatedAt"],"additionalProperties":false}},"required":["voiceProfile"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/update_workspace":{"post":{"operationId":"update_workspace","summary":"Change workspace settings","description":"Change a workspace's name, slug, time zone (IANA, for example Europe/Istanbul; queue slots and the calendar follow it), how many days new review links work (`shareLinkExpiresDays`, null = never expire), and whether new content requires sign-off (`signoffDefault`; people only). Pass only what changes. Owners only.","tags":["workspace"],"x-heyeveryone-kind":"mutation","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"name":{"type":"string","minLength":1,"maxLength":100},"slug":{"type":"string","minLength":2,"maxLength":48,"pattern":"^[a-z0-9]+(-[a-z0-9]+)*$"},"timeZone":{"type":"string","minLength":1,"maxLength":64},"shareLinkExpiresDays":{"anyOf":[{"type":"integer","minimum":1,"maximum":365},{"type":"null"}]},"signoffDefault":{"type":"boolean"}},"required":["workspaceId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"name":{"type":"string"},"slug":{"type":"string"},"timeZone":{"type":"string"},"shareLinkExpiresDays":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"signoffDefault":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"role":{"type":"string","enum":["owner","editor"]},"billingOwnerAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"counts":{"type":"object","properties":{"members":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"channelAccounts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"pieces":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["members","channelAccounts","pieces"],"additionalProperties":false}},"required":["id","name","slug","timeZone","shareLinkExpiresDays","signoffDefault","createdAt","role","billingOwnerAccountId","counts"],"additionalProperties":false}},"required":["workspace"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Service-specific errors: slug_taken","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/upload_media_from_url":{"post":{"operationId":"upload_media_from_url","summary":"Upload media from a URL","description":"Add an image or a finished video to the workspace's media library from a public http(s) URL. heyeveryone downloads it in the background (images up to 50 MB, videos up to 300 MB; JPEG, PNG, WebP, GIF, MP4, MOV, WebM), checks it (dimensions, duration, codecs) and picks cover frames for videos. The asset comes back with status 'uploading'; poll get_media until it is 'ready' (usually under a minute) or 'failed' (with probeError in plain words). Then reference it in posts by its id (mediaAssetId). Optionally give a file name and alt text. Private or internal addresses are refused.","tags":["workspace"],"x-heyeveryone-kind":"mutation","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"url":{"type":"string","minLength":1,"maxLength":2000},"filename":{"type":"string","minLength":1,"maxLength":255},"altText":{"type":"string","maxLength":2000},"kind":{"type":"string","enum":["image","video"]}},"required":["workspaceId","url"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"mediaAsset":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"kind":{"type":"string","enum":["image","video"]},"status":{"type":"string","enum":["uploading","processing","ready","failed"]},"storageProvider":{"type":"string","enum":["supabase","r2"]},"storageBucket":{"type":"string"},"storageKey":{"type":"string"},"publicUrl":{"type":["string","null"]},"filename":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":["string","null"]},"width":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"height":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"durationMs":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"probe":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"probeError":{"type":["string","null"]},"covers":{"type":"array","items":{"type":"object","properties":{"storageKey":{"type":"string"},"width":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"height":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"atMs":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["storageKey","width","height","atMs"],"additionalProperties":false}},"altText":{"type":["string","null"]},"createdByAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdByAgentClientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"previewUrl":{"type":["string","null"]},"coverFrames":{"type":"array","items":{"type":"object","properties":{"atMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"width":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"height":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"url":{"type":"string"}},"required":["atMs","width","height","url"],"additionalProperties":false}},"fitsPlatforms":{"type":"array","items":{"type":"string","enum":["x","linkedin","threads","bluesky","instagram","facebook","tiktok","youtube","sandbox"]}}},"required":["id","workspaceId","kind","status","storageProvider","storageBucket","storageKey","publicUrl","filename","mimeType","sizeBytes","width","height","durationMs","probe","probeError","covers","altText","createdByAccountId","createdByAgentClientId","createdAt","updatedAt","previewUrl","coverFrames","fitsPlatforms"],"additionalProperties":false}},"required":["mediaAsset"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Service-specific errors: invalid_url","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/validate_post":{"post":{"operationId":"validate_post","summary":"Check a post against a platform's rules","description":"Check a post against a platform's rules before scheduling it: text length (counted the platform's way, for example X's weighted count where links are 23 characters), thread length, media count, types, sizes, video length and aspect ratio, alt text, and required settings. Returns issues with plain-words messages; 'error' issues block publishing, 'warning' issues don't. Either pass postId to check a saved post, or pass channelAccountId (or platform) with format, segments (text plus mediaAssetIds from the media library) and settings to check a draft. A Sandbox account that emulates a platform is checked by that platform's rules and takes its prefixed formats (x__text, tiktok__video...). Reads only; nothing is saved.","tags":["workspace"],"x-heyeveryone-kind":"query","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"postId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"channelAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"platform":{"type":"string","enum":["x","linkedin","threads","bluesky","instagram","facebook","tiktok","youtube","sandbox"]},"format":{"type":"string","pattern":"^[a-z][a-z0-9_]*$"},"segments":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"text":{"type":"string"},"media":{"type":"array","items":{"type":"object","properties":{"mediaAssetId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"altText":{"type":"string","maxLength":2000}},"required":["mediaAssetId"]}}},"required":["text","media"]}},"settings":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["workspaceId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"platform":{"type":"string","enum":["x","linkedin","threads","bluesky","instagram","facebook","tiktok","youtube","sandbox"]},"format":{"type":"string"},"publishable":{"type":"boolean"},"issues":{"type":"array","items":{"type":"object","properties":{"severity":{"type":"string","enum":["error","warning"]},"code":{"type":"string"},"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}},"limit":{"type":"number"},"actual":{"type":"number"}},"required":["severity","code","message","path"],"additionalProperties":false}}},"required":["platform","format","publishable","issues"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/whoami":{"post":{"operationId":"whoami","summary":"Who am I","description":"Tell you who you are acting as: the heyeveryone account, and for an agent its name and the workspaces it may use, with whether it may publish without a human (autoPublish, off by default). Call it at the start of a session, together with list_workspaces. When autoPublish is off, scheduling tools put posts in the account owner's Updates for a human to confirm.","tags":["account"],"x-heyeveryone-kind":"query","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"actor":{"type":"string","enum":["member","agent"]},"account":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"email":{"type":"string"},"displayName":{"type":["string","null"]}},"required":["id","email","displayName"],"additionalProperties":false},"agent":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"name":{"type":"string"},"kind":{"type":"string","enum":["oauth","personal_token"]}},"required":["id","name","kind"],"additionalProperties":false},{"type":"null"}],"description":"The connected agent you are, or null for a signed-in person."},"workspaces":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"name":{"type":"string"},"role":{"type":"string","enum":["owner","editor"],"description":"The account's role in the workspace."},"autoPublish":{"type":"boolean","description":"True when you may schedule and publish without a human confirming."}},"required":["id","name","role","autoPublish"],"additionalProperties":false}},"appUrl":{"type":"string","description":"The heyeveryone web app, for links you give the person."}},"required":["actor","account","agent","workspaces","appUrl"],"additionalProperties":false}}}},"400":{"description":"invalid_input: the body does not match the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthenticated: missing, invalid, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: the agent may not do this (for example, another workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"schemas":{"Error":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","description":"A stable error code, for example forbidden."},"message":{"type":"string","description":"What went wrong, in plain words."}}}},"responses":{"RateLimited":{"description":"rate_limited: too many requests from this agent, account or address (docs/setup/agents.md, Rate limits); wait the Retry-After seconds, then retry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer","minimum":1}}}}},"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Personal access token (hey_pat_...)"},"oauth":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"https://heyeveryone.ai/oauth/authorize","tokenUrl":"https://heyeveryone.ai/oauth/token","refreshUrl":"https://heyeveryone.ai/oauth/token","scopes":{"agent":"Act as your agent in the workspaces you choose"}}}}}}}