{"openapi":"3.1.0","info":{"title":"hq-backend — Business API","description":"Public business tool endpoints (API-key auth).","version":"0.1.0"},"servers":[{"url":"https://api.agents.writesonic.com"}],"paths":{"/api/v1/business/agent-runs/query":{"post":{"tags":["business"],"summary":"Query agent runs","description":"See the history of agent runs for a task or an agent, or follow the step-by-step progress of a single run.\n\n**Example:** \"Show the agent run history for the task 'Fix login bug'\"\n\n**Usage:** choose what you want with `scope` — the runs of a task (needs the task id), the runs of an agent (needs the agent id), or the live progress of one run (needs the task id and the run id). The run lists come back in pages of up to 100 (50 by default); pass the cursor from the previous page to get the next one.\n\n**Response:** a list of runs, each showing its status, what triggered it, when it started and finished, and how many tokens it used. A progress request returns the run's steps in order.","operationId":"get_agent_runs_api_v1_business_agent_runs_query_post","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"x-project-id","in":"header","required":true,"schema":{"type":"string","format":"uuid","description":"Project ID for tenant scoping","title":"X-Project-Id"},"description":"Project ID for tenant scoping"},{"name":"X-Workspace-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Overrides the key's workspace","title":"X-Workspace-Id"},"description":"Overrides the key's workspace"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentRunsArgs"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AgentRunListResponse"},{"$ref":"#/components/schemas/AgentProgressJSONResponse"}],"title":"Response Get Agent Runs Api V1 Business Agent Runs Query Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/business/attachments/download-url":{"post":{"tags":["business"],"summary":"Get attachment download URL","description":"Get a short-lived link for downloading a file attached to a task or a comment.\n\n**Example:** \"Give me a download link for this attachment\"\n\n**Usage:** say where the file lives with `target` — a task (needs the task id) or a comment — and pass the attachment id. The link is presigned and expires after a short while, so use it promptly.\n\n**Response:** the download link plus the file's name, content type, and when the link expires. It does not return the file contents themselves.","operationId":"download_attachment_api_v1_business_attachments_download_url_post","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"x-project-id","in":"header","required":true,"schema":{"type":"string","format":"uuid","description":"Project ID for tenant scoping","title":"X-Project-Id"},"description":"Project ID for tenant scoping"},{"name":"X-Workspace-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Overrides the key's workspace","title":"X-Workspace-Id"},"description":"Overrides the key's workspace"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DownloadAttachmentArgs"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttachmentDownload"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/business/content-intelligence/dashboard":{"post":{"tags":["business"],"summary":"Get content-intelligence dashboard","description":"Returns project-level content-intelligence data for the dashboard: page and live-tracking summaries, the available filters and countries, the ranked list of tracked pages, page groups, and the columns shown in the page list.\n\n**Example:** \"List the Pages I'm tracking\"\n\n**Usage:** pick what you want with `view`: summary and live_summary for the headline numbers, countries and filters for the choices you can filter and sort by, pages for the ranked page list, groups for named page groups, and column_scope for the page-list columns. Scope the numbers with a market and a date window, and narrow the page list by search text, status, keyword intent, or group. The page list comes back in pages of up to 100 (50 by default). Use view=pages with a URL or title in search to find the page id other reports need, and view=filters to learn the real sort keys and ready-made presets before sorting.\n\n**Response:** the data for the chosen view: summary metrics, the list of countries or filters, the ranked pages with their metrics, the page groups, or the page-list columns.","operationId":"get_ci_dashboard_api_v1_business_content_intelligence_dashboard_post","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"x-project-id","in":"header","required":true,"schema":{"type":"string","format":"uuid","description":"Project ID for tenant scoping","title":"X-Project-Id"},"description":"Project ID for tenant scoping"},{"name":"X-Workspace-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Overrides the key's workspace","title":"X-Workspace-Id"},"description":"Overrides the key's workspace"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CiDashboardArgs"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/business/content-intelligence/page-report":{"post":{"tags":["business"],"summary":"Get page content-intelligence report","description":"Returns a detailed content-intelligence report for a single tracked page, covering SEO performance, AI citations, conversion funnels, traffic, SERP position, keywords, page lifecycle, or activity.\n\n**Example:** \"Show me the SEO performance report for this page\"\n\n**Usage:** pick the report you want with `report_type` and pass the id of the page to report on. The keyword, SERP, and target-keyword reports need a market to be chosen. Scope the numbers with a date window, and for the AI-citations and keyword reports you can narrow by search text. The longer reports come back in pages of up to 100 (50 by default). Find the page id first by listing pages on the dashboard with the page URL or title.\n\n**Response:** the requested report for that page: its metrics, trends, and the supporting rows for the chosen report type.","operationId":"get_page_report_api_v1_business_content_intelligence_page_report_post","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"x-project-id","in":"header","required":true,"schema":{"type":"string","format":"uuid","description":"Project ID for tenant scoping","title":"X-Project-Id"},"description":"Project ID for tenant scoping"},{"name":"X-Workspace-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Overrides the key's workspace","title":"X-Workspace-Id"},"description":"Overrides the key's workspace"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageReportArgs"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/business/whoami":{"get":{"tags":["business"],"summary":"Get caller identity and projects","description":"Tells you who is calling: their identity, the HQ teams they belong to, and the projects in the workspace they are currently in.\n\n**Example:** \"Who am I? Show my account identity\"\n\n**Usage:** call this first, before anything else. It takes no input and it hands you the project ids you need to scope every other call to a specific project.\n\n**Response:** your profile (name, email, role, teams), the active workspace id, and the list of projects in that workspace with each project's id, name, and website.","operationId":"whoami_api_v1_business_whoami_get","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"X-Workspace-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Overrides the key's workspace","title":"X-Workspace-Id"},"description":"Overrides the key's workspace"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhoamiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/business/project-resources/query":{"post":{"tags":["business"],"summary":"List project resources","description":"Looks up the reference things that belong to a project, such as its people, labels, settings, skills, and agents.\n\n**Example:** \"List the users in my project\"\n\n**Usage:** pick what you want with `resource`: users, labels, settings, skills, agents, or agent_settings. By default you get the full list. To see the details of one item instead, add its `resource_id` (supported for users, skills, and agents only). For users, pass the id whoami gave you as `resource_id` to read your own record in this project, like your role here. Longer lists come back in pages.\n\n**Response:** the matching items for the resource you chose, or the full details of a single item when you pass a resource_id.","operationId":"list_project_resources_api_v1_business_project_resources_query_post","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"x-project-id","in":"header","required":true,"schema":{"type":"string","format":"uuid","description":"Project ID for tenant scoping","title":"X-Project-Id"},"description":"Project ID for tenant scoping"},{"name":"X-Workspace-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Overrides the key's workspace","title":"X-Workspace-Id"},"description":"Overrides the key's workspace"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectResourceArgs"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ProjectUser"},{"$ref":"#/components/schemas/Listing_ProjectUser_"},{"$ref":"#/components/schemas/Listing_LabelResponse_"},{"$ref":"#/components/schemas/OffsetPage_SettingRead_"},{"$ref":"#/components/schemas/AgentSkillDetailResponse"},{"$ref":"#/components/schemas/Listing_AgentSkillResponse_"},{"$ref":"#/components/schemas/AgentResponse"},{"$ref":"#/components/schemas/CursorPage_AgentListResponseItem_"},{"$ref":"#/components/schemas/CursorPage_AgentSettingsItem_"}],"title":"Response List Project Resources Api V1 Business Project Resources Query Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/business/grids/query":{"post":{"tags":["business"],"summary":"List or read grids","description":"List the grids in a project, look at one grid's setup or its processing status, or see the column types you can add to a grid.\n\n**Example:** \"What grids do I have going in this project?\"\n\n**Usage:** choose what you want with `view` — the grid inventory (`list`), one grid's full setup (`detail`, needs the grid id), its processing status (`status`, needs the grid id), or the catalog of column types you can add (`column_options`). The inventory comes back in pages of up to 100 (50 by default) and can be narrowed by name, workflow, or who created it, and ranked by newest, most recently updated, or by how many rows sit in a given state (for example to surface the grids with the most failed rows first).\n\n**Response:** for the inventory, a page of grids, each with its name, when it was created, its row and column counts, and how many rows sit in each processing state. Detail adds the grid's columns and its saved sort and filter; status returns the counts plus who is editing it right now. Column options lists each addable type with its name and description.","operationId":"list_grids_api_v1_business_grids_query_post","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"x-project-id","in":"header","required":true,"schema":{"type":"string","format":"uuid","description":"Project ID for tenant scoping","title":"X-Project-Id"},"description":"Project ID for tenant scoping"},{"name":"X-Workspace-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Overrides the key's workspace","title":"X-Workspace-Id"},"description":"Overrides the key's workspace"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GridListArgs"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/business/grids/data":{"post":{"tags":["business"],"summary":"Read grid data","description":"Read what is inside a grid: its columns, its rows, a single cell, the run behind a computed cell, or the rows matching a search.\n\n**Example:** \"Show me the columns of the 'FAQ Suggester v2 Grid' grid\"\n\n**Usage:** pick what to read with `view` and always pass the grid id. `columns` lists the grid's columns; `rows` returns the data a page at a time (up to 200, 50 by default) and can be limited to certain columns or specific rows; `cell` and `cell_run` open one cell (both need the row id and column id, and `cell_run` also needs the run id); `row_search` finds rows matching your text (needs the search text).\n\n**Response:** columns come back with their names and types; rows come as a page of cell values tagged with the grid version; a cell returns its value, status, and the run that produced it; a cell run returns its inputs, status, and version; a search returns the row-and-column matches.","operationId":"get_grid_data_api_v1_business_grids_data_post","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"x-project-id","in":"header","required":true,"schema":{"type":"string","format":"uuid","description":"Project ID for tenant scoping","title":"X-Project-Id"},"description":"Project ID for tenant scoping"},{"name":"X-Workspace-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Overrides the key's workspace","title":"X-Workspace-Id"},"description":"Overrides the key's workspace"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GridDataArgs"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/business/integrations/query":{"post":{"tags":["business"],"summary":"List integrations","description":"Lists the third-party apps and integration connections available to the workspace: browse the catalogue of supported apps, see connections grouped by app with active and inactive counts, or list individual connections.\n\n**Example:** \"What integrations are available to connect?\"\n\n**Usage:** pick what you want with `view`: apps for the full catalogue of supported apps, apps_overview for connections grouped by app with active and inactive counts, connections for the individual connections, and connection_detail for one connection (needs its id). Narrow the lists with free-text search, and connections also by app, status, or whether they have project access; pass a project id to scope either list to one project. The lists come back in pages of up to 100 (50 by default). Credentials are never returned.\n\n**Response:** the data for the chosen view: the app catalogue, the per-app overview with counts, the list of connections, or one connection's details.","operationId":"list_integrations_api_v1_business_integrations_query_post","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"X-Workspace-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Overrides the key's workspace","title":"X-Workspace-Id"},"description":"Overrides the key's workspace"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListIntegrationsArgs"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/business/knowledge/search":{"post":{"tags":["business"],"summary":"Search knowledge sources","description":"Search across the project's knowledge sources and get back the most relevant passages, optionally with a generated answer written from them.\n\n**Example:** \"Search my knowledge base for anything about refund policy\"\n\n**Usage:** give the search text and say how many passages you want back (5 by default). Ask for a generated answer or turn it off to get the raw passages only. You can narrow the search to specific sources, folders, or tags, or to sources in certain workflow statuses; leave those out to search the whole project. Only sources that have finished syncing are searchable, so a whole-project search already skips ones still queued, syncing, or failed.\n\n**Response:** the matching passages with their source, and, when asked for, a generated answer written from them.","operationId":"search_knowledge_api_v1_business_knowledge_search_post","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"query","in":"query","required":true,"schema":{"type":"string","description":"Search text to match against knowledge source content.","title":"Query"}},{"name":"top_k","in":"query","required":false,"schema":{"type":"integer","description":"Maximum number of matched chunks to return.","default":5,"title":"Top K"}},{"name":"generate_answer","in":"query","required":false,"schema":{"type":"boolean","description":"If True, also return a generated answer; if False, return raw matched chunks only.","default":true,"title":"Generate Answer"}},{"name":"x-project-id","in":"header","required":true,"schema":{"type":"string","format":"uuid","description":"Project ID for tenant scoping","title":"X-Project-Id"},"description":"Project ID for tenant scoping"},{"name":"X-Workspace-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Overrides the key's workspace","title":"X-Workspace-Id"},"description":"Overrides the key's workspace"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_search_knowledge_api_v1_business_knowledge_search_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/business/brand-kit":{"post":{"tags":["business"],"summary":"Get brand kit","description":"Get the project's brand kit: list the names of its sections, or compose the brand content into a ready-to-use prompt.\n\n**Example:** \"What sections does my brand kit have?\"\n\n**Usage:** pick what you want with `view`: `catalog` lists the section names only, `compose` returns one combined brand prompt, `compose_by_section` returns the same content split per section, and `compose_image_prompt` turns the brand's design section into an image prompt (give it a subject, aspect ratio, and whether to let the service expand a thin subject). For the compose views you can tailor the result by section keys, content type, author, audience, or voice.\n\n**Response:** for catalog, the section names. For the compose views, the composed brand prompt, either as one block, split per section, or as an image prompt.","operationId":"get_brand_kit_api_v1_business_brand_kit_post","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"x-project-id","in":"header","required":true,"schema":{"type":"string","format":"uuid","description":"Project ID for tenant scoping","title":"X-Project-Id"},"description":"Project ID for tenant scoping"},{"name":"X-Workspace-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Overrides the key's workspace","title":"X-Workspace-Id"},"description":"Overrides the key's workspace"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandKitArgs"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/business/knowledge/sources":{"post":{"tags":["business"],"summary":"List or read knowledge sources","description":"List the project's knowledge sources or the folders that organize them, or read the full content of one source. This does not cover the brand kit, which is a separate resource.\n\n**Example:** \"What knowledge sources have I uploaded?\"\n\n**Usage:** pick what you want with `view`: `list` for the sources, `folders` for the folders (id and name, handy for turning a folder name into its id), or `content` for one source's parsed text (needs the source id). When listing you can narrow by folder, by origin (web url, website, file, or document), by sync status, by workflow status, by tag, or by a text search over the title or filename, and page through the results with a cursor and a limit.\n\n**Response:** for list, the matching sources with their status and details. For folders, each folder's id and name. For content, the parsed text of the source.","operationId":"get_knowledge_source_api_v1_business_knowledge_sources_post","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"x-project-id","in":"header","required":true,"schema":{"type":"string","format":"uuid","description":"Project ID for tenant scoping","title":"X-Project-Id"},"description":"Project ID for tenant scoping"},{"name":"X-Workspace-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Overrides the key's workspace","title":"X-Workspace-Id"},"description":"Overrides the key's workspace"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeSourceArgs"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/business/tasks/{task_id}":{"get":{"tags":["business"],"summary":"Get task detail","description":"Get everything about one task, always including its attachments and labels, and optionally its activity timeline, its links to other tasks, and any pending approvals.\n\n**Example:** \"Show me the full detail of the task 'Fix login bug'\"\n\n**Usage:** pass the task id. Add anything extra you want to `include`: `timeline` for the activity feed, `relations` for links to other tasks, and `approvals` for pending sign-offs. When you include the timeline it comes back a page at a time; pass the cursor from the previous response to get the next page, and use `timeline_kind` to narrow it to just comments, activity, approvals, or workflow events.\n\n**Response:** the task with its status, priority, assignee, dates, counts, attachments, and labels, plus whichever of timeline, relations, and approvals you asked for.","operationId":"get_task_api_v1_business_tasks__task_id__get","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Task to fetch.","title":"Task Id"}},{"name":"timeline_cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Pagination cursor for the task timeline (from a prior response's next_cursor).","title":"Timeline Cursor"}},{"name":"timeline_kind","in":"query","required":false,"schema":{"$ref":"#/components/schemas/TimelineKind","description":"Filter the task timeline to one kind: all/comment/activity/approval/workflow.","default":"all"}},{"name":"x-project-id","in":"header","required":true,"schema":{"type":"string","format":"uuid","description":"Project ID for tenant scoping","title":"X-Project-Id"},"description":"Project ID for tenant scoping"},{"name":"X-Workspace-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Overrides the key's workspace","title":"X-Workspace-Id"},"description":"Overrides the key's workspace"}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"type":"array","uniqueItems":true,"items":{"$ref":"#/components/schemas/TaskInclude"}},{"type":"null"}],"description":"Extra sections to fetch: timeline, relations, and/or approvals.","title":"Include"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskWithIncludes"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/business/tasks":{"post":{"tags":["business"],"summary":"Create a task","description":"Add a brand-new task to the project. This only ever adds: it never overwrites existing data, and the new task shows up in the product like any other.\n\n**Example:** \"Create a task titled 'Write Q3 launch brief'\"\n\n**Usage:** give the new task a title (the only required field). You can also set its description, status, priority, due date, assignee, parent task (to make it a subtask), labels, and any files to attach on creation.\n\n**Response:** the created task, including its generated id and identifier along with the status, priority, assignee, and other fields it was created with.","operationId":"create_task_api_v1_business_tasks_post","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"x-project-id","in":"header","required":true,"schema":{"type":"string","format":"uuid","description":"Project ID for tenant scoping","title":"X-Project-Id"},"description":"Project ID for tenant scoping"},{"name":"X-Workspace-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Overrides the key's workspace","title":"X-Workspace-Id"},"description":"Overrides the key's workspace"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/business/tasks/query":{"post":{"tags":["business"],"summary":"Query tasks","description":"Search and list the project's tasks, or get grouped totals across them.\n\n**Example:** \"Show me the in-progress tasks in this project\"\n\n**Usage:** set `view` to `list` for the matching tasks or `counts` for grouped totals. Narrow results with `query.filter` on fields like status, priority, assignee, labels, due date, and title, and order a list with `query.sort`. Lists come back in pages of up to 100 (50 by default); pass the cursor from the previous page to get the next one. For `counts`, set `group_by` (status, priority, assignee_id, or creator_id) - it is required for that view.\n\n**Response:** for a list, a page of tasks with their core fields, labels, and subtask counts plus a cursor for the next page. For counts, the total and a per-group breakdown keyed by the field you grouped on.","operationId":"query_tasks_api_v1_business_tasks_query_post","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"x-project-id","in":"header","required":true,"schema":{"type":"string","format":"uuid","description":"Project ID for tenant scoping","title":"X-Project-Id"},"description":"Project ID for tenant scoping"},{"name":"X-Workspace-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Overrides the key's workspace","title":"X-Workspace-Id"},"description":"Overrides the key's workspace"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskQueryArgs"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TaskQueryPage"},{"$ref":"#/components/schemas/TaskCounts"}],"title":"Response Query Tasks Api V1 Business Tasks Query Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/business/tasks/update":{"post":{"tags":["business"],"summary":"Update a task","description":"Change an existing task: edit its fields, move it to a different status, or assign it to someone. New values replace the old ones.\n\n**Example:** \"Mark the task 'Fix login bug' as done\"\n\n**Usage:** pass the task id and pick what to do with `action`. `update_fields` edits the task and needs `fields` with just the values that change; `transition_status` needs the new `status`; `assign` needs the `assignee` (a person, an agent, or unassigned).\n\n**Response:** the updated task with its new field values.","operationId":"update_task_api_v1_business_tasks_update_post","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"x-project-id","in":"header","required":true,"schema":{"type":"string","format":"uuid","description":"Project ID for tenant scoping","title":"X-Project-Id"},"description":"Project ID for tenant scoping"},{"name":"X-Workspace-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Overrides the key's workspace","title":"X-Workspace-Id"},"description":"Overrides the key's workspace"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskUpdateArgs"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/business/tasks/comments":{"post":{"tags":["business"],"summary":"Comment on a task","description":"Add a comment to a task's discussion.\n\n**Example:** \"Add a comment to the task 'Fix login bug' saying 'started debugging'\"\n\n**Usage:** pass the task id, set `action` to `create`, and provide the comment `body`.\n\n**Response:** the new comment with its id, author, body, timestamp, and any attachments.","operationId":"comment_on_task_api_v1_business_tasks_comments_post","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"x-project-id","in":"header","required":true,"schema":{"type":"string","format":"uuid","description":"Project ID for tenant scoping","title":"X-Project-Id"},"description":"Project ID for tenant scoping"},{"name":"X-Workspace-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Overrides the key's workspace","title":"X-Workspace-Id"},"description":"Overrides the key's workspace"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommentArgs"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/business/workflows/query":{"post":{"tags":["business"],"summary":"List workflows","description":"List the workflows in a project as a filterable inventory, or get the counts of workflows grouped by status.\n\n**Example:** \"pull up all my playbooks\"\n\n**Usage:** pick what you want with `view` — `list` for the inventory or `counts` for the status totals. For the list you can narrow by type (the curated system playbooks or the ones users built), by the latest version's status, or by a text search over names, and you can sort by the field you choose. The list comes back in pages of up to 100 (50 by default); ask for the next page by its number.\n\n**Response:** for the list, each workflow with its name, type, latest version status, and timings. For counts, the number of workflows in each status.","operationId":"list_workflows_api_v1_business_workflows_query_post","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"x-project-id","in":"header","required":true,"schema":{"type":"string","format":"uuid","description":"Project ID for tenant scoping","title":"X-Project-Id"},"description":"Project ID for tenant scoping"},{"name":"X-Workspace-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Overrides the key's workspace","title":"X-Workspace-Id"},"description":"Overrides the key's workspace"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowListArgs"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/business/workflows/get":{"post":{"tags":["business"],"summary":"Get a workflow","description":"Get a single workflow together with a chosen slice of its related data: its details, its versions, one version in full, its run history, or one run in full.\n\n**Example:** \"Show me the details of the FAQ Suggester workflow\"\n\n**Usage:** give the workflow id and pick the slice with `view`: `detail` for the workflow itself, `versions` for its version history, `version_detail` for one version (needs the version id, and you can leave out the builder chat history), `runs` for its run history, or `run_detail` for one run (needs the run id). For runs you can filter by status, by where the run came from (a standalone playbook run, a grid cell, or a task), by a name search, or by when they were created, and the version and run lists come back in pages of up to 100 (50 by default).\n\n**Response:** the workflow and whichever slice you asked for: its details, a list of versions, one version's step config and chat, a list of runs, or one run's status and progress.","operationId":"get_workflow_api_v1_business_workflows_get_post","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"x-project-id","in":"header","required":true,"schema":{"type":"string","format":"uuid","description":"Project ID for tenant scoping","title":"X-Project-Id"},"description":"Project ID for tenant scoping"},{"name":"X-Workspace-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Overrides the key's workspace","title":"X-Workspace-Id"},"description":"Overrides the key's workspace"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowGetArgs"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/business/workflows/components":{"post":{"tags":["business"],"summary":"List workflow components","description":"List the building blocks used to assemble workflows: the catalog of available components, a specific set of components fetched by id, or the capabilities offered by the workflows hub.\n\n**Example:** \"List the workflow building blocks I can add to a workflow\"\n\n**Usage:** pick what you want with `view`: `hub_capabilities` for a compact list of every building block (optionally narrowed to one skill or one capability id), `components` for the same blocks with their full input and output schemas (with an optional text search; responses are large, so keep the page small), or `batch` to fetch the full schemas of specific blocks by their capability ids. The lists come back in pages of up to 100 (50 by default); ask for the next page by its number.\n\n**Response:** the matching building blocks, each with its id, name, and description; components and batch results also carry each block's input and output schemas.","operationId":"list_workflow_components_api_v1_business_workflows_components_post","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"x-project-id","in":"header","required":true,"schema":{"type":"string","format":"uuid","description":"Project ID for tenant scoping","title":"X-Project-Id"},"description":"Project ID for tenant scoping"},{"name":"X-Workspace-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Overrides the key's workspace","title":"X-Workspace-Id"},"description":"Overrides the key's workspace"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowComponentArgs"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AccessFilter":{"type":"string","enum":["has_access","no_access"],"title":"AccessFilter"},"ActivityAction":{"type":"string","enum":["created","deleted","status_changed","assigned","unassigned","label_added","label_removed","relation_added","relation_removed","title_changed","attachment_added","attachment_removed","subtask_added","subtask_removed"],"title":"ActivityAction"},"ActivityCategory":{"type":"string","enum":["all","changes","impact","alerts"],"title":"ActivityCategory","description":"User-facing tab classification for the activity log. Single-valued per\nevent (each event lives in exactly one tab). `ALL` is the wire shorthand\nfor \"no category filter\"; never appears on individual rows."},"ActivityPayload":{"properties":{"kind":{"type":"string","const":"activity","title":"Kind","default":"activity"},"action":{"$ref":"#/components/schemas/ActivityAction"},"field":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Field"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"old_values":{"items":{"anyOf":[{"type":"string"},{"type":"null"}]},"type":"array","title":"Old Values"},"new_values":{"items":{"anyOf":[{"type":"string"},{"type":"null"}]},"type":"array","title":"New Values"},"old_value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Old Value"},"new_value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"New Value"}},"type":"object","required":["action","field","old_values","new_values","old_value","new_value"],"title":"ActivityPayload"},"ActorType":{"type":"string","enum":["human","ai_agent","system"],"title":"ActorType"},"AgentFailureReason":{"type":"string","enum":["iteration_limit","timeout","tool_error","llm_error","unknown","dispatch_lost"],"title":"AgentFailureReason"},"AgentListResponseItem":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"tagline":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tagline"},"icon_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon Url"},"role":{"$ref":"#/components/schemas/AgentRole"},"parent_agent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Agent Id"},"run_status_counts":{"$ref":"#/components/schemas/AgentRunStatusCounts"},"last_run_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Run At"}},"type":"object","required":["id","name","description","tagline","icon_url","role","parent_agent_id"],"title":"AgentListResponseItem"},"AgentProgressJSONResponse":{"properties":{"run_id":{"type":"string","title":"Run Id"},"status":{"$ref":"#/components/schemas/AgentRunStatus"},"failure_reason":{"anyOf":[{"$ref":"#/components/schemas/AgentFailureReason"},{"type":"null"}]},"log_pointer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Log Pointer"},"started_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Started At"},"ended_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ended At"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"steps":{"items":{"$ref":"#/components/schemas/AgentProgressStep"},"type":"array","title":"Steps"}},"type":"object","required":["run_id","status","steps"],"title":"AgentProgressJSONResponse"},"AgentProgressStep":{"properties":{"kind":{"type":"string","enum":["assistant_message","tool_call","tool_result"],"title":"Kind"},"ts":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ts"},"content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content"},"tool_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tool Name"},"tool_call_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tool Call Id"},"args":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Args"},"status":{"anyOf":[{"type":"string","enum":["ok","error"]},{"type":"null"}],"title":"Status"},"result":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Result"}},"type":"object","required":["kind"],"title":"AgentProgressStep"},"AgentResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"tagline":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tagline"},"icon_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon Url"},"identity_prompt":{"type":"string","title":"Identity Prompt"},"role":{"$ref":"#/components/schemas/AgentRole"},"parent_agent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Agent Id"},"version":{"type":"integer","title":"Version"},"skill_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Skill Ids"},"run_status_counts":{"$ref":"#/components/schemas/AgentRunStatusCounts"},"last_run_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Run At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","name","description","tagline","icon_url","identity_prompt","role","parent_agent_id","version","created_at","updated_at"],"title":"AgentResponse"},"AgentRole":{"type":"string","enum":["orchestrator","executor","pipeline"],"title":"AgentRole"},"AgentRunListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/AgentRunResponse"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["items"],"title":"AgentRunListResponse"},"AgentRunResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"task_id":{"type":"string","format":"uuid","title":"Task Id"},"agent_id":{"type":"string","format":"uuid","title":"Agent Id"},"status":{"$ref":"#/components/schemas/AgentRunStatus"},"trigger":{"$ref":"#/components/schemas/AgentRunTrigger"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"ended_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ended At"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"failure_reason":{"anyOf":[{"$ref":"#/components/schemas/AgentFailureReason"},{"type":"null"}]},"log_pointer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Log Pointer"},"last_comment_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Last Comment Id"},"cancelled_by_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cancelled By User Id"},"input_tokens":{"type":"integer","title":"Input Tokens"},"output_tokens":{"type":"integer","title":"Output Tokens"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","task_id","agent_id","status","trigger","started_at","ended_at","error_message","failure_reason","log_pointer","last_comment_id","cancelled_by_user_id","input_tokens","output_tokens","created_at","updated_at"],"title":"AgentRunResponse"},"AgentRunScope":{"type":"string","enum":["task_runs","agent_runs","run_progress"],"title":"AgentRunScope"},"AgentRunStatus":{"type":"string","enum":["pending","running","awaiting_approval","awaiting_workflow","awaiting_knowledge_sync","awaiting_credits","succeeded","failed","cancelled","skipped"],"title":"AgentRunStatus"},"AgentRunStatusCounts":{"properties":{"total":{"type":"integer","title":"Total","default":0},"pending":{"type":"integer","title":"Pending","default":0},"running":{"type":"integer","title":"Running","default":0},"awaiting_approval":{"type":"integer","title":"Awaiting Approval","default":0},"awaiting_workflow":{"type":"integer","title":"Awaiting Workflow","default":0},"awaiting_knowledge_sync":{"type":"integer","title":"Awaiting Knowledge Sync","default":0},"awaiting_credits":{"type":"integer","title":"Awaiting Credits","default":0},"succeeded":{"type":"integer","title":"Succeeded","default":0},"failed":{"type":"integer","title":"Failed","default":0},"cancelled":{"type":"integer","title":"Cancelled","default":0},"skipped":{"type":"integer","title":"Skipped","default":0}},"type":"object","title":"AgentRunStatusCounts"},"AgentRunTrigger":{"type":"string","enum":["task_assigned","human_reply","scheduled","mention","status_transition","batch_completed"],"title":"AgentRunTrigger"},"AgentRunsArgs":{"properties":{"scope":{"$ref":"#/components/schemas/AgentRunScope","description":"scope: Which run history to read. One of: task_runs, agent_runs, run_progress."},"task_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Task Id","description":"Task id; required for task_runs and run_progress"},"agent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Agent Id","description":"Agent id; required for agent_runs"},"run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Run Id","description":"Run id; required for run_progress"},"cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor","description":"Pagination cursor for the run list scopes"},"limit":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Limit","description":"Page size for the run list scopes","default":50}},"type":"object","required":["scope"],"title":"AgentRunsArgs"},"AgentSettingsItem":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"tagline":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tagline"},"icon_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon Url"},"role":{"$ref":"#/components/schemas/AgentRole"},"parent_agent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Agent Id"},"run_status_counts":{"$ref":"#/components/schemas/AgentRunStatusCounts"},"last_run_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Run At"},"settings":{"additionalProperties":true,"propertyNames":{"$ref":"#/components/schemas/SettingName"},"type":"object","title":"Settings"}},"type":"object","required":["id","name","description","tagline","icon_url","role","parent_agent_id"],"title":"AgentSettingsItem"},"AgentSkillDetailResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"blob_prefix":{"type":"string","title":"Blob Prefix"},"uploaded_by":{"type":"string","title":"Uploaded By"},"version":{"type":"integer","title":"Version"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"download_url":{"type":"string","title":"Download Url"},"download_url_expires_at":{"type":"string","format":"date-time","title":"Download Url Expires At"},"files":{"items":{"$ref":"#/components/schemas/SkillBundleFile"},"type":"array","title":"Files"}},"type":"object","required":["id","name","description","blob_prefix","uploaded_by","version","created_at","updated_at","download_url","download_url_expires_at","files"],"title":"AgentSkillDetailResponse"},"AgentSkillResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"blob_prefix":{"type":"string","title":"Blob Prefix"},"uploaded_by":{"type":"string","title":"Uploaded By"},"version":{"type":"integer","title":"Version"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","name","description","blob_prefix","uploaded_by","version","created_at","updated_at"],"title":"AgentSkillResponse"},"And":{"properties":{"and":{"items":{"anyOf":[{"$ref":"#/components/schemas/Condition"},{"$ref":"#/components/schemas/And"},{"$ref":"#/components/schemas/Or"}]},"type":"array","minItems":1,"title":"And"}},"additionalProperties":false,"type":"object","required":["and"],"title":"And"},"AnswerItem":{"properties":{"answer_text":{"type":"string","maxLength":4000,"minLength":1,"title":"Answer Text","description":"The submitted answer. For a picked option this equals that option's `label`; for a free-typed answer it is the user's own text."},"is_custom":{"type":"boolean","title":"Is Custom","description":"`true` when the user typed their own answer; `false` when `answer_text` matches one of the question's option labels."}},"type":"object","required":["answer_text","is_custom"],"title":"AnswerItem","description":"One answer, positionally aligned to the question at the same index in `body.questions`."},"ApprovalPayload":{"properties":{"kind":{"type":"string","const":"approval","title":"Kind","default":"approval"},"tool_name":{"type":"string","title":"Tool Name"},"body":{"additionalProperties":true,"type":"object","title":"Body"},"status":{"$ref":"#/components/schemas/ApprovalStatus"},"feedback_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Feedback Text"},"reviewed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Reviewed At"},"reviewer_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reviewer User Id"},"run_id":{"type":"string","format":"uuid","title":"Run Id"}},"type":"object","required":["tool_name","body","status","feedback_text","reviewed_at","reviewer_user_id","run_id"],"title":"ApprovalPayload"},"ApprovalRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"task_id":{"type":"string","format":"uuid","title":"Task Id"},"agent_id":{"type":"string","format":"uuid","title":"Agent Id"},"run_id":{"type":"string","format":"uuid","title":"Run Id"},"tool_name":{"type":"string","title":"Tool Name"},"body":{"additionalProperties":true,"type":"object","title":"Body"},"status":{"$ref":"#/components/schemas/ApprovalStatus"},"reviewer_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reviewer User Id"},"reviewed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Reviewed At"},"feedback_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Feedback Text"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","task_id","agent_id","run_id","tool_name","body","status","reviewer_user_id","reviewed_at","feedback_text","created_at"],"title":"ApprovalRead","description":"Single approval row response. agent_id hydrated via agent_runs JOIN."},"ApprovalStatus":{"type":"string","enum":["pending_approval","approve","reject","edit","expired"],"title":"ApprovalStatus"},"AssignTask":{"properties":{"assignee_type":{"$ref":"#/components/schemas/ActorType","description":"human, ai_agent, or system (system means unassigned)."},"assignee_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assignee Id","description":"Required unless assignee_type is system - the user id for human, or the agent's UUID (as a string) for ai_agent."}},"type":"object","required":["assignee_type"],"title":"AssignTask"},"AttachmentDownload":{"properties":{"url":{"type":"string","title":"Url"},"filename":{"type":"string","title":"Filename"},"content_type":{"type":"string","title":"Content Type"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"}},"type":"object","required":["url","filename","content_type","expires_at"],"title":"AttachmentDownload"},"AttachmentResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"task_id":{"type":"string","format":"uuid","title":"Task Id"},"filename":{"type":"string","title":"Filename"},"content_type":{"type":"string","title":"Content Type"},"size_bytes":{"type":"integer","title":"Size Bytes"},"uploader_type":{"$ref":"#/components/schemas/ActorType"},"uploader_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uploader Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","task_id","filename","content_type","size_bytes","uploader_type","uploader_id","created_at"],"title":"AttachmentResponse"},"AttachmentTarget":{"type":"string","enum":["task","comment"],"title":"AttachmentTarget"},"Body_search_knowledge_api_v1_business_knowledge_search_post":{"properties":{"source_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Source Ids"},"folder_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Folder Ids"},"tag_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Tag Ids"},"workflow_status":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Workflow Status"}},"type":"object","title":"Body_search_knowledge_api_v1_business_knowledge_search_post"},"BrandKitArgs":{"properties":{"view":{"$ref":"#/components/schemas/BrandKitView","description":"view: catalog lists available brand-kit sections; compose builds a prompt. One of: catalog, compose, compose_by_section, compose_image_prompt."},"sections":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Sections","description":"Section keys to narrow compose/compose_by_section to (e.g. business, audience, objectives, content_type, authors, voice, design) — omit for the full kit. view=catalog does NOT list these keys (it lists approved VALUES for the content_type/author/audience/voice args below); to see this project's actual resolvable section keys, call compose_by_section with no `sections` filter first and read the keys of its response."},"content_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Type","description":"Content type to tailor the composition to"},"author":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Author","description":"Author persona to compose for"},"audience":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Audience","description":"Target audience to compose for"},"voice":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Voice","description":"Brand voice to compose with"},"subject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject","description":"Image subject (compose_image_prompt view); omit for the brand's style-only block"},"aspect_ratio":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Aspect Ratio","description":"Aspect ratio for the image prompt (compose_image_prompt view)"},"smart":{"type":"boolean","title":"Smart","description":"Let the service expand a thin subject (compose_image_prompt view)","default":false}},"type":"object","required":["view"],"title":"BrandKitArgs"},"BrandKitView":{"type":"string","enum":["catalog","compose","compose_by_section","compose_image_prompt"],"title":"BrandKitView"},"Chunk":{"properties":{"node_id":{"type":"string","format":"uuid","title":"Node Id"},"document_id":{"type":"string","format":"uuid","title":"Document Id"},"text":{"type":"string","title":"Text"},"cert_score":{"type":"number","title":"Cert Score"},"fusion_score":{"type":"number","title":"Fusion Score"},"layer":{"type":"string","title":"Layer"},"cluster_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Cluster Id"}},"type":"object","required":["node_id","document_id","text","cert_score","fusion_score","layer"],"title":"Chunk"},"CiDashboardArgs":{"properties":{"view":{"$ref":"#/components/schemas/CiDashboardView","description":"view: Which dashboard read to return. One of: countries, filters, summary, live_summary, pages, column_scope, groups."},"market_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Market Id","description":"Market from view=countries; required for summary, live_summary, and pages with keyword_intent."},"curr_start":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Curr Start","description":"Current window start date - pairs with curr_end/prev_start/prev_end: provide all four or omit all four (defaults to trailing 30 days), else 422. Each range needs start<end, equal current/prior length, and prev_end<=curr_start."},"curr_end":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Curr End","description":"Current window end date - see curr_start."},"prev_start":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Prev Start","description":"Comparison window start date - see curr_start."},"prev_end":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Prev End","description":"Comparison window end date - see curr_start."},"search":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search","description":"Filter pages by URL/title substring."},"statuses":{"anyOf":[{"items":{"$ref":"#/components/schemas/ContentIntelligencePageStatus"},"type":"array"},{"type":"null"}],"title":"Statuses","description":"Filter the page list by lifecycle status."},"keyword_intent":{"anyOf":[{"items":{"$ref":"#/components/schemas/ContentIntelligenceKeywordIntent"},"type":"array"},{"type":"null"}],"title":"Keyword Intent","description":"Keyword-intent filter."},"group_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Group Ids","description":"Filter the page list by page-group id."},"sort":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sort","description":"Sort the page list as '<key>:<dir>' (dir=asc|desc). Common keys: traffic, clicks, impressions, position, citations, citation_share, ai_bot_hits — and each one's _change/_change_pct trend variant (e.g. clicks_change_pct, ai_citation_count_change) for window-over-window ranking ('which pages gained/lost the most'), paired with curr_start/curr_end/prev_start/prev_end to set the two windows being compared. Call view=filters first for this project's current key list plus named presets (e.g. pages getting fewer clicks, sinking in rankings) that bundle a ready-made filter+sort."},"page":{"type":"integer","minimum":1.0,"title":"Page","description":"Page number for the pages list.","default":1},"size":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Size","description":"Page size for the pages list.","default":50}},"type":"object","required":["view"],"title":"CiDashboardArgs"},"CiDashboardView":{"type":"string","enum":["countries","filters","summary","live_summary","pages","column_scope","groups"],"title":"CiDashboardView"},"Citation":{"properties":{"source_id":{"type":"string","format":"uuid","title":"Source Id"},"node_id":{"type":"string","format":"uuid","title":"Node Id"},"text_excerpt":{"type":"string","title":"Text Excerpt"},"score":{"type":"number","title":"Score"}},"type":"object","required":["source_id","node_id","text_excerpt","score"],"title":"Citation"},"CommentAction":{"type":"string","enum":["create"],"title":"CommentAction"},"CommentArgs":{"properties":{"action":{"$ref":"#/components/schemas/CommentAction","description":"action: Create a comment. One of: create."},"task_id":{"type":"string","format":"uuid","title":"Task Id","description":"Task the comment belongs to."},"body":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Body","description":"Comment text."}},"type":"object","required":["action","task_id"],"title":"CommentArgs"},"CommentAttachment":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"filename":{"type":"string","title":"Filename"},"content_type":{"type":"string","title":"Content Type"},"size_bytes":{"type":"integer","title":"Size Bytes"},"uploader_type":{"$ref":"#/components/schemas/ActorType"},"uploader_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uploader Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","filename","content_type","size_bytes","uploader_type","uploader_id","created_at"],"title":"CommentAttachment"},"CommentPayload":{"properties":{"kind":{"type":"string","const":"comment","title":"Kind","default":"comment"},"body":{"type":"string","title":"Body"},"edited_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Edited At"},"rollup_source":{"anyOf":[{"$ref":"#/components/schemas/RollupSource"},{"type":"null"}]},"attachments":{"items":{"$ref":"#/components/schemas/CommentAttachment"},"type":"array","title":"Attachments"}},"type":"object","required":["body","edited_at","attachments"],"title":"CommentPayload"},"CommentPreview":{"properties":{"author_type":{"$ref":"#/components/schemas/ActorType"},"author_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Author Id"},"body":{"type":"string","title":"Body"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["author_type","author_id","body","created_at"],"title":"CommentPreview"},"CommentResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"task_id":{"type":"string","format":"uuid","title":"Task Id"},"author_type":{"$ref":"#/components/schemas/ActorType"},"author_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Author Id"},"body":{"type":"string","title":"Body"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"edited_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Edited At"},"attachments":{"items":{"$ref":"#/components/schemas/CommentAttachment"},"type":"array","title":"Attachments"}},"type":"object","required":["id","task_id","author_type","author_id","body","created_at"],"title":"CommentResponse"},"Condition":{"properties":{"field":{"$ref":"#/components/schemas/FilterField"},"op":{"$ref":"#/components/schemas/FilterOp"},"value":{"title":"Value","description":"Comparison value(s): shape depends on `op` (scalar for most ops, [low, high] for between, non-empty list for in/not_in/has_*); scalar format depends on `field` (FILTER_FIELD_SPECS) - plain string for text, UUID string for id fields. due_date is date-only (YYYY-MM-DD; a full timestamp is rejected). created_at/completed_at are datetime (full ISO-8601, or bare YYYY-MM-DD defaulting to midnight)."}},"additionalProperties":false,"type":"object","required":["field","op"],"title":"Condition"},"ConnectionStatus":{"type":"string","enum":["setup_pending","active","inactive","no_project_access","expired"],"title":"ConnectionStatus","description":"The status the frontend renders. Derived on read, never stored.\n\nPrecedence (highest first): SETUP_PENDING > EXPIRED > INACTIVE >\nNO_PROJECT_ACCESS > ACTIVE. SETUP_PENDING wins so a connection awaiting\npost-connect configuration never shows as active or no-project-access."},"ContentIntelligenceKeywordIntent":{"type":"string","enum":["branded","non_branded"],"title":"ContentIntelligenceKeywordIntent","description":"The `/pages` `keyword_intent` filter: classifies a page by whether its\nprimary target keyword contains any of the project's brand aliases. Modelled\non `statuses` (multi-select; both-or-none selected = no filter). An *intent*\nsignal, not a *traffic* signal."},"ContentIntelligencePageStatus":{"type":"string","enum":["pruned","redirect","not_indexed","cannibalizing","underperforming","new","stable","rising","declining","dormant","stale","thin"],"title":"ContentIntelligencePageStatus","description":"The unified `/pages` `status` filter: distinct union of performance +\ncontent status values (performance order first, then content-only). Routing\nonto the two columns is by membership in the two source enums; the shared\n`stable` matches both. Kept in sync via a drift-guard test."},"CreditBlockCode":{"type":"string","enum":["AGENT_CREDITS_EXHAUSTED","WORKSPACE_CREDIT_LIMIT_REACHED","PROJECT_CREDIT_LIMIT_REACHED","MEMBER_CREDIT_LIMIT_REACHED","RESOURCE_CREDIT_LIMIT_REACHED"],"title":"CreditBlockCode","description":"Why a run cannot start — the same code its 402 carries, so a surface can say up front what\ntriggering would return."},"CreditEstimate":{"properties":{"credits":{"type":"number","title":"Credits"},"global_task_count":{"type":"integer","title":"Global Task Count"},"project_task_count":{"type":"integer","title":"Project Task Count"}},"type":"object","required":["credits","global_task_count","project_task_count"],"title":"CreditEstimate"},"CreditUsage":{"properties":{"consumed":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Consumed","description":"Credits this run/task has spent"},"cap":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cap","description":"Per-run ceiling that applies; null = uncapped"},"cap_reached":{"type":"boolean","title":"Cap Reached","description":"Whether `consumed` has crossed `cap`","default":false},"blocked_by":{"anyOf":[{"$ref":"#/components/schemas/CreditBlockCode"},{"type":"null"}],"description":"The error triggering would return right now; null means it can run. Wallet limits take precedence over the per-run cap, matching the gate's own order."}},"type":"object","title":"CreditUsage","description":"Everything one run or task can say about credits: what it spent, the ceiling on it, and\nwhether anything would stop it starting right now."},"CurrencyCodeEnum":{"type":"string","enum":["USD","INR","HUF","GBP","PHP","PLN","BDT","JPY","THB","KRW","QAR","SAR","SEK","KES","UAH","NGN","PKR","CZK","CRC","LKR","MAD","NOK","RON","NZD","MOP","EGP","SGD","COP","BGN","MMK","MYR","CAD","EUR","TWD","RUB","HKD","DKK","RSD","AED","TRY","BOB","IDR","GHS","TZS","ILS","AUD","VND","ZAR","CLP","CHF","MXN","PEN","BRL","CNY"],"title":"CurrencyCodeEnum"},"CursorPage_AgentListResponseItem_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/AgentListResponseItem"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"},"has_more":{"type":"boolean","title":"Has More"}},"type":"object","required":["items","has_more"],"title":"CursorPage[AgentListResponseItem]"},"CursorPage_AgentSettingsItem_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/AgentSettingsItem"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"},"has_more":{"type":"boolean","title":"Has More"}},"type":"object","required":["items","has_more"],"title":"CursorPage[AgentSettingsItem]"},"DownloadAttachmentArgs":{"properties":{"target":{"$ref":"#/components/schemas/AttachmentTarget","description":"target: Whether the attachment hangs off a task or a comment. One of: task, comment."},"attachment_id":{"type":"string","format":"uuid","title":"Attachment Id","description":"Attachment id to fetch a download URL for"},"task_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Task Id","description":"Owning task id; required when target is 'task'"}},"type":"object","required":["target","attachment_id"],"title":"DownloadAttachmentArgs"},"FilterField":{"type":"string","enum":["id","status","priority","assignee_type","assignee_id","creator_type","creator_id","due_date","created_at","completed_at","parent_task_id","page_id","market_id","title","identifier","label","source_actionable","template_id"],"title":"FilterField"},"FilterOp":{"type":"string","enum":["eq","neq","in","not_in","gt","gte","lt","lte","between","is_null","contains","has_any","has_all","has_none"],"title":"FilterOp"},"GridColumnType":{"type":"string","enum":["input","workflow","output"],"title":"GridColumnType"},"GridDataArgs":{"properties":{"view":{"$ref":"#/components/schemas/GridDataView","description":"view: Which grid data slice to return: columns, rows, cell (needs row_id/column_id), cell_run (that cell's producing run - needs row_id/column_id/workflow_run_id), or row_search. Prefer cell/cell_run over rows+page_size=1 for a single-row/cell question - but only for expandable (blob-backed) columns, e.g. workflow/output columns with markdown/json/array/file content; plain scalar columns (text/number/boolean/single_select) already return their full value via rows and have no cell view to expand. One of: columns, rows, cell, cell_run, row_search."},"grid_id":{"type":"string","format":"uuid","title":"Grid Id","description":"Grid to read from"},"row_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Row Id","description":"Row id; required for cell and cell_run views"},"column_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Column Id","description":"Column id; required for cell and cell_run views. For cell_run specifically, must be the WORKFLOW-type column id (not the input/output column) - the one whose AI runs are being traced."},"workflow_run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Run Id","description":"Run id; required for the cell_run view"},"query":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Query","description":"Search text; required for the row_search view. row_search matches only searchable (text-like input) cell values — generated workflow output stored as markdown/JSON/blobs is not indexed and won't match."},"page":{"type":"integer","minimum":1.0,"title":"Page","default":1},"page_size":{"type":"integer","maximum":200.0,"minimum":1.0,"title":"Page Size","default":50},"column_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Column Ids","description":"Column id filter for the rows view — return only these columns per row instead of every column. See also field_name/column_type for the columns view."},"row_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Row Ids","description":"Row id filter for the rows view — fetch specific, non-contiguous rows (e.g. 'rows 3, 7, and 9') instead of a page range. Resolve ordinal positions to ids with a prior rows view read, then pass them here."},"column_type":{"anyOf":[{"items":{"$ref":"#/components/schemas/GridColumnType"},"type":"array"},{"type":"null"}],"title":"Column Type","description":"Column-type filter for the columns view. Defaults to INPUT columns; pass ['output'] to see the generated/workflow columns the grid produces for each row."},"field_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Field Name","description":"Column filter for the columns view — matches the underlying workflow input schema's field name (not the grid's display column name). Use this to answer 'which column maps to field X' directly instead of listing all columns and matching by eye."},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id","description":"Filter columns by workflow id (for the columns view)"}},"type":"object","required":["view","grid_id"],"title":"GridDataArgs"},"GridDataView":{"type":"string","enum":["columns","rows","cell","cell_run","row_search"],"title":"GridDataView"},"GridListArgs":{"properties":{"view":{"$ref":"#/components/schemas/GridListView","description":"view: Grid listing: 'list' (inventory), 'detail' (config), 'status' (processing), or 'column_options' (the live, project-specific catalog of addable column types and usable workflow columns — call it to get the valid column types rather than guessing them). One of: list, detail, status, column_options."},"grid_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Grid Id","description":"Grid id. Required for view='detail' and view='status'. Optional for view='list' and view='column_options'"},"workflow_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Workflow Ids","description":"Optional workflow filter for the list view"},"page":{"type":"integer","minimum":1.0,"title":"Page","default":1},"page_size":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Page Size","default":50},"sort_by":{"$ref":"#/components/schemas/GridSortField","description":"Sort the list view by created_at, updated_at, or status_count. Use status_count to rank grids by how many rows are in the sort_status state — e.g. sort_by=status_count + sort_status=failed + sort_order=desc surfaces the grids with the most failed rows first, so 'which grids failed' is answered from the top of one page instead of scanning every grid.","default":"created_at"},"sort_order":{"$ref":"#/components/schemas/SortOrder","description":"Sort direction for sort_by; asc or desc.","default":"desc"},"sort_status":{"$ref":"#/components/schemas/WorkflowRunStatus","description":"Row status counted when sort_by=status_count (e.g. failed, completed, awaiting_interaction). Pairs with sort_by=status_count to rank grids by that status.","default":"awaiting_interaction"},"search":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search","description":"Free-text filter on grid name for the list view."},"created_by":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Created By","description":"Filter by creator user id(s)"},"last_run_after":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Run After","description":"Only grids with a run at/after this time"},"last_run_before":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Run Before","description":"Only grids with a run at/before this time"}},"type":"object","required":["view"],"title":"GridListArgs"},"GridListView":{"type":"string","enum":["list","detail","status","column_options"],"title":"GridListView"},"GridSortField":{"type":"string","enum":["created_at","updated_at","status_count"],"title":"GridSortField"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"IntegrationView":{"type":"string","enum":["apps","apps_overview","connections","connection_detail"],"title":"IntegrationView"},"IntervalEnumV2":{"type":"string","enum":["monthly","annual","quarterly","semi_annual"],"title":"IntervalEnumV2"},"KnowledgeSourceArgs":{"properties":{"view":{"$ref":"#/components/schemas/KnowledgeSourceView","description":"view: list enumerates sources; content fetches one source's text. One of: list, content, folders."},"source_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Source Id","description":"Source id; required for the content view"},"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id","description":"Filter the list to a folder; resolve a folder name to its id via view='folders'"},"type":{"anyOf":[{"$ref":"#/components/schemas/SourceType"},{"type":"null"}],"description":"Filter the list by source origin (WEB_URL, WEBSITE, FILE, DOCUMENT) — not a file format like pdf/txt; there is no file-format filter, use `q` for a filename substring instead."},"status":{"anyOf":[{"$ref":"#/components/schemas/SourceStatus"},{"type":"null"}],"description":"Filter the list by sync status (QUEUED, SYNCING, SYNCED, SYNC_FAILED)."},"workflow_status":{"anyOf":[{"$ref":"#/components/schemas/WorkflowStatus"},{"type":"null"}],"description":"Filter the list by workflow status (DRAFT, IN_REVIEW, APPROVED, ARCHIVED)."},"tag_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Tag Id","description":"Filter the list to a tag"},"q":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q","description":"Substring filter on title/filename for the list view. Matches only sources outside folders unless folder_id is set; for a named source that may be in a folder, check each folder from view='folders', or use search_knowledge, whose hits carry source ids."},"cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor","description":"Pagination cursor for the list view"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit","description":"Max sources to return in the list view"}},"type":"object","required":["view"],"title":"KnowledgeSourceArgs"},"KnowledgeSourceView":{"type":"string","enum":["list","content","folders"],"title":"KnowledgeSourceView"},"LabelResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"project_id":{"type":"string","format":"uuid","title":"Project Id"},"name":{"type":"string","title":"Name"},"color":{"type":"string","title":"Color"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","project_id","name","color","created_at"],"title":"LabelResponse"},"ListIntegrationsArgs":{"properties":{"view":{"$ref":"#/components/schemas/IntegrationView","description":"view: Which integrations view to return. One of: apps, apps_overview, connections, connection_detail."},"connection_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Connection Id","description":"Connection to act on: the `id` field of a connection read, not its `connection_id` field. Required for connection_detail."},"project_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Project Id","description":"Filter connections and apps_overview to connections usable from this project"},"q":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q","description":"Free-text filter for apps_overview and connections"},"app":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"App","description":"Filter connections by integration slug"},"status":{"anyOf":[{"$ref":"#/components/schemas/ConnectionStatus"},{"type":"null"}],"description":"Filter connections by the derived display status (e.g. active, inactive, expired). status=no_project_access only matches when that's the highest-precedence status - a connection that also has no project access but is expired/setup_pending shows as that status instead, not no_project_access. For 'which connections lack project access' (independent of other statuses), use `access` instead."},"access":{"anyOf":[{"$ref":"#/components/schemas/AccessFilter"},{"type":"null"}],"description":"Filter connections by project access (has_access or no_access) - a direct, complete check independent of other status precedence. Prefer this over status=no_project_access when the question is purely about project accessibility."},"page":{"type":"integer","minimum":1.0,"title":"Page","description":"1-based page number","default":1},"page_size":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Page Size","description":"Items per page","default":50}},"type":"object","required":["view"],"title":"ListIntegrationsArgs"},"Listing_AgentSkillResponse_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/AgentSkillResponse"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"Listing[AgentSkillResponse]"},"Listing_LabelResponse_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/LabelResponse"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"Listing[LabelResponse]"},"Listing_ProjectUser_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ProjectUser"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"Listing[ProjectUser]"},"MeResponse":{"properties":{"id":{"type":"string","title":"Id"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"},"photo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Photo Url"},"role":{"anyOf":[{"$ref":"#/components/schemas/UserRole"},{"type":"null"}]},"teams":{"items":{"$ref":"#/components/schemas/TeamSummary"},"type":"array","title":"Teams"},"subscription":{"anyOf":[{"$ref":"#/components/schemas/SubscriptionInfo"},{"type":"null"}],"deprecated":true}},"type":"object","required":["id","email","full_name","photo_url","role","teams"],"title":"MeResponse"},"OffsetPage_SettingRead_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/SettingRead"},"type":"array","title":"Items"},"page":{"type":"integer","title":"Page"},"size":{"type":"integer","title":"Size"},"total_items":{"type":"integer","title":"Total Items"}},"type":"object","required":["items","page","size","total_items"],"title":"OffsetPage[SettingRead]"},"Or":{"properties":{"or":{"items":{"anyOf":[{"$ref":"#/components/schemas/Condition"},{"$ref":"#/components/schemas/And"},{"$ref":"#/components/schemas/Or"}]},"type":"array","minItems":1,"title":"Or"}},"additionalProperties":false,"type":"object","required":["or"],"title":"Or"},"PageReportArgs":{"properties":{"report_type":{"$ref":"#/components/schemas/PageReportType","description":"report_type: Which per-page report to return. One of: seo_performance, keywords, ai_citations, geo_visibility, lifecycle_status, ai_citations_prompts, ai_citations_platforms, ai_citations_topics, ai_activity, ai_search_funnel, seo_funnel, marketing_traffic, serp_intelligence, search_referrals, content_signals, activity_log, target_keywords, metadata."},"page_id":{"type":"string","format":"uuid","title":"Page Id","description":"The content-intelligence page to report on. Resolve it via get_ci_dashboard view=pages, search=<url or title> — the page is never referred to by id in natural language."},"market_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Market Id","description":"Market from get_ci_dashboard view=countries. Required for keywords, serp_intelligence, target_keywords and seo_funnel."},"curr_start":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Curr Start","description":"Current window start date - pairs with curr_end/prev_start/prev_end: provide all four or omit all four (defaults to trailing 30 days), else 422. Each range needs start<end, equal current/prior length, and prev_end<=curr_start."},"curr_end":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Curr End","description":"Current window end date - see curr_start."},"prev_start":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Prev Start","description":"Comparison window start date - see curr_start."},"prev_end":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Prev End","description":"Comparison window end date - see curr_start."},"keyword_intent":{"anyOf":[{"items":{"$ref":"#/components/schemas/ContentIntelligenceKeywordIntent"},"type":"array"},{"type":"null"}],"title":"Keyword Intent","description":"Keyword-intent filter."},"page":{"type":"integer","minimum":1.0,"title":"Page","description":"Page number for paginated reports.","default":1},"size":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Size","description":"Page size for paginated reports.","default":50},"sort":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sort","description":"Sort for AI-citations tab reports as '<key>:<dir>' (dir=asc|desc); valid keys are per-tab."},"search":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Search","description":"Substring filter for AI-citations tab reports (prompt/platform/topic) and the keywords report."},"category":{"$ref":"#/components/schemas/ActivityCategory","description":"Category filter for the activity_log report.","default":"all"},"cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor","description":"Opaque pagination cursor for the activity_log report."}},"type":"object","required":["report_type","page_id"],"title":"PageReportArgs"},"PageReportType":{"type":"string","enum":["seo_performance","keywords","ai_citations","geo_visibility","lifecycle_status","ai_citations_prompts","ai_citations_platforms","ai_citations_topics","ai_activity","ai_search_funnel","seo_funnel","marketing_traffic","serp_intelligence","search_referrals","content_signals","activity_log","target_keywords","metadata"],"title":"PageReportType"},"PageSpec":{"properties":{"cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"},"page_size":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Page Size","default":50}},"additionalProperties":false,"type":"object","title":"PageSpec"},"Participant":{"properties":{"actor_type":{"$ref":"#/components/schemas/ActorType"},"actor_id":{"type":"string","title":"Actor Id"}},"type":"object","required":["actor_type","actor_id"],"title":"Participant"},"PendingAttachment":{"properties":{"attachment_id":{"type":"string","format":"uuid","title":"Attachment Id"},"filename":{"type":"string","title":"Filename"},"content_type":{"type":"string","title":"Content Type"}},"type":"object","required":["attachment_id","filename","content_type"],"title":"PendingAttachment","description":"References a file already uploaded via the project upload-url, to be\nlinked to a task or comment at creation time."},"PlanTypeEnum":{"type":"string","enum":["unlimited_words_plan","limited_words_plan","unlimited_credits_plan","limited_credits_plan","hybrid_credits_plan","fixed_generations_plan"],"title":"PlanTypeEnum"},"ProjectResource":{"type":"string","enum":["users","labels","settings","skills","agents","agent_settings"],"title":"ProjectResource"},"ProjectResourceArgs":{"properties":{"resource":{"$ref":"#/components/schemas/ProjectResource","description":"resource: Which project resource catalog to read. One of: users, labels, settings, skills, agents, agent_settings."},"resource_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resource Id","description":"If set, fetch this one resource's detail instead of listing. Supported for users, skills, agents."},"settings_resource_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Settings Resource Id","description":"For resource='settings': filter settings scoped to this resource's id."},"resource_type":{"anyOf":[{"$ref":"#/components/schemas/ResourceType"},{"type":"null"}],"description":"For resource='settings': filter settings by the type of resource they scope."},"setting_name":{"anyOf":[{"$ref":"#/components/schemas/SettingName"},{"type":"null"}],"description":"For resource='settings': filter to a single setting name."},"page":{"type":"integer","minimum":1.0,"title":"Page","description":"For resource='settings': 1-based page number (offset pagination).","default":1},"size":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Size","description":"For resource='settings': page size (offset pagination).","default":50},"role":{"anyOf":[{"$ref":"#/components/schemas/AgentRole"},{"type":"null"}],"description":"For resource='agents': filter agents by role."},"setting_names":{"anyOf":[{"items":{"$ref":"#/components/schemas/SettingName"},"type":"array"},{"type":"null"}],"title":"Setting Names","description":"For resource='agent_settings': restrict to these setting names (defaults to all seeded settings)."},"cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor","description":"For resource='agents' or 'agent_settings': opaque cursor for the next page."},"limit":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Limit","description":"For resource='agents' or 'agent_settings': page size (cursor pagination).","default":50}},"type":"object","required":["resource"],"title":"ProjectResourceArgs"},"ProjectScope":{"type":"string","enum":["domain","subdomain","exact","path"],"title":"ProjectScope","description":"Names mirror the writesonic-backend postgres enum labels — do not rename."},"ProjectSummary":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"owner_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Id"},"root_website":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Root Website"},"project_type":{"$ref":"#/components/schemas/ProjectType"},"project_scope":{"$ref":"#/components/schemas/ProjectScope"},"is_default":{"type":"boolean","title":"Is Default"},"created_date":{"type":"string","format":"date-time","title":"Created Date"},"updated_date":{"type":"string","format":"date-time","title":"Updated Date"},"has_access":{"type":"boolean","title":"Has Access","description":"HQ is enabled for this project. False: make no HQ project-scoped call. GEO tools are unaffected - keep using them for brand-level questions on this project."}},"type":"object","required":["id","name","owner_id","root_website","project_type","project_scope","is_default","created_date","updated_date","has_access"],"title":"ProjectSummary"},"ProjectType":{"type":"string","enum":["STANDARD","PITCH"],"title":"ProjectType","description":"Names mirror the writesonic-backend postgres enum labels — do not rename."},"ProjectUser":{"properties":{"id":{"type":"string","title":"Id"},"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"},"photo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Photo Url"},"role":{"anyOf":[{"$ref":"#/components/schemas/UserRole"},{"type":"null"}]}},"type":"object","required":["id","full_name"],"title":"ProjectUser"},"QueryResponse":{"properties":{"query_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Id"},"chunks":{"items":{"$ref":"#/components/schemas/Chunk"},"type":"array","title":"Chunks","default":[]},"citations":{"items":{"$ref":"#/components/schemas/Citation"},"type":"array","title":"Citations","default":[]},"answer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Answer"},"reasoning":{"type":"string","title":"Reasoning","default":""},"usage_instruction":{"type":"string","title":"Usage Instruction","default":""},"strategy":{"type":"string","title":"Strategy","default":"SIMPLE"},"leafmerger_rolled_up":{"type":"boolean","title":"Leafmerger Rolled Up","default":false},"bm25_fired":{"type":"boolean","title":"Bm25 Fired","default":false},"cache_hit":{"type":"boolean","title":"Cache Hit","default":false}},"type":"object","title":"QueryResponse","description":"Retrieval response. `answer` is null in chunks-only mode."},"QuestionBody":{"properties":{"questions":{"items":{"$ref":"#/components/schemas/QuestionItem"},"type":"array","title":"Questions","description":"The questions asked in this call, in display order."}},"type":"object","required":["questions"],"title":"QuestionBody","description":"The `body` of an ask_question item: the batch of questions the agent asked in one call."},"QuestionItem":{"properties":{"question":{"type":"string","title":"Question","description":"The question text to show the user."},"options":{"items":{"$ref":"#/components/schemas/QuestionOption"},"type":"array","title":"Options","description":"Suggested answers to render as pickable choices; may be empty. The user can always type a custom answer regardless of what is listed here."}},"type":"object","required":["question"],"title":"QuestionItem","description":"One question in the batch, positionally aligned to the answer at the same index in `answer`."},"QuestionOption":{"properties":{"label":{"type":"string","title":"Label","description":"The pickable answer, shown as the option's heading. When the user picks this option, this exact string comes back as the matching answer's `answer_text` with `is_custom=false`."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Optional display-only sub-text under the label explaining the option or its trade-off; `null` when the label already speaks for itself."}},"type":"object","required":["label"],"title":"QuestionOption","description":"One suggested answer shown under a question. The user may pick it or type their own instead."},"QuestionPayload":{"properties":{"kind":{"type":"string","const":"ask_question","title":"Kind","default":"ask_question"},"body":{"$ref":"#/components/schemas/QuestionBody"},"answer":{"anyOf":[{"items":{"$ref":"#/components/schemas/AnswerItem"},"type":"array"},{"type":"null"}],"title":"Answer"},"status":{"$ref":"#/components/schemas/QuestionStatus"},"answered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Answered At"},"answered_by_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Answered By User Id"},"run_id":{"type":"string","format":"uuid","title":"Run Id"}},"type":"object","required":["body","answer","status","answered_at","answered_by_user_id","run_id"],"title":"QuestionPayload"},"QuestionStatus":{"type":"string","enum":["pending_answer","answered","auto_answered","expired","declined"],"title":"QuestionStatus"},"RelationDirection":{"type":"string","enum":["source_task_id","target_task_id"],"title":"RelationDirection","description":"Which column the listed task ids came from, relative to the queried task.\n\n``SOURCE`` ids are ``source_task_id`` values (the queried task is the target);\n``TARGET`` ids are ``target_task_id`` values (the queried task is the source).\nKeys mirror the ``source_task_id``/``target_task_id`` fields on the relations endpoint."},"RelationResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"source_task_id":{"type":"string","format":"uuid","title":"Source Task Id"},"target_task_id":{"type":"string","format":"uuid","title":"Target Task Id"},"relation_type":{"$ref":"#/components/schemas/TaskRelationType"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","source_task_id","target_task_id","relation_type","created_at"],"title":"RelationResponse"},"ResourceType":{"type":"string","enum":["agent","task","workflow_run","grid"],"title":"ResourceType"},"RoleLevel":{"type":"string","enum":["owner","super_admin","admin","member"],"title":"RoleLevel"},"RollupSource":{"properties":{"task_id":{"type":"string","format":"uuid","title":"Task Id"}},"type":"object","required":["task_id"],"title":"RollupSource"},"RunHistorySource":{"type":"string","enum":["grid","playbook","task"],"title":"RunHistorySource"},"SettingName":{"type":"string","enum":["skip_review","content_intelligence_skip_review","gated_tools","gated_capabilities","mcp_gated_tools","resource_credit_limit","skip_resource_credit_limit"],"title":"SettingName"},"SettingRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"resource_type":{"$ref":"#/components/schemas/ResourceType"},"resource_id":{"type":"string","format":"uuid","title":"Resource Id"},"setting_name":{"$ref":"#/components/schemas/SettingName"},"setting_value":{"title":"Setting Value"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","resource_type","resource_id","setting_name","setting_value","created_at","updated_at"],"title":"SettingRead","description":"Resource-tier row for the project-scoped endpoints.\n\nDeliberately narrow: the workspace read path needs its own schema, not a widening."},"SkillBundleFile":{"properties":{"path":{"type":"string","title":"Path"},"download_url":{"type":"string","title":"Download Url"},"download_url_expires_at":{"type":"string","format":"date-time","title":"Download Url Expires At"}},"type":"object","required":["path","download_url","download_url_expires_at"],"title":"SkillBundleFile"},"SortOrder":{"type":"string","enum":["asc","desc"],"title":"SortOrder"},"SortSpec":{"properties":{"sort_by":{"$ref":"#/components/schemas/TaskSortField","default":"created_at"},"sort_order":{"$ref":"#/components/schemas/SortOrder","default":"desc"}},"additionalProperties":false,"type":"object","title":"SortSpec"},"SourceStatus":{"type":"string","enum":["QUEUED","SYNCING","SYNCED","SYNC_FAILED"],"title":"SourceStatus"},"SourceType":{"type":"string","enum":["WEB_URL","WEBSITE","FILE","DOCUMENT"],"title":"SourceType"},"SubscriptionInfo":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"is_active":{"type":"boolean","title":"Is Active"},"subscription_for":{"anyOf":[{"$ref":"#/components/schemas/SubscriptionTypeEnum"},{"type":"null"}]},"is_trial":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Trial"},"current_period_start":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Current Period Start"},"current_period_end":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Current Period End"},"cancel_at_period_end":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Cancel At Period End"},"user_seats":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"User Seats"},"plan":{"anyOf":[{"$ref":"#/components/schemas/SubscriptionPlanInfo"},{"type":"null"}]}},"type":"object","required":["id","is_active"],"title":"SubscriptionInfo"},"SubscriptionPlanInfo":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"plan_type":{"anyOf":[{"$ref":"#/components/schemas/PlanTypeEnum"},{"type":"null"}]},"interval":{"anyOf":[{"$ref":"#/components/schemas/IntervalEnumV2"},{"type":"null"}]},"price":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Price"},"currency_code":{"anyOf":[{"$ref":"#/components/schemas/CurrencyCodeEnum"},{"type":"null"}]},"credits":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Credits"},"words":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Words"},"is_unlimited":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Unlimited"}},"type":"object","required":["id"],"title":"SubscriptionPlanInfo"},"SubscriptionTypeEnum":{"type":"string","enum":["webapp","mobile","botsonic"],"title":"SubscriptionTypeEnum"},"SubtaskCount":{"properties":{"total":{"type":"integer","title":"Total","default":0},"completed":{"type":"integer","title":"Completed","default":0}},"type":"object","title":"SubtaskCount"},"TaskCounts":{"properties":{"group_by":{"$ref":"#/components/schemas/TaskGroupByField"},"total":{"type":"integer","title":"Total"},"counts":{"additionalProperties":{"type":"integer"},"type":"object","title":"Counts"}},"type":"object","required":["group_by","total","counts"],"title":"TaskCounts"},"TaskCreate":{"properties":{"title":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"null"}],"title":"Title","description":"Task title. Omit or send null when a description is given; can't be blank."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Task body/details."},"status":{"$ref":"#/components/schemas/TaskStatus","description":"Initial task status.","default":"backlog"},"priority":{"$ref":"#/components/schemas/TaskPriority","description":"Task priority.","default":"none"},"assignee_type":{"$ref":"#/components/schemas/ActorType","description":"Whether the assignee is a human user or an agent.","default":"system"},"assignee_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assignee Id","description":"Required unless assignee_type is system - the user id for human, or the agent's UUID (as a string) for ai_agent."},"parent_task_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Task Id","description":"Parent task, to create this as a subtask."},"page_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Page Id","description":"Content-intelligence page this task relates to, if any."},"market_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Market Id","description":"Market this task is for, if any. Not accepted with parent_task_id: a subtask takes its parent's market."},"action_item_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Action Item Id","description":"Action Center item this task was created for, if any. Set by the Action Center only."},"source":{"$ref":"#/components/schemas/TaskSource","description":"Source of the task.","default":"user"},"due_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Due Date","description":"Due date for the task."},"label_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Label Ids","description":"Labels to attach to the task."},"settings_override":{"additionalProperties":true,"propertyNames":{"$ref":"#/components/schemas/SettingName"},"type":"object","title":"Settings Override","description":"Per-task overrides of project-level agent settings. Value per key: for skip_review, one of ReviewMode (require_review, auto_approve, defer) - not a bool; for gated_tools/gated_capabilities, a dict of tool/capability NAME (not id) -> bool - keys are resolved by name against active tool/capability rows."},"attachments":{"items":{"$ref":"#/components/schemas/PendingAttachment"},"type":"array","title":"Attachments","description":"Files to attach to the task on creation."}},"type":"object","title":"TaskCreate"},"TaskDetail":{"properties":{"credits":{"anyOf":[{"$ref":"#/components/schemas/CreditUsage"},{"type":"null"}]},"id":{"type":"string","format":"uuid","title":"Id"},"project_id":{"type":"string","format":"uuid","title":"Project Id"},"identifier":{"type":"string","title":"Identifier"},"title":{"type":"string","title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"status":{"$ref":"#/components/schemas/TaskStatus"},"priority":{"$ref":"#/components/schemas/TaskPriority"},"creator_type":{"$ref":"#/components/schemas/ActorType"},"creator_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Creator Id"},"assignee_type":{"$ref":"#/components/schemas/ActorType"},"assignee_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assignee Id"},"parent_task_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Task Id"},"page_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Page Id"},"market_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Market Id"},"schedule_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Schedule Id"},"source":{"$ref":"#/components/schemas/TaskSource"},"due_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Due Date"},"sort_order":{"type":"number","title":"Sort Order"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"comment_count":{"type":"integer","title":"Comment Count"},"last_comment_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Comment At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"credit_estimate":{"anyOf":[{"$ref":"#/components/schemas/CreditEstimate"},{"type":"null"}]},"labels":{"items":{"$ref":"#/components/schemas/LabelResponse"},"type":"array","title":"Labels"},"thread":{"anyOf":[{"$ref":"#/components/schemas/ThreadRef"},{"type":"null"}]},"subtask_count":{"$ref":"#/components/schemas/SubtaskCount"},"relation_count":{"type":"integer","title":"Relation Count","default":0},"attachment_count":{"type":"integer","title":"Attachment Count","default":0},"attachments":{"items":{"$ref":"#/components/schemas/AttachmentResponse"},"type":"array","title":"Attachments"},"hierarchy":{"items":{"$ref":"#/components/schemas/TaskHierarchyItem"},"type":"array","title":"Hierarchy"},"last_comment":{"anyOf":[{"$ref":"#/components/schemas/CommentPreview"},{"type":"null"}]},"template":{"anyOf":[{"$ref":"#/components/schemas/TaskTemplateRef"},{"type":"null"}],"description":"The template this task ran from. Null for an ordinary task."},"last_template_build_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Last Template Build Id","description":"Same as template_build.last_build_id; kept until the frontend reads that."},"template_build":{"$ref":"#/components/schemas/TaskTemplateSaveState","description":"Saving this task as a template."}},"type":"object","required":["id","project_id","identifier","title","description","status","priority","creator_type","creator_id","assignee_type","assignee_id","parent_task_id","page_id","market_id","schedule_id","source","due_date","sort_order","started_at","completed_at","comment_count","last_comment_at","created_at","updated_at","template_build"],"title":"TaskDetail"},"TaskFilterQuery":{"properties":{"filter":{"anyOf":[{"$ref":"#/components/schemas/Condition"},{"$ref":"#/components/schemas/And"},{"$ref":"#/components/schemas/Or"},{"type":"null"}],"title":"Filter"},"sort":{"$ref":"#/components/schemas/SortSpec"},"pagination":{"$ref":"#/components/schemas/PageSpec"},"include_parents":{"type":"boolean","title":"Include Parents","description":"Return the immediate parents of this page's items in the separate `parents` field, even when a parent does not match the filter. Parents that are themselves page items are not repeated. Pagination applies to matched tasks only.","default":false}},"additionalProperties":false,"type":"object","title":"TaskFilterQuery"},"TaskGroupByField":{"type":"string","enum":["status","priority","assignee_id","creator_id","page_id"],"title":"TaskGroupByField"},"TaskHierarchyItem":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"identifier":{"type":"string","title":"Identifier"},"title":{"type":"string","title":"Title"}},"type":"object","required":["id","identifier","title"],"title":"TaskHierarchyItem"},"TaskInclude":{"type":"string","enum":["timeline","relations","attachments","approvals"],"title":"TaskInclude"},"TaskListItem":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"project_id":{"type":"string","format":"uuid","title":"Project Id"},"identifier":{"type":"string","title":"Identifier"},"title":{"type":"string","title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"status":{"$ref":"#/components/schemas/TaskStatus"},"priority":{"$ref":"#/components/schemas/TaskPriority"},"creator_type":{"$ref":"#/components/schemas/ActorType"},"creator_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Creator Id"},"assignee_type":{"$ref":"#/components/schemas/ActorType"},"assignee_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assignee Id"},"parent_task_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Task Id"},"page_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Page Id"},"market_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Market Id"},"schedule_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Schedule Id"},"source":{"$ref":"#/components/schemas/TaskSource"},"due_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Due Date"},"sort_order":{"type":"number","title":"Sort Order"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"comment_count":{"type":"integer","title":"Comment Count"},"last_comment_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Comment At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"label_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Label Ids"},"relation_ids":{"additionalProperties":{"additionalProperties":{"items":{"type":"string","format":"uuid"},"type":"array"},"propertyNames":{"$ref":"#/components/schemas/RelationDirection"},"type":"object"},"propertyNames":{"$ref":"#/components/schemas/TaskRelationType"},"type":"object","title":"Relation Ids"},"subtask_count":{"$ref":"#/components/schemas/SubtaskCount"},"credits_consumed":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Credits Consumed"}},"type":"object","required":["id","project_id","identifier","title","description","status","priority","creator_type","creator_id","assignee_type","assignee_id","parent_task_id","page_id","market_id","schedule_id","source","due_date","sort_order","started_at","completed_at","comment_count","last_comment_at","created_at","updated_at","subtask_count"],"title":"TaskListItem"},"TaskPriority":{"type":"string","enum":["urgent","high","medium","low","none"],"title":"TaskPriority"},"TaskQueryArgs":{"properties":{"view":{"$ref":"#/components/schemas/TaskQueryView","description":"view: 'list' for a cursor page of task list items, 'counts' for grouped totals. One of: list, counts.","default":"list"},"query":{"$ref":"#/components/schemas/TaskFilterQuery","description":"Filter, sort, and pagination. `filter` is shared by both views."},"group_by":{"anyOf":[{"$ref":"#/components/schemas/TaskGroupByField"},{"type":"null"}],"description":"Group field for view='counts' (status/priority/assignee_id/creator_id). Required for counts."}},"type":"object","title":"TaskQueryArgs"},"TaskQueryPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/TaskListItem"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"},"has_more":{"type":"boolean","title":"Has More"},"parents":{"items":{"$ref":"#/components/schemas/TaskListItem"},"type":"array","title":"Parents"}},"type":"object","required":["items","has_more"],"title":"TaskQueryPage","description":"`items` plus, when `include_parents` is requested, the immediate parents of this\npage's items that are not already in `items`. Parents are page-local context, not\npart of the paginated sequence."},"TaskQueryView":{"type":"string","enum":["list","counts"],"title":"TaskQueryView"},"TaskRelationType":{"type":"string","enum":["depends_on","relates_to","duplicates"],"title":"TaskRelationType"},"TaskResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"project_id":{"type":"string","format":"uuid","title":"Project Id"},"identifier":{"type":"string","title":"Identifier"},"title":{"type":"string","title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"status":{"$ref":"#/components/schemas/TaskStatus"},"priority":{"$ref":"#/components/schemas/TaskPriority"},"creator_type":{"$ref":"#/components/schemas/ActorType"},"creator_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Creator Id"},"assignee_type":{"$ref":"#/components/schemas/ActorType"},"assignee_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assignee Id"},"parent_task_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Task Id"},"page_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Page Id"},"market_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Market Id"},"schedule_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Schedule Id"},"source":{"$ref":"#/components/schemas/TaskSource"},"due_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Due Date"},"sort_order":{"type":"number","title":"Sort Order"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"comment_count":{"type":"integer","title":"Comment Count"},"last_comment_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Comment At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","project_id","identifier","title","description","status","priority","creator_type","creator_id","assignee_type","assignee_id","parent_task_id","page_id","market_id","schedule_id","source","due_date","sort_order","started_at","completed_at","comment_count","last_comment_at","created_at","updated_at"],"title":"TaskResponse"},"TaskSortField":{"type":"string","enum":["created_at","updated_at","due_date","priority","sort_order","completed_at"],"title":"TaskSortField"},"TaskSource":{"type":"string","enum":["user","agent","content_intelligence"],"title":"TaskSource"},"TaskStatus":{"type":"string","enum":["backlog","todo","in_progress","pending_human_approval","pending_credits","in_review","done","cancelled"],"title":"TaskStatus"},"TaskTemplateCategory":{"type":"string","enum":["content_creation","content_optimization","research","report","outreach","other"],"title":"TaskTemplateCategory"},"TaskTemplateIconData":{"properties":{"kind":{"$ref":"#/components/schemas/TaskTemplateIconKind"},"value":{"type":"string","maxLength":16384,"title":"Value"}},"type":"object","required":["kind","value"],"title":"TaskTemplateIconData","description":"`value` is an emoji, an https link to an image file, or SVG markup, as `kind` says."},"TaskTemplateIconKind":{"type":"string","enum":["emoji","url","svg"],"title":"TaskTemplateIconKind"},"TaskTemplateRef":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"Open the template at this id."},"name":{"type":"string","title":"Name","description":"What to show on the link."},"icon":{"anyOf":[{"$ref":"#/components/schemas/TaskTemplateIconData"},{"type":"null"}],"description":"The link's icon; null means the category icon."},"category":{"$ref":"#/components/schemas/TaskTemplateCategory","description":"Picks the fallback icon."}},"type":"object","required":["id","name","icon","category"],"title":"TaskTemplateRef","description":"The template a task ran from, for the link on its detail."},"TaskTemplateSaveState":{"properties":{"last_build_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Last Build Id","description":"The newest build requested from this task, whatever its status. Null when none."},"blocked_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Blocked Reason","description":"Why it can't be saved as a template, for the person to read. Null when it can."},"saved":{"anyOf":[{"$ref":"#/components/schemas/TaskTemplateRef"},{"type":"null"}],"description":"The template made from this task. Null when none, or it was retired."},"can_save":{"type":"boolean","title":"Can Save","description":"Whether to offer saving this task as a template.","readOnly":true}},"type":"object","required":["can_save"],"title":"TaskTemplateSaveState","description":"Saving this task as a template, as its page shows it."},"TaskUpdate":{"properties":{"title":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"null"}],"title":"Title","description":"New title."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"New description."},"priority":{"anyOf":[{"$ref":"#/components/schemas/TaskPriority"},{"type":"null"}],"description":"New priority."},"due_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Due Date","description":"New due date."},"sort_order":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Sort Order","description":"New manual sort position within its list."},"parent_task_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Task Id","description":"New parent task, to make this task a subtask; set to null to un-parent."}},"type":"object","title":"TaskUpdate"},"TaskUpdateAction":{"type":"string","enum":["update_fields","transition_status","assign"],"title":"TaskUpdateAction"},"TaskUpdateArgs":{"properties":{"action":{"$ref":"#/components/schemas/TaskUpdateAction","description":"action: Which mutation to apply to the task. One of: update_fields, transition_status, assign."},"task_id":{"type":"string","format":"uuid","title":"Task Id","description":"Task to update."},"fields":{"anyOf":[{"$ref":"#/components/schemas/TaskUpdate"},{"type":"null"}],"description":"Field edits for action=update_fields - only set what changes. Explicit null on title/priority/sort_order is rejected (they can't be cleared this way); omit instead."},"status":{"anyOf":[{"$ref":"#/components/schemas/TaskStatus"},{"type":"null"}],"description":"New status for action=transition_status."},"assignee":{"anyOf":[{"$ref":"#/components/schemas/AssignTask"},{"type":"null"}],"description":"Assignee for action=assign."}},"type":"object","required":["action","task_id"],"title":"TaskUpdateArgs"},"TaskWithIncludes":{"properties":{"task":{"$ref":"#/components/schemas/TaskDetail"},"timeline":{"anyOf":[{"$ref":"#/components/schemas/TimelineResponse"},{"type":"null"}]},"relations":{"anyOf":[{"items":{"$ref":"#/components/schemas/RelationResponse"},"type":"array"},{"type":"null"}],"title":"Relations"},"approvals":{"anyOf":[{"items":{"$ref":"#/components/schemas/ApprovalRead"},"type":"array"},{"type":"null"}],"title":"Approvals"}},"type":"object","required":["task"],"title":"TaskWithIncludes"},"TeamSummary":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"role":{"anyOf":[{"$ref":"#/components/schemas/RoleLevel"},{"type":"string"}],"title":"Role"},"plan_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan Name"}},"type":"object","required":["id","name","role","plan_name"],"title":"TeamSummary"},"ThreadContact":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role"}},"type":"object","required":["name","email"],"title":"ThreadContact"},"ThreadRef":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"contact":{"$ref":"#/components/schemas/ThreadContact"},"cc_emails":{"items":{"type":"string"},"type":"array","title":"Cc Emails","default":[]}},"type":"object","required":["id","contact"],"title":"ThreadRef","description":"A conversation in one line: where to open it, and who is on it."},"TimelineItem":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"actor_type":{"$ref":"#/components/schemas/ActorType"},"actor_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Actor Id"},"payload":{"oneOf":[{"$ref":"#/components/schemas/ActivityPayload"},{"$ref":"#/components/schemas/CommentPayload"},{"$ref":"#/components/schemas/ApprovalPayload"},{"$ref":"#/components/schemas/WorkflowPayload"},{"$ref":"#/components/schemas/QuestionPayload"}],"title":"Payload","discriminator":{"propertyName":"kind","mapping":{"activity":"#/components/schemas/ActivityPayload","approval":"#/components/schemas/ApprovalPayload","ask_question":"#/components/schemas/QuestionPayload","comment":"#/components/schemas/CommentPayload","workflow":"#/components/schemas/WorkflowPayload"}}}},"type":"object","required":["id","created_at","actor_type","actor_id","payload"],"title":"TimelineItem"},"TimelineKind":{"type":"string","enum":["all","comment","activity","approval","workflow","ask_question"],"title":"TimelineKind"},"TimelineResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/TimelineItem"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"},"has_more":{"type":"boolean","title":"Has More"},"participants":{"items":{"$ref":"#/components/schemas/Participant"},"type":"array","title":"Participants"}},"type":"object","required":["items","next_cursor","has_more","participants"],"title":"TimelineResponse"},"UserRole":{"type":"string","enum":["super_admin","admin","member"],"title":"UserRole","description":"Preserve lowercase enum names to match the Writesonic DB enum values."},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"WhoamiResponse":{"properties":{"identity":{"$ref":"#/components/schemas/MeResponse"},"active_workspace_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Active Workspace Id","description":"The user's active workspace, scoping the projects below."},"projects":{"items":{"$ref":"#/components/schemas/ProjectSummary"},"type":"array","title":"Projects","description":"Projects in the active workspace; empty when no workspace is resolved."}},"type":"object","required":["identity"],"title":"WhoamiResponse"},"WorkflowComponentArgs":{"properties":{"view":{"$ref":"#/components/schemas/WorkflowComponentView","description":"view: Which component read to return. One of: components, batch, hub_capabilities."},"search":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search","description":"Free-text search (components view)"},"capability_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Capability Ids","description":"Capability ids to fetch (required for view='batch')"},"skill_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Skill Id","description":"Hub skill id filter (hub_capabilities view) - pass this directly when the skill is already named; no need to list unfiltered first."},"capability_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Capability Id","description":"Hub capability id filter (hub_capabilities view) - pass this directly when the capability id is already known; no need to list unfiltered first."},"page":{"type":"integer","minimum":1.0,"title":"Page","description":"1-based page","default":1},"size":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Size","description":"Page size","default":50}},"type":"object","required":["view"],"title":"WorkflowComponentArgs"},"WorkflowComponentView":{"type":"string","enum":["components","batch","hub_capabilities"],"title":"WorkflowComponentView"},"WorkflowGetArgs":{"properties":{"view":{"$ref":"#/components/schemas/WorkflowView","description":"view: Which slice to return for the workflow. One of: detail, versions, version_detail, runs, run_detail."},"workflow_id":{"type":"string","format":"uuid","title":"Workflow Id","description":"Workflow id"},"version_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Version Id","description":"Version id (required for view='version_detail')"},"workflow_run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Run Id","description":"Run id (required for view='run_detail')"},"include_conversation":{"type":"boolean","title":"Include Conversation","description":"Include builder conversation in version_detail; set false when the question only asks for the step config/graph and wants the chat history skipped.","default":true},"run_status":{"anyOf":[{"items":{"$ref":"#/components/schemas/WorkflowRunStatus"},"type":"array"},{"type":"null"}],"title":"Run Status","description":"Run status filter (view='runs')"},"run_search":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Run Search","description":"Match runs whose name contains this text, e.g. the 6-char suffix of a run name (view='runs')"},"run_source":{"$ref":"#/components/schemas/RunHistorySource","description":"Run source (view='runs'): 'playbook' for standalone runs (default - this filter applies even when left unset, so it only returns playbook-sourced runs), 'grid' for grid-cell runs, 'task' for task-triggered runs. run_search does not search across all sources by itself - check each run_source explicitly when the source is unknown.","default":"playbook"},"run_sort_by":{"$ref":"#/components/schemas/WorkflowRunSortBy","description":"Run sort field","default":"created_at"},"sort_order":{"$ref":"#/components/schemas/SortOrder","description":"Sort direction","default":"desc"},"created_after":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created After","description":"Runs created at/after this time"},"created_before":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created Before","description":"Runs created at/before this time"},"page":{"type":"integer","minimum":1.0,"title":"Page","description":"1-based page (versions/runs)","default":1},"size":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Size","description":"Page size (versions/runs)","default":50}},"type":"object","required":["view","workflow_id"],"title":"WorkflowGetArgs"},"WorkflowListArgs":{"properties":{"view":{"$ref":"#/components/schemas/WorkflowListView","description":"view: 'list' for the paginated inventory, 'counts' for status counts. One of: list, counts."},"type":{"anyOf":[{"$ref":"#/components/schemas/WorkflowType"},{"type":"null"}],"description":"Filter by workflow type: system (the curated Playbooks the tagging UI offers) or user (workflows built by users in this workspace)."},"search":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search","description":"Free-text search over workflow names"},"status":{"anyOf":[{"$ref":"#/components/schemas/WorkflowVersionStatus"},{"type":"null"}],"description":"Filter by latest version status"},"sort_by":{"anyOf":[{"$ref":"#/components/schemas/WorkflowSortBy"},{"type":"null"}],"description":"Sort field"},"sort_order":{"$ref":"#/components/schemas/SortOrder","description":"Sort direction","default":"desc"},"page":{"type":"integer","minimum":1.0,"title":"Page","description":"1-based page number (list view)","default":1},"size":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Size","description":"Page size (list view)","default":50}},"type":"object","required":["view"],"title":"WorkflowListArgs"},"WorkflowListView":{"type":"string","enum":["list","counts"],"title":"WorkflowListView"},"WorkflowPayload":{"properties":{"kind":{"type":"string","const":"workflow","title":"Kind","default":"workflow"},"workflow_id":{"type":"string","format":"uuid","title":"Workflow Id"},"workflow_run_id":{"type":"string","format":"uuid","title":"Workflow Run Id"},"status":{"$ref":"#/components/schemas/WorkflowTimelineStatus"},"attempt":{"type":"integer","title":"Attempt","description":"Which run of this workflow on this task this row is, counting from 1 in start order. A workflow that failed and was run again shows attempt 2, not a second identical entry."},"total_attempts":{"type":"integer","title":"Total Attempts","description":"How many times this workflow has run on this task in total."}},"type":"object","required":["workflow_id","workflow_run_id","status","attempt","total_attempts"],"title":"WorkflowPayload"},"WorkflowRunSortBy":{"type":"string","enum":["created_at"],"title":"WorkflowRunSortBy"},"WorkflowRunStatus":{"type":"string","enum":["pending","running","completed","failed","cancelled","awaiting_interaction","awaiting_credits"],"title":"WorkflowRunStatus"},"WorkflowSortBy":{"type":"string","enum":["created_at","last_edited","last_run"],"title":"WorkflowSortBy"},"WorkflowStatus":{"type":"string","enum":["DRAFT","IN_REVIEW","APPROVED","ARCHIVED"],"title":"WorkflowStatus"},"WorkflowTimelineStatus":{"type":"string","enum":["pending","running","requires_human_input","requires_credits","completed","failed","cancelled","timed_out"],"title":"WorkflowTimelineStatus","description":"Derived from workflow_runs.status + the agent interrupt; see timeline_service._workflow_timeline_status."},"WorkflowType":{"type":"string","enum":["system","user"],"title":"WorkflowType"},"WorkflowVersionStatus":{"type":"string","enum":["draft","published"],"title":"WorkflowVersionStatus"},"WorkflowView":{"type":"string","enum":["detail","versions","version_detail","runs","run_detail"],"title":"WorkflowView"}},"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","description":"Writesonic API key","in":"header","name":"X-API-Key"}}}}