{
  "openapi": "3.1.0",
  "info": {
    "title": "Workspaces API",
    "version": "1.1.0",
    "description": "Spaces, tasks, task actions, comments, folders and the task-sync routes. Task-sync routes also accept an integration token (`oauth2`); every other route needs a user session or API key."
  },
  "servers": [
    {
      "url": "https://api.quiva.ai",
      "description": "Production API server"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    },
    {
      "apiKeyAuth": []
    }
  ],
  "paths": {
    "/workspaces/spaces": {
      "get": {
        "summary": "List all spaces",
        "description": "Returns every space in the account. The response always includes a built-in `ESCALATE` space (used for human-in-the-loop escalations from flows); it cannot be updated or deleted.",
        "operationId": "listSpaces",
        "x-resource-type": "service",
        "responses": {
          "200": {
            "description": "List of spaces",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SpaceList"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyAuth": []
          },
          {
            "oauth2": []
          }
        ],
        "tags": [
          "Spaces"
        ]
      }
    },
    "/workspaces/space": {
      "post": {
        "summary": "Create a space",
        "operationId": "createSpace",
        "x-resource-type": "service",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSpaceRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Created space",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Space"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyAuth": []
          }
        ],
        "tags": [
          "Spaces"
        ]
      }
    },
    "/workspaces/space/{id}": {
      "get": {
        "summary": "Get a space by ID",
        "operationId": "getSpace",
        "x-resource-type": "service",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Space",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Space"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyAuth": []
          },
          {
            "oauth2": []
          }
        ],
        "tags": [
          "Spaces"
        ]
      },
      "patch": {
        "summary": "Update a space",
        "description": "Merges the fields you send over the stored space — send only the fields you are changing. The built-in `ESCALATE` space cannot be updated and returns 403.",
        "operationId": "updateSpace",
        "x-resource-type": "service",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateSpaceRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated space",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Space"
                }
              }
            }
          },
          "202": {
            "description": "Update accepted, with a background re-assignment queued. This happens when a priority you removed was still in use by existing tasks — those tasks are reassigned to the fallback priority (the space's default, or the first remaining one)."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyAuth": []
          },
          {
            "oauth2": []
          }
        ],
        "tags": [
          "Spaces"
        ]
      },
      "delete": {
        "summary": "Delete a space",
        "description": "Deletes a space and purges its tasks, comments, and files. Irreversible. The built-in `ESCALATE` space cannot be deleted and returns 403.",
        "operationId": "deleteSpace",
        "x-resource-type": "service",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Space deleted"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyAuth": []
          }
        ],
        "tags": [
          "Spaces"
        ]
      }
    },
    "/workspaces/space/{space_id}/tasks": {
      "get": {
        "summary": "List tasks in a space",
        "operationId": "listTasks",
        "x-resource-type": "service",
        "parameters": [
          {
            "name": "space_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "archived",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "scheduled",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false",
                "any"
              ]
            },
            "description": "`true` lists only scheduled tasks; absent or `false` only unscheduled ones; `any` both."
          },
          {
            "name": "limit",
            "in": "query",
            "description": "How many results to return at most, up to 999. `has_more` tells you whether another page exists.",
            "schema": {
              "type": "integer",
              "default": 300
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "If there are more results than the limit, offset can be used to get to the next batch of results",
            "schema": {
              "type": "integer",
              "default": 0
            }
          },
          {
            "name": "sort_by",
            "in": "query",
            "description": "Name of the field used for sorting, such as `created_at`, `updated_at` or `activity_at`.",
            "schema": {
              "type": "string",
              "default": "created_at"
            }
          },
          {
            "name": "sort_order",
            "in": "query",
            "description": "Should the results be sorted in ascending or descending order relative to sort_by field",
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ],
              "default": "asc"
            }
          },
          {
            "name": "created_by",
            "in": "query",
            "description": "Exact match on the user ID of the task creator",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "priority",
            "in": "query",
            "description": "Exact match on priority; comma-separated values to filter by priority",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "description": "Exact match on status; comma-separated values to filter by multiple statuses. See `with_no_status`.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "title",
            "in": "query",
            "description": "Term search on task title",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "assignees",
            "in": "query",
            "description": "Comma-separated assignee IDs; at least one must match",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "reporter",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "created_at",
            "in": "query",
            "description": "Filter by creation date. Use a single date or a range as `{start_date},{end_date}`",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_at",
            "in": "query",
            "description": "Filter by last-updated date. Use a single date or a range as `{start_date},{end_date}`",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "scheduled_at",
            "in": "query",
            "description": "Filter by scheduled date. Use a single date or a range as `{start_date},{end_date}`",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "external_id",
            "in": "query",
            "required": false,
            "description": "Exact match.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "folder",
            "in": "query",
            "required": false,
            "description": "Exact folder (every task for one base record).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tags",
            "in": "query",
            "required": false,
            "description": "Comma-separated; at least one must match.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "parent",
            "in": "query",
            "required": false,
            "description": "Parent task id, to list subtasks; comma-separated to list several parents' subtasks.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "source",
            "in": "query",
            "required": false,
            "description": "Exact source.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "currency",
            "in": "query",
            "required": false,
            "description": "Exact currency.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "due_date",
            "in": "query",
            "required": false,
            "description": "Due date filter.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "exclude_subtasks",
            "in": "query",
            "required": false,
            "description": "`true` drops subtasks from the page after it is read; each parent still nests subtasks on the same page. Prefer `parents_only`, which pages and counts parents only.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "parents_only",
            "in": "query",
            "required": false,
            "description": "`true` pages top-level tasks only, so `total_hits` counts parents; each parent carries all its subtasks in `subtasks`.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "nest_subtasks",
            "in": "query",
            "required": false,
            "description": "`true` gives every listed parent all its subtasks in `subtasks`, while subtasks are still listed as rows of their own.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "with_no_status",
            "in": "query",
            "required": false,
            "description": "`true` adds tasks with no status to the `status` filter; on its own, lists only tasks with no status.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "description": "Search: any word of the title or description, the last word as a prefix, or a task id prefix (`OPS-12` finds OPS-120 to OPS-129).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ids",
            "in": "query",
            "required": false,
            "description": "Comma-separated task ids, read by key.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "folders",
            "in": "query",
            "required": false,
            "description": "Comma-separated folders, each matched exactly.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "under_folder",
            "in": "query",
            "required": false,
            "description": "A folder and every folder nested in it, absolute (`spaces.<id>.a`) or space-relative (`a`).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "dated",
            "in": "query",
            "required": false,
            "description": "`true` lists tasks with a due date or scheduled time, `false` those with neither.",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "counts",
            "in": "query",
            "required": false,
            "description": "`status` adds `counts.status`: the number of matching tasks per status, `\"\"` for tasks with no status. A failed count leaves `counts` out rather than failing the page.",
            "schema": {
              "type": "string",
              "enum": [
                "status"
              ]
            }
          },
          {
            "name": "count_due",
            "in": "query",
            "required": false,
            "description": "With `counts=status`, a `start,end` date range; adds `counts.due`, how many matching tasks are due in it.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of tasks",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskList"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "description": "Not authenticated, or the integration token was revoked (`token_revoked`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden: `scope_denied`, or `integration_not_allowed` for an integration bearer outside workspaces.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Changed: `external_id` exact-match filter, `has_more` on the reply, and `sort_by=activity_at`. The other filters are unchanged.",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyAuth": []
          },
          {
            "oauth2": []
          }
        ],
        "tags": [
          "Spaces"
        ]
      }
    },
    "/workspaces/task": {
      "post": {
        "summary": "Create a task",
        "operationId": "createTask",
        "x-resource-type": "service",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTaskRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Created task",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateTaskResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "description": "Not authenticated, or the integration token was revoked (`token_revoked`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden: `scope_denied`, or `integration_not_allowed` for an integration bearer outside workspaces.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Changed: accepts `external_id`, which is a plain indexed attribute here (no uniqueness, no map entry; use the upsert route for that). Integration callers get strict ids.",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyAuth": []
          },
          {
            "oauth2": []
          }
        ],
        "tags": [
          "Spaces"
        ]
      }
    },
    "/workspaces/tasks": {
      "patch": {
        "summary": "Update multiple tasks",
        "operationId": "updateMultiTask",
        "x-resource-type": "service",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateMultiTaskRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Results indexed by task position in the input array",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyAuth": []
          }
        ],
        "tags": [
          "Spaces"
        ]
      },
      "delete": {
        "summary": "Delete every task in a folder",
        "description": "Deletes every task in one space with one folder. Both space_id and folder are required; an empty folder is refused rather than meaning every folder.",
        "operationId": "deleteTasksByFolder",
        "tags": [
          "Tasks"
        ],
        "x-resource-type": "service",
        "parameters": [
          {
            "name": "space_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "folder",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Request refused or invalid"
          }
        },
        "x-path-derived": true
      }
    },
    "/workspaces/task/{id}": {
      "get": {
        "summary": "Get a task by ID",
        "operationId": "getTask",
        "x-resource-type": "service",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Task",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Task"
                }
              }
            }
          },
          "401": {
            "description": "Not authenticated, or the integration token was revoked (`token_revoked`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden: `scope_denied`, or `integration_not_allowed` for an integration bearer outside workspaces.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        },
        "description": "The reply carries `version`, `external_id` and `activity_at`. Subtasks the caller cannot read are left out.",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyAuth": []
          },
          {
            "oauth2": []
          }
        ],
        "tags": [
          "Spaces"
        ]
      },
      "patch": {
        "summary": "Update a task",
        "operationId": "updateTask",
        "x-resource-type": "service",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "If-Match",
            "in": "header",
            "required": false,
            "description": "Optional task version. A mismatch returns 409 `version_conflict`; a non-integer returns 400 `bad_if_match`. `0` matches a legacy task with no version.",
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateTaskRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated task",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Task"
                }
              }
            }
          },
          "400": {
            "description": "Bad request: unreadable body, missing `id`, an invalid `If-Match`, or a task that does not exist (the service answers 400, not 404). A rejected field carries a `code`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Not authenticated, or the integration token was revoked (`token_revoked`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden: `scope_denied`, or `integration_not_allowed` for an integration bearer outside workspaces.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "description": "`version_conflict` (with `task`) or `external_id_immutable`.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/VersionConflict"
                    },
                    {
                      "$ref": "#/components/schemas/Error"
                    }
                  ]
                }
              }
            }
          }
        },
        "description": "Changed: optional `If-Match`. Compare-and-set: a lost race is re-checked up to 3 times, then 409 with the current task. Changing or clearing the `external_id` of a mapped task answers `409 external_id_immutable`. A `parent` needs `tasks:read` on the parent's space.",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyAuth": []
          },
          {
            "oauth2": []
          }
        ],
        "tags": [
          "Spaces"
        ]
      },
      "delete": {
        "summary": "Delete a task",
        "operationId": "deleteTask",
        "x-resource-type": "service",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "If-Match",
            "in": "header",
            "required": false,
            "description": "Optional task version. A mismatch returns 409 `version_conflict`; a non-integer returns 400 `bad_if_match`. `0` matches a legacy task with no version.",
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          },
          {
            "name": "delete_subtasks",
            "in": "query",
            "required": false,
            "description": "`true` also deletes subtasks.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Task deleted"
          },
          "400": {
            "description": "`bad_if_match`, or the delete failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Not authenticated, or the integration token was revoked (`token_revoked`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden: `scope_denied`, or `integration_not_allowed` for an integration bearer outside workspaces.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "description": "`version_conflict` (with `task`).",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/VersionConflict"
                    },
                    {
                      "$ref": "#/components/schemas/Error"
                    }
                  ]
                }
              }
            }
          }
        },
        "description": "Changed: optional `If-Match`. Check-then-purge, with no compare-and-set. Publishes `task-deleted` and tombstones the task's external ids. With `delete_subtasks=true`, subtasks in spaces the caller cannot write are left behind.",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyAuth": []
          },
          {
            "oauth2": []
          }
        ],
        "tags": [
          "Spaces"
        ]
      }
    },
    "/workspaces/task/{task_id}/action": {
      "put": {
        "summary": "Create or update a task checklist action",
        "description": "Upsert a checklist action on a task. There is no separate create endpoint — PUT is used for both create and update.\n\nOmit `id` to create a new action (the server assigns one); pass an existing `id` to update that action. `description` is required on every write, including updates that only change `done`.\n\nThe response echoes back the action as submitted, not the stored record — it does not reflect how a partial update merged with the existing action.\n\nA new action without a valid resource is refused with 400, and the error names the accepted resource types. Editing a stored action keeps its existing shape.",
        "operationId": "setTaskAction",
        "tags": [
          "Task Actions"
        ],
        "x-resource-type": "service",
        "parameters": [
          {
            "name": "task_id",
            "in": "path",
            "required": true,
            "description": "Task id the action hangs off.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TaskAction"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The action as submitted (echoed back, not read back from storage).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskAction"
                }
              }
            }
          },
          "400": {
            "description": "Bad request: missing description, a new action with no resource, an unknown `resource_type`, a malformed `resource_id`, a `record_config` not attached to the task's space, or a `todo` with no items.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyAuth": []
          },
          {
            "oauth2": []
          }
        ]
      },
      "get": {
        "summary": "List task checklist actions — currently unavailable",
        "description": "Intended to return the checklist actions on a task, but this endpoint is currently misrouted server-side and always responds with a 400 validation error instead of a list.\n\nUntil this is fixed, checklist actions are write-only: keep track of the `id` you get back when you create or update an action, since it cannot be listed or read back afterward.",
        "operationId": "listTaskActions",
        "deprecated": true,
        "tags": [
          "Task Actions"
        ],
        "x-resource-type": "service",
        "parameters": [
          {
            "name": "task_id",
            "in": "path",
            "required": true,
            "description": "Task id the action hangs off.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of checklist actions.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TaskAction"
                      }
                    },
                    "results_total": {
                      "type": "integer"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyAuth": []
          },
          {
            "oauth2": []
          }
        ]
      }
    },
    "/workspaces/task/{task_id}/action/{id}": {
      "delete": {
        "summary": "Delete a task checklist action",
        "description": "Removes one checklist action. Returns `{ \"message\": \"success\" }` with a 200 status.",
        "operationId": "deleteTaskAction",
        "tags": [
          "Task Actions"
        ],
        "x-resource-type": "service",
        "parameters": [
          {
            "name": "task_id",
            "in": "path",
            "required": true,
            "description": "Task id the action hangs off.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Action id (assigned by the server unless you supplied one on create).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Action deleted"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyAuth": []
          },
          {
            "oauth2": []
          }
        ]
      }
    },
    "/workspaces/task/{task_id}/comment": {
      "post": {
        "summary": "Create a comment on a task",
        "operationId": "createComment",
        "x-resource-type": "service",
        "parameters": [
          {
            "name": "task_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCommentRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Created comment",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Comment"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyAuth": []
          },
          {
            "oauth2": []
          }
        ],
        "tags": [
          "Spaces"
        ]
      }
    },
    "/workspaces/task/{task_id}/comments": {
      "get": {
        "summary": "List comments on a task",
        "operationId": "listComments",
        "x-resource-type": "service",
        "parameters": [
          {
            "name": "task_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of comments",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CommentList"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyAuth": []
          },
          {
            "oauth2": []
          }
        ],
        "tags": [
          "Spaces"
        ]
      }
    },
    "/workspaces/task/{task_id}/comment/{id}/reaction": {
      "post": {
        "summary": "Add or remove a reaction on a comment",
        "operationId": "reactToComment",
        "x-resource-type": "service",
        "parameters": [
          {
            "name": "task_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CommentReactionRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated comment",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Comment"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyAuth": []
          },
          {
            "oauth2": []
          }
        ],
        "tags": [
          "Spaces"
        ]
      }
    },
    "/workspaces/task/{task_id}/comment/{id}": {
      "get": {
        "summary": "Get a comment by ID",
        "operationId": "getComment",
        "x-resource-type": "service",
        "parameters": [
          {
            "name": "task_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Comment",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Comment"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyAuth": []
          },
          {
            "oauth2": []
          }
        ],
        "tags": [
          "Spaces"
        ]
      },
      "patch": {
        "summary": "Update a comment",
        "operationId": "updateComment",
        "x-resource-type": "service",
        "parameters": [
          {
            "name": "task_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateCommentRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated comment",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Comment"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyAuth": []
          },
          {
            "oauth2": []
          }
        ],
        "tags": [
          "Spaces"
        ]
      },
      "delete": {
        "summary": "Delete a comment",
        "operationId": "deleteComment",
        "x-resource-type": "service",
        "parameters": [
          {
            "name": "task_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Comment deleted"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyAuth": []
          },
          {
            "oauth2": []
          }
        ],
        "tags": [
          "Spaces"
        ]
      }
    },
    "/workspaces/space/{space_id}/tasks/external/{external_id}": {
      "put": {
        "summary": "Create or update a task by external id",
        "tags": [
          "Tasks"
        ],
        "description": "Idempotent. Creates (201) when the id is new in this space and namespace, otherwise updates (200). Needs `tasks:write` on the space. A deleted task's id answers 410 forever. Percent-encode the external id.",
        "parameters": [
          {
            "name": "space_id",
            "in": "path",
            "required": true,
            "description": "Space id. Case-insensitive; canonical form is upper case.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "external_id",
            "in": "path",
            "required": true,
            "description": "Caller's id, at most 256 bytes of UTF-8, any characters except `/` (`400 invalid_request`). Percent-encode it; an encoded `/` never reaches the service because the gateway decodes it before routing.",
            "schema": {
              "type": "string",
              "maxLength": 256
            }
          },
          {
            "name": "If-Match",
            "in": "header",
            "required": false,
            "description": "Optional task version. A mismatch returns 409 `version_conflict`; a non-integer returns 400 `bad_if_match`. `0` matches a legacy task with no version.",
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TaskWrite"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Task"
                }
              }
            }
          },
          "201": {
            "description": "Created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateTaskResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request. `invalid_request` for a bad `external_id` or `bad_if_match` for a non-integer `If-Match`; other failures carry no `code`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Not authenticated, or the integration token was revoked (`token_revoked`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden: `scope_denied`, or `integration_not_allowed` for an integration bearer outside workspaces.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "`version_conflict` (with `task`), `external_id_pending`, or `external_id_immutable`.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/VersionConflict"
                    },
                    {
                      "$ref": "#/components/schemas/Error"
                    }
                  ]
                }
              }
            }
          },
          "410": {
            "description": "`task_deleted`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "The integration check could not run. Retry. `code` is `storage_unavailable`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-resource-type": "service",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyAuth": []
          },
          {
            "oauth2": []
          }
        ],
        "operationId": "upsertExternalTask"
      }
    },
    "/workspaces/space/{space_id}/changes": {
      "get": {
        "summary": "Read the changes feed",
        "tags": [
          "Changes"
        ],
        "description": "Every task, comment and action write in the space, deletes included, for 30 days. The feed does not hide the caller's own writes: filter on `origin`. Needs `tasks:read`.",
        "parameters": [
          {
            "name": "space_id",
            "in": "path",
            "required": true,
            "description": "Space id. Case-insensitive; canonical form is upper case.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque; the `next_cursor` of the previous page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "1 to 500. Default 100.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500
            }
          },
          {
            "name": "since",
            "in": "query",
            "required": false,
            "description": "RFC 3339. Used only when there is no cursor.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A page.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChangesPage"
                }
              }
            }
          },
          "400": {
            "description": "`invalid_cursor`, or `invalid_request` for a bad `limit` or `since`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Not authenticated, or the integration token was revoked (`token_revoked`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden: `scope_denied`, or `integration_not_allowed` for an integration bearer outside workspaces.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "410": {
            "description": "`cursor_expired`: the cursor is older than retention. Resume from `next_cursor`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CursorExpired"
                }
              }
            }
          },
          "503": {
            "description": "A backing store is unreachable. Retry. A feed read failure carries no `code`; `storage_unavailable` is set only when the integration check could not run.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-resource-type": "service",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyAuth": []
          },
          {
            "oauth2": []
          }
        ],
        "operationId": "listSpaceChanges"
      }
    },
    "/workspaces/space/{space_id}/copy-structure": {
      "post": {
        "summary": "Copy a space's structure",
        "tags": [
          "Sandbox"
        ],
        "description": "Creates a space with the source's default status, statuses, priorities, tags and folders. Not tasks, description, record configs or bindings. People only: integration tokens are refused. `staging: true` needs an account root or admin.",
        "parameters": [
          {
            "name": "space_id",
            "in": "path",
            "required": true,
            "description": "Space id. Case-insensitive; canonical form is upper case.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CopyStructureRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The new space.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Space"
                }
              }
            }
          },
          "400": {
            "description": "Bad request: `name` or `space_id` missing, or an unreadable body. No `code`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Not authenticated, or the integration token was revoked (`token_revoked`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden: `scope_denied`, `integration_not_allowed` for an integration bearer outside workspaces, the new id is a system Space id, or `staging: true` was sent by a caller who is not root or admin.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "`space_not_found`: the source does not exist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "`space exists`: a Space with the new id already exists.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "The space was created but not every folder was copied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "The source space could not be read. Retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-resource-type": "service",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyAuth": []
          }
        ],
        "operationId": "copySpaceStructure"
      }
    },
    "/workspaces/space/{space_id}/reset": {
      "post": {
        "summary": "Reset a staging space",
        "tags": [
          "Sandbox"
        ],
        "description": "Account root or admin only. Deletes up to 2000 live and archived tasks per call through the normal delete path (events are published, external ids tombstoned). Call again until `remaining` is 0.",
        "parameters": [
          {
            "name": "space_id",
            "in": "path",
            "required": true,
            "description": "Space id. Case-insensitive; canonical form is upper case.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Progress.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SpaceResetResponse"
                }
              }
            }
          },
          "401": {
            "description": "Not authenticated, or the integration token was revoked (`token_revoked`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden: `scope_denied`, or `integration_not_allowed` for an integration bearer outside workspaces.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "`space_not_found`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "`space_not_staging` or `space_bound`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "The task list could not be read.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "The space could not be read. Retry. No `code`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-resource-type": "service",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyAuth": []
          }
        ],
        "operationId": "resetSpace"
      }
    },
    "/workspaces/task/{task_id}/time-log": {
      "get": {
        "summary": "List a task's time logs",
        "operationId": "listTimeLogs",
        "x-resource-type": "service",
        "parameters": [
          {
            "name": "task_id",
            "in": "path",
            "required": true,
            "description": "Task id, such as `OPS-7`.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Time logs",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimeLogList"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyAuth": []
          },
          {
            "oauth2": []
          }
        ],
        "tags": [
          "Spaces"
        ]
      },
      "put": {
        "summary": "Log time against a task",
        "description": "Logs one entry per call. The server sets the id, the user and `created_at`, and ignores any value you send for them. There is no route to edit or delete a log: log a correcting entry instead. Returns the task's whole `time_tracking`.",
        "operationId": "addTimeLog",
        "x-resource-type": "service",
        "parameters": [
          {
            "name": "task_id",
            "in": "path",
            "required": true,
            "description": "Task id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TimeLog"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The task's time tracking, with totals",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimeTracking"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyAuth": []
          },
          {
            "oauth2": []
          }
        ],
        "tags": [
          "Spaces"
        ]
      }
    },
    "/workspaces/task-templates": {
      "get": {
        "summary": "List task templates",
        "operationId": "listTaskTemplates",
        "x-resource-type": "service",
        "parameters": [
          {
            "name": "vertical",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Task templates",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskTemplateList"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyAuth": []
          }
        ],
        "tags": [
          "Spaces"
        ]
      }
    },
    "/workspaces/task-template": {
      "post": {
        "summary": "Create a task template",
        "description": "Seeds priority, tags, folder, reporter, assignees, estimate and actions onto a task made from it. It never seeds status or due date.",
        "operationId": "createTaskTemplate",
        "x-resource-type": "service",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TaskTemplate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskTemplate"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyAuth": []
          }
        ],
        "tags": [
          "Spaces"
        ]
      }
    },
    "/workspaces/task-template/{id}": {
      "get": {
        "summary": "Get a task template",
        "operationId": "getTaskTemplate",
        "x-resource-type": "service",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Template id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Template",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskTemplate"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyAuth": []
          }
        ],
        "tags": [
          "Spaces"
        ]
      },
      "patch": {
        "summary": "Update a task template",
        "description": "Tags, assignees and actions replace the stored list when sent.",
        "operationId": "updateTaskTemplate",
        "x-resource-type": "service",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Template id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateTaskTemplateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskTemplate"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyAuth": []
          }
        ],
        "tags": [
          "Spaces"
        ]
      },
      "delete": {
        "summary": "Delete a task template",
        "operationId": "deleteTaskTemplate",
        "x-resource-type": "service",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Template id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyAuth": []
          }
        ],
        "tags": [
          "Spaces"
        ]
      }
    },
    "/workspaces/client": {
      "post": {
        "summary": "Create a contact",
        "description": "Creates a contact in a Space: a record keyed on the Space's base record identity fields, plus a contact folder. An existing folder returns 409. If the Space's base record is set to create sign-ins, a client-role user may also be created for the contact's email; the response says `login_created` or `login_skipped`.",
        "operationId": "createContact",
        "x-resource-type": "service",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateContactRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The created contact record, with `login_created` and, when no sign-in was made, `login_skipped`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "properties": {
                    "login_created": {
                      "type": "boolean"
                    },
                    "login_skipped": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "description": "`space_id` does not name an existing Space.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyAuth": []
          }
        ],
        "tags": [
          "Spaces"
        ]
      }
    },
    "/workspaces/meetings": {
      "get": {
        "summary": "List meeting files in a Space",
        "description": "One entry per file: video, audio, transcript or summary. An empty list can also mean the meetings index did not answer.",
        "operationId": "listMeetings",
        "x-resource-type": "service",
        "parameters": [
          {
            "name": "space_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "file_type",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "video",
                "audio",
                "transcript",
                "summary"
              ]
            }
          },
          {
            "name": "recording_id",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "folder",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Meeting files",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MeetingFileList"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyAuth": []
          }
        ],
        "tags": [
          "Spaces"
        ]
      }
    },
    "/workspaces/entity/{entity_type}/{entity_id}/comments": {
      "get": {
        "summary": "List entity comments",
        "description": "Comments on an entity such as a record. Private comments belong to the caller's account; pass `visibility=shared` with `counterparty_account_id` to read the thread shared with a connected account.",
        "operationId": "listEntityComments",
        "tags": [
          "Entity Comments"
        ],
        "parameters": [
          {
            "name": "entity_type",
            "in": "path",
            "required": true,
            "description": "Entity type, letters, digits, `_` or `-`.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "entity_id",
            "in": "path",
            "required": true,
            "description": "Entity id, same character set.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "visibility",
            "in": "query",
            "required": false,
            "description": "`private` (this account only, default) or `shared` (with the connected account).",
            "schema": {
              "type": "string",
              "enum": [
                "private",
                "shared"
              ]
            }
          },
          {
            "name": "counterparty_account_id",
            "in": "query",
            "required": false,
            "description": "Required to find a shared comment.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "target_type",
            "in": "query",
            "required": false,
            "description": "Only comments about this part of the entity.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "target_id",
            "in": "query",
            "required": false,
            "description": "With `target_type`.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Comments",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EntityCommentList"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        },
        "x-resource-type": "service",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyAuth": []
          }
        ]
      }
    },
    "/workspaces/entity/{entity_type}/{entity_id}/comment": {
      "post": {
        "summary": "Create an entity comment",
        "operationId": "createEntityComment",
        "tags": [
          "Entity Comments"
        ],
        "parameters": [
          {
            "name": "entity_type",
            "in": "path",
            "required": true,
            "description": "Entity type, letters, digits, `_` or `-`.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "entity_id",
            "in": "path",
            "required": true,
            "description": "Entity id, same character set.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateEntityCommentRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The comment",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EntityComment"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "403": {
            "description": "Forbidden, or the distribution is suspended and shared comments are read only (`code` is set for the latter).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        },
        "x-resource-type": "service",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyAuth": []
          }
        ]
      }
    },
    "/workspaces/entity/{entity_type}/{entity_id}/comment/{id}": {
      "get": {
        "summary": "Get an entity comment",
        "operationId": "getEntityComment",
        "tags": [
          "Entity Comments"
        ],
        "parameters": [
          {
            "name": "entity_type",
            "in": "path",
            "required": true,
            "description": "Entity type, letters, digits, `_` or `-`.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "entity_id",
            "in": "path",
            "required": true,
            "description": "Entity id, same character set.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Comment id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "visibility",
            "in": "query",
            "required": false,
            "description": "`private` (this account only, default) or `shared` (with the connected account).",
            "schema": {
              "type": "string",
              "enum": [
                "private",
                "shared"
              ]
            }
          },
          {
            "name": "counterparty_account_id",
            "in": "query",
            "required": false,
            "description": "Required to find a shared comment.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The comment",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EntityComment"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        },
        "x-resource-type": "service",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyAuth": []
          }
        ]
      },
      "patch": {
        "summary": "Update an entity comment",
        "description": "Only the comment's author can change it.",
        "operationId": "updateEntityComment",
        "tags": [
          "Entity Comments"
        ],
        "parameters": [
          {
            "name": "entity_type",
            "in": "path",
            "required": true,
            "description": "Entity type, letters, digits, `_` or `-`.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "entity_id",
            "in": "path",
            "required": true,
            "description": "Entity id, same character set.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Comment id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "visibility",
            "in": "query",
            "required": false,
            "description": "`private` (this account only, default) or `shared` (with the connected account).",
            "schema": {
              "type": "string",
              "enum": [
                "private",
                "shared"
              ]
            }
          },
          {
            "name": "counterparty_account_id",
            "in": "query",
            "required": false,
            "description": "Required to find a shared comment.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateEntityCommentRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The comment",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EntityComment"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        },
        "x-resource-type": "service",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyAuth": []
          }
        ]
      },
      "delete": {
        "summary": "Delete an entity comment",
        "operationId": "deleteEntityComment",
        "tags": [
          "Entity Comments"
        ],
        "parameters": [
          {
            "name": "entity_type",
            "in": "path",
            "required": true,
            "description": "Entity type, letters, digits, `_` or `-`.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "entity_id",
            "in": "path",
            "required": true,
            "description": "Entity id, same character set.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Comment id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "visibility",
            "in": "query",
            "required": false,
            "description": "`private` (this account only, default) or `shared` (with the connected account).",
            "schema": {
              "type": "string",
              "enum": [
                "private",
                "shared"
              ]
            }
          },
          {
            "name": "counterparty_account_id",
            "in": "query",
            "required": false,
            "description": "Required to find a shared comment.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        },
        "x-resource-type": "service",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyAuth": []
          }
        ]
      }
    },
    "/workspaces/entity/{entity_type}/{entity_id}/comment/{id}/reaction": {
      "post": {
        "summary": "Add or remove a reaction on an entity comment",
        "operationId": "reactToEntityComment",
        "tags": [
          "Entity Comments"
        ],
        "parameters": [
          {
            "name": "entity_type",
            "in": "path",
            "required": true,
            "description": "Entity type, letters, digits, `_` or `-`.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "entity_id",
            "in": "path",
            "required": true,
            "description": "Entity id, same character set.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Comment id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "visibility",
            "in": "query",
            "required": false,
            "description": "`private` (this account only, default) or `shared` (with the connected account).",
            "schema": {
              "type": "string",
              "enum": [
                "private",
                "shared"
              ]
            }
          },
          {
            "name": "counterparty_account_id",
            "in": "query",
            "required": false,
            "description": "Required to find a shared comment.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CommentReactionRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated reactions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "reactions": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        },
        "x-resource-type": "service",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyAuth": []
          }
        ]
      }
    },
    "/workspaces/entity/{entity_type}/{entity_id}/comment/{id}/attachment": {
      "get": {
        "summary": "Download an entity comment attachment",
        "operationId": "getEntityCommentAttachment",
        "tags": [
          "Entity Comments"
        ],
        "parameters": [
          {
            "name": "entity_type",
            "in": "path",
            "required": true,
            "description": "Entity type, letters, digits, `_` or `-`.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "entity_id",
            "in": "path",
            "required": true,
            "description": "Entity id, same character set.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Comment id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "visibility",
            "in": "query",
            "required": false,
            "description": "`private` (this account only, default) or `shared` (with the connected account).",
            "schema": {
              "type": "string",
              "enum": [
                "private",
                "shared"
              ]
            }
          },
          {
            "name": "counterparty_account_id",
            "in": "query",
            "required": false,
            "description": "Required to find a shared comment.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "attachment",
            "in": "query",
            "required": true,
            "description": "The attachment to read, as listed on the comment.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The file, base64 encoded",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "encoding": {
                      "type": "string"
                    },
                    "size": {
                      "type": "integer"
                    },
                    "value": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        },
        "x-resource-type": "service",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyAuth": []
          }
        ]
      }
    },
    "/workspaces/task/{task_id}/relations": {
      "get": {
        "summary": "List related tasks",
        "operationId": "listTaskRelations",
        "tags": [
          "Task Relations"
        ],
        "parameters": [
          {
            "name": "task_id",
            "in": "path",
            "required": true,
            "description": "Task id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Related tasks",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskRelationList"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        },
        "x-resource-type": "service",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyAuth": []
          }
        ]
      }
    },
    "/workspaces/task-relation": {
      "put": {
        "summary": "Link two tasks",
        "description": "Links both sides. Linking a pair again replaces its type. The task's space must have related tasks switched on, and a task can have at most 50 links.",
        "operationId": "linkTasks",
        "tags": [
          "Task Relations"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "task_id",
                  "related_task_id",
                  "type"
                ],
                "properties": {
                  "task_id": {
                    "type": "string"
                  },
                  "related_task_id": {
                    "type": "string"
                  },
                  "type": {
                    "$ref": "#/components/schemas/TaskRelationType"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The task's links after the change",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskRelationList"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "403": {
            "description": "Related tasks are off in the space.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        },
        "x-resource-type": "service",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyAuth": []
          }
        ]
      }
    },
    "/workspaces/task/{task_id}/relation/{related_task_id}": {
      "delete": {
        "summary": "Unlink two tasks",
        "description": "Removes the link from both sides, whichever side asks.",
        "operationId": "unlinkTasks",
        "tags": [
          "Task Relations"
        ],
        "parameters": [
          {
            "name": "task_id",
            "in": "path",
            "required": true,
            "description": "Task id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "related_task_id",
            "in": "path",
            "required": true,
            "description": "The linked task.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The task's links after the change",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskRelationList"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        },
        "x-resource-type": "service",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyAuth": []
          }
        ]
      }
    },
    "/workspaces/space-collections": {
      "get": {
        "summary": "List space collections",
        "description": "The caller's own groups for the spaces sidebar. A user who has saved none gets computed defaults (`is_default: true`).",
        "operationId": "listSpaceCollections",
        "tags": [
          "Space Collections"
        ],
        "responses": {
          "200": {
            "description": "The user's collections",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SpaceCollectionsResponse"
                }
              }
            }
          }
        },
        "x-resource-type": "service",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyAuth": []
          }
        ]
      }
    },
    "/workspaces/space-collection": {
      "post": {
        "summary": "Create a space collection",
        "description": "At most 50 collections per user.",
        "operationId": "createSpaceCollection",
        "tags": [
          "Space Collections"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SpaceCollection"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The user's collections",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SpaceCollectionsResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        },
        "x-resource-type": "service",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyAuth": []
          }
        ]
      }
    },
    "/workspaces/space-collection/{id}": {
      "patch": {
        "summary": "Update a space collection",
        "description": "Only the fields sent change; `space_ids` replaces the whole list.",
        "operationId": "updateSpaceCollection",
        "tags": [
          "Space Collections"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Collection id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SpaceCollection"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The user's collections",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SpaceCollectionsResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        },
        "x-resource-type": "service",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyAuth": []
          }
        ]
      },
      "delete": {
        "summary": "Delete a space collection",
        "description": "Its spaces move to the catch-all collection.",
        "operationId": "deleteSpaceCollection",
        "tags": [
          "Space Collections"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Collection id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The user's collections",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SpaceCollectionsResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        },
        "x-resource-type": "service",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyAuth": []
          }
        ]
      }
    },
    "/workspaces/space-collections-order": {
      "put": {
        "summary": "Reorder space collections",
        "operationId": "setSpaceCollectionsOrder",
        "tags": [
          "Space Collections"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "collection_ids"
                ],
                "properties": {
                  "collection_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The user's collections",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SpaceCollectionsResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          }
        },
        "x-resource-type": "service",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyAuth": []
          }
        ]
      }
    },
    "/workspaces/folder-name": {
      "patch": {
        "summary": "Rename a folder",
        "description": "Sets the folder's display label; its key and path do not change. An empty `display_name` clears the label. Names are unique among siblings, ignoring case.",
        "operationId": "renameFolder",
        "tags": [
          "Folders"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "space_id",
                  "folder",
                  "display_name"
                ],
                "properties": {
                  "space_id": {
                    "type": "string"
                  },
                  "folder": {
                    "type": "string",
                    "description": "Space-relative dot path, for example `Projects.Alpha`."
                  },
                  "display_name": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "What was stored",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "space_id": {
                      "type": "string"
                    },
                    "folder": {
                      "type": "string"
                    },
                    "display_name": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "403": {
            "description": "The space root or a Microsoft 365 managed folder cannot be renamed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "description": "A sibling already uses the name.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-resource-type": "service",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyAuth": []
          }
        ]
      }
    },
    "/workspaces/resolve-folder": {
      "get": {
        "summary": "Resolve a folder display path",
        "description": "Walks a display path, with `/` or `.` between segments, to the key path it names. Creates nothing. A label wins over a raw key segment.",
        "operationId": "resolveFolder",
        "tags": [
          "Folders"
        ],
        "parameters": [
          {
            "name": "space_id",
            "in": "query",
            "required": true,
            "description": "Space id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "path",
            "in": "query",
            "required": true,
            "description": "Display path.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The resolved path",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "space_id": {
                      "type": "string"
                    },
                    "folder": {
                      "type": "string",
                      "description": "Space-relative dot path of the segments that matched."
                    },
                    "resolved": {
                      "type": "boolean"
                    },
                    "missing_from": {
                      "type": "integer",
                      "description": "Index of the first segment that did not match. Present only when `resolved` is false."
                    },
                    "key_path": {
                      "type": "string"
                    },
                    "labels": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "description": "Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        },
        "x-resource-type": "service",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyAuth": []
          }
        ]
      }
    },
    "/workspaces/case-folder": {
      "post": {
        "summary": "File a case under its client folder",
        "description": "Finds or creates the space's base-record entity folder, then opens a case folder under it. Safe to repeat: an existing case marker is never rewritten. Client users get 403.",
        "operationId": "createCaseFolder",
        "tags": [
          "Folders"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "space_id",
                  "case_key",
                  "case_config_id"
                ],
                "properties": {
                  "space_id": {
                    "type": "string"
                  },
                  "entity_folder": {
                    "type": "string",
                    "description": "File under this existing client folder instead of resolving identity."
                  },
                  "identity": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "string"
                    }
                  },
                  "name": {
                    "type": "string"
                  },
                  "email": {
                    "type": "string"
                  },
                  "display": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "string"
                    },
                    "description": "Values for the base record's display fields, written only when this call creates the entity."
                  },
                  "address": {
                    "description": "Text or an object, as the base record's address field takes it."
                  },
                  "case_key": {
                    "type": "object",
                    "required": [
                      "field",
                      "value"
                    ],
                    "properties": {
                      "field": {
                        "type": "string"
                      },
                      "value": {
                        "type": "string"
                      }
                    }
                  },
                  "case_config_id": {
                    "type": "string"
                  },
                  "primary_config": {
                    "type": "string"
                  },
                  "primary_record_id": {
                    "type": "string"
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "string"
                    },
                    "description": "At most 20 entries, values up to 512 characters. Reserved marker keys are ignored."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Folder tokens, not paths",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "entity_folder": {
                      "type": "string"
                    },
                    "case_folder": {
                      "type": "string"
                    },
                    "created_entity": {
                      "type": "boolean"
                    },
                    "created_case": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "description": "The case is already being filed (`code` is `case_being_filed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-resource-type": "service",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyAuth": []
          }
        ]
      }
    },
    "/workspaces/task-from-template": {
      "post": {
        "summary": "Create a task from a template",
        "description": "Creates a task from a stored task template.",
        "operationId": "createTaskFromTemplate",
        "tags": [
          "Tasks"
        ],
        "x-resource-type": "service",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Request refused or invalid"
          }
        },
        "x-path-derived": true
      }
    },
    "/workspaces/task/{task_id}/watch": {
      "post": {
        "summary": "Watch a task",
        "description": "Adds the caller to the task's watchers.",
        "operationId": "watchTask",
        "tags": [
          "Tasks"
        ],
        "x-resource-type": "service",
        "parameters": [
          {
            "name": "task_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Request refused or invalid"
          }
        }
      },
      "delete": {
        "summary": "Stop watching a task",
        "description": "Removes the caller from the task's watchers.",
        "operationId": "unwatchTask",
        "tags": [
          "Tasks"
        ],
        "x-resource-type": "service",
        "parameters": [
          {
            "name": "task_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Request refused or invalid"
          }
        }
      }
    },
    "/workspaces/task/{task_id}/mute": {
      "post": {
        "summary": "Mute a task",
        "description": "Silences notifications about the task for the caller.",
        "operationId": "muteTask",
        "tags": [
          "Tasks"
        ],
        "x-resource-type": "service",
        "parameters": [
          {
            "name": "task_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Request refused or invalid"
          }
        }
      },
      "delete": {
        "summary": "Unmute a task",
        "description": "Restores notifications about the task for the caller.",
        "operationId": "unmuteTask",
        "tags": [
          "Tasks"
        ],
        "x-resource-type": "service",
        "parameters": [
          {
            "name": "task_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Request refused or invalid"
          }
        }
      }
    },
    "/workspaces/tasks/my-tasks": {
      "get": {
        "summary": "List my tasks",
        "description": "Every non-archived task across all spaces assigned to the caller. dated=true (default) keeps tasks with a due date or scheduled time, dated=false only those with neither, dated=any everything. With `indexed=true`, `dated`, `status` and `with_no_status` are index conditions and the reply carries `total_hits`.",
        "operationId": "listMyTasks",
        "tags": [
          "Tasks"
        ],
        "x-resource-type": "service",
        "parameters": [
          {
            "name": "dated",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort_by",
            "in": "query",
            "required": false,
            "description": "Defaults to `created_at`.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort_order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ],
              "default": "asc"
            }
          },
          {
            "name": "indexed",
            "in": "query",
            "required": false,
            "description": "`true` filters `dated` and `status` in the index.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "With `indexed=true`: comma-separated statuses.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "with_no_status",
            "in": "query",
            "required": false,
            "description": "With `indexed=true`: adds tasks with no status.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Request refused or invalid"
          }
        }
      }
    },
    "/workspaces/client/tasks": {
      "get": {
        "summary": "List a client's tasks",
        "description": "Lists the tasks visible to a client user.",
        "operationId": "listClientTasks",
        "tags": [
          "Tasks"
        ],
        "x-resource-type": "service",
        "parameters": [
          {
            "name": "space_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Request refused or invalid"
          }
        }
      }
    },
    "/workspaces/task/{task_id}/change-log": {
      "get": {
        "summary": "Get a task's change log",
        "description": "Reads the recorded changes to one task.",
        "operationId": "getTaskChangeLog",
        "tags": [
          "Tasks"
        ],
        "x-resource-type": "service",
        "parameters": [
          {
            "name": "task_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Request refused or invalid"
          }
        }
      }
    },
    "/workspaces/space/{space_id}/export-tasks": {
      "get": {
        "summary": "Export a space's tasks",
        "description": "Exports the space's tasks matching the list filters.",
        "operationId": "exportTasks",
        "tags": [
          "Tasks"
        ],
        "x-resource-type": "service",
        "parameters": [
          {
            "name": "space_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Request refused or invalid"
          }
        }
      }
    },
    "/workspaces/task/{task_id}/scheduled-events": {
      "get": {
        "summary": "List a task's scheduled events",
        "description": "Lists the scheduled events on one task.",
        "operationId": "listTaskScheduledEvents",
        "tags": [
          "Task Schedules"
        ],
        "x-resource-type": "service",
        "parameters": [
          {
            "name": "task_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "space_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Request refused or invalid"
          }
        }
      },
      "post": {
        "summary": "Schedule a task event",
        "description": "Arms a one-off or recurring event on a task. A recurring schedule armed by a root-substituted request must carry trigger_end.",
        "operationId": "scheduleTaskEvent",
        "tags": [
          "Task Schedules"
        ],
        "x-resource-type": "service",
        "parameters": [
          {
            "name": "task_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Request refused or invalid"
          }
        }
      }
    },
    "/workspaces/task/scheduled-events": {
      "get": {
        "summary": "List scheduled events in a space",
        "description": "Lists the scheduled task events in a space.",
        "operationId": "listScheduledTaskEvents",
        "tags": [
          "Task Schedules"
        ],
        "x-resource-type": "service",
        "parameters": [
          {
            "name": "space_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Request refused or invalid"
          }
        }
      }
    },
    "/workspaces/task/{task_id}/scheduled-events/{id}": {
      "put": {
        "summary": "Update a scheduled task event",
        "description": "Replaces a scheduled event's schedule.",
        "operationId": "updateScheduledTaskEvent",
        "tags": [
          "Task Schedules"
        ],
        "x-resource-type": "service",
        "parameters": [
          {
            "name": "task_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Request refused or invalid"
          }
        }
      },
      "delete": {
        "summary": "Cancel a scheduled task event",
        "description": "Removes a scheduled event from the task.",
        "operationId": "unscheduleTaskEvent",
        "tags": [
          "Task Schedules"
        ],
        "x-resource-type": "service",
        "parameters": [
          {
            "name": "task_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Request refused or invalid"
          }
        }
      }
    },
    "/workspaces/task/{task_id}/scheduled-events/{id}/read": {
      "post": {
        "summary": "Mark a task event notification read",
        "description": "Marks the notification a scheduled event raised as read.",
        "operationId": "markTaskEventNotificationRead",
        "tags": [
          "Task Schedules"
        ],
        "x-resource-type": "service",
        "parameters": [
          {
            "name": "task_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "space_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Request refused or invalid"
          }
        },
        "x-path-derived": true
      }
    },
    "/workspaces/files": {
      "get": {
        "summary": "List a space's files",
        "description": "Lists files and folder markers in a space, one level at a time.",
        "operationId": "listFiles",
        "tags": [
          "Files"
        ],
        "x-resource-type": "service",
        "parameters": [
          {
            "name": "space_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "subfolder",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "exact",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "only_folder",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Request refused or invalid"
          }
        }
      },
      "delete": {
        "summary": "Delete a file",
        "description": "Moves one file to the workspaces trash. path is the space-relative object path.",
        "operationId": "deleteFile",
        "tags": [
          "Files"
        ],
        "x-resource-type": "service",
        "parameters": [
          {
            "name": "space_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "path",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Request refused or invalid"
          }
        }
      }
    },
    "/workspaces/files/trash": {
      "get": {
        "summary": "List trashed files",
        "description": "Lists files in the workspaces trash.",
        "operationId": "listTrashFiles",
        "tags": [
          "Files"
        ],
        "x-resource-type": "service",
        "parameters": [
          {
            "name": "space_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Request refused or invalid"
          }
        }
      }
    },
    "/workspaces/files/restore": {
      "post": {
        "summary": "Restore from trash",
        "description": "Restores trashed entries under a prefix.",
        "operationId": "restoreFromTrash",
        "tags": [
          "Files"
        ],
        "x-resource-type": "service",
        "parameters": [
          {
            "name": "prefix",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Request refused or invalid"
          }
        }
      }
    },
    "/workspaces/file/{name}/metadata": {
      "patch": {
        "summary": "Update a file's metadata",
        "description": "Updates the metadata of one file.",
        "operationId": "updateFileMetadata",
        "tags": [
          "Files"
        ],
        "x-resource-type": "service",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Request refused or invalid"
          }
        }
      }
    },
    "/workspaces/files/versions": {
      "get": {
        "summary": "List a file's versions",
        "description": "Lists saved versions of a file, newest first.",
        "operationId": "listFileVersions",
        "tags": [
          "Files"
        ],
        "x-resource-type": "service",
        "parameters": [
          {
            "name": "space_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "path",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Request refused or invalid"
          }
        }
      }
    },
    "/workspaces/files/version": {
      "get": {
        "summary": "Get one file version",
        "description": "Reads one saved version of a file.",
        "operationId": "getFileVersion",
        "tags": [
          "Files"
        ],
        "x-resource-type": "service",
        "parameters": [
          {
            "name": "space_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "path",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sequence",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Request refused or invalid"
          }
        }
      }
    },
    "/workspaces/files/version/restore": {
      "post": {
        "summary": "Restore a file version",
        "description": "Restores a saved version as the file's current content.",
        "operationId": "restoreFileVersion",
        "tags": [
          "Files"
        ],
        "x-resource-type": "service",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Request refused or invalid"
          }
        }
      }
    },
    "/workspaces/save-session-file": {
      "post": {
        "summary": "Save a chat-session file to a space",
        "description": "Copies a work or outputs file from an assistant session into a space folder.",
        "operationId": "saveSessionFile",
        "tags": [
          "Files"
        ],
        "x-resource-type": "service",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "session_id": {
                    "type": "string"
                  },
                  "key": {
                    "type": "string"
                  },
                  "space_id": {
                    "type": "string"
                  },
                  "path": {
                    "type": "string"
                  }
                },
                "required": [
                  "session_id",
                  "key",
                  "space_id",
                  "path"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Request refused or invalid"
          }
        }
      }
    },
    "/workspaces/files/folder": {
      "post": {
        "summary": "Create a folder",
        "description": "Creates a folder in a space.",
        "operationId": "createFolder",
        "tags": [
          "Folders"
        ],
        "x-resource-type": "service",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Request refused or invalid"
          }
        }
      },
      "delete": {
        "summary": "Delete a folder",
        "description": "Moves a folder and its contents to the trash.",
        "operationId": "deleteFolder",
        "tags": [
          "Folders"
        ],
        "x-resource-type": "service",
        "parameters": [
          {
            "name": "space_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "folder",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "subfolder",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Request refused or invalid"
          }
        }
      }
    },
    "/workspaces/distribution-binding": {
      "post": {
        "summary": "Bind a distribution",
        "description": "Writes one distribution binding by distribution_id. Role-gated.",
        "operationId": "upsertDistributionBinding",
        "tags": [
          "Distribution"
        ],
        "x-resource-type": "service",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Request refused or invalid"
          }
        }
      },
      "delete": {
        "summary": "Remove a distribution binding",
        "description": "Removes one binding. Absent is not an error.",
        "operationId": "deleteDistributionBinding",
        "tags": [
          "Distribution"
        ],
        "x-resource-type": "service",
        "parameters": [
          {
            "name": "distribution_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Request refused or invalid"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "SpaceStatus": {
        "type": "object",
        "required": [
          "id",
          "name"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string",
            "description": "e.g. To Do, In Progress, Done"
          },
          "color": {
            "type": "string"
          },
          "order": {
            "type": "integer"
          },
          "is_visible": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "complete": {
            "type": "boolean",
            "description": "If true, when a task reaches this state, it will not be considered overdue past the due date.",
            "example": true
          },
          "role": {
            "type": "string",
            "description": "What the status means, such as `intake`, `acknowledged`, `working` or `done`. Used to map statuses between connected accounts."
          }
        }
      },
      "CreateSpaceRequest": {
        "type": "object",
        "required": [
          "id",
          "name"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier for the space. Tasks belonging to the space receive IDs prefixed with this value. Must consist of letters, numbers, and underscores only."
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "default_status": {
            "type": "string"
          },
          "statuses": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SpaceStatus"
            }
          },
          "record_config_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "default_record_config_id": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "staging": {
            "type": "boolean",
            "description": "Marks a Space for testing so it can be reset. Only root and admin users can set it."
          }
        }
      },
      "UpdateSpaceRequest": {
        "type": "object",
        "description": "Fields are merged over the stored space — send only what you are changing. The space id comes from the path, not the body.",
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "default_status": {
            "type": "string"
          },
          "statuses": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SpaceStatus"
            }
          },
          "record_config_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "default_record_config_id": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "priorities": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "default": {
                  "type": "boolean"
                }
              }
            },
            "description": "Task priority definitions. Removing a priority that tasks still reference queues a background re-assignment onto the fallback priority (the default, or the first), and the update returns 202 instead of 200."
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "color": {
                  "type": "string"
                }
              }
            },
            "description": "Space-level tag definitions."
          },
          "logo": {
            "type": "boolean",
            "description": "Whether the space has a logo set."
          },
          "default_view": {
            "type": "string",
            "description": "Default board/list view for the space."
          },
          "staging": {
            "type": "boolean",
            "description": "Marks a Space for testing so it can be reset. Only root and admin users can set it."
          },
          "related_tasks": {
            "type": "boolean",
            "description": "Shows the Related tickets section on tasks in this space and lets them link to others."
          },
          "allow_linking": {
            "type": "boolean",
            "description": "Opens the space to links with other accounts."
          },
          "task_automations": {
            "type": "array",
            "description": "Rules that act on tasks left in given statuses for a number of days.",
            "items": {
              "type": "object",
              "required": [
                "id",
                "statuses",
                "after_days",
                "action"
              ],
              "properties": {
                "id": {
                  "type": "string"
                },
                "enabled": {
                  "type": "boolean"
                },
                "statuses": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "after_days": {
                  "type": "integer"
                },
                "action": {
                  "type": "object",
                  "required": [
                    "type"
                  ],
                  "properties": {
                    "type": {
                      "type": "string"
                    }
                  },
                  "additionalProperties": true
                },
                "run_as_user_id": {
                  "type": "string",
                  "readOnly": true,
                  "description": "Stamped by the server from the session of whoever last changed the rule."
                }
              }
            }
          },
          "view": {
            "type": "object",
            "additionalProperties": true,
            "description": "Presentation settings: `tasks`, `records` (including `saved_views`), `front_page` (including `layouts`), `dashboard`, `entities`, `assistant_skills`."
          },
          "base_record": {
            "type": "object",
            "additionalProperties": true,
            "description": "The record config and identity fields that define the space's client or organisation entity."
          },
          "hidden_tabs": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Built-in tabs the space does not offer."
          },
          "assigned_qa_users": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Users offered as a task's `assigned_qa`. Empty hides the field."
          },
          "task_export_fields": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "key"
              ],
              "properties": {
                "key": {
                  "type": "string"
                },
                "label": {
                  "type": "string"
                }
              }
            },
            "description": "Columns of a task export, in order."
          },
          "custom_tab": {
            "type": "object",
            "additionalProperties": true,
            "description": "The space's own tab of buttons."
          }
        }
      },
      "Space": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "readOnly": true
          },
          "url": {
            "type": "string",
            "readOnly": true,
            "description": "UI URL to navigate directly to this space"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "default_status": {
            "type": "string"
          },
          "statuses": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SpaceStatus"
            }
          },
          "owner": {
            "type": "string",
            "readOnly": true,
            "description": "ID of the user who created the space, set by the backend"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "record_config_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "default_record_config_id": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "priorities": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          },
          "staging": {
            "type": "boolean",
            "description": "Marks a space for testing. Only root and admin users can set it. Staging spaces can be reset."
          },
          "distribution_bindings": {
            "type": "array",
            "readOnly": true,
            "description": "Connections to other accounts. Present on a space connected through distribution.",
            "items": {
              "type": "object",
              "additionalProperties": true,
              "properties": {
                "distribution_id": {
                  "type": "string"
                },
                "product_id": {
                  "type": "string"
                },
                "side": {
                  "type": "string",
                  "enum": [
                    "publisher",
                    "distributor"
                  ]
                },
                "counterparty_account_id": {
                  "type": "string"
                },
                "counterparty_name": {
                  "type": "string"
                },
                "folder": {
                  "type": "string"
                },
                "required_roles": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "status_map": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  }
                },
                "bound_at": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            }
          },
          "related_tasks": {
            "type": "boolean",
            "description": "Shows the Related tickets section on tasks in this space and lets them link to others."
          },
          "allow_linking": {
            "type": "boolean",
            "description": "Opens the space to links with other accounts."
          },
          "task_automations": {
            "type": "array",
            "description": "Rules that act on tasks left in given statuses for a number of days.",
            "items": {
              "type": "object",
              "required": [
                "id",
                "statuses",
                "after_days",
                "action"
              ],
              "properties": {
                "id": {
                  "type": "string"
                },
                "enabled": {
                  "type": "boolean"
                },
                "statuses": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "after_days": {
                  "type": "integer"
                },
                "action": {
                  "type": "object",
                  "required": [
                    "type"
                  ],
                  "properties": {
                    "type": {
                      "type": "string"
                    }
                  },
                  "additionalProperties": true
                },
                "run_as_user_id": {
                  "type": "string",
                  "readOnly": true,
                  "description": "Stamped by the server from the session of whoever last changed the rule."
                }
              }
            }
          },
          "view": {
            "type": "object",
            "additionalProperties": true,
            "description": "Presentation settings: `tasks`, `records` (including `saved_views`), `front_page` (including `layouts`), `dashboard`, `entities`, `assistant_skills`."
          },
          "base_record": {
            "type": "object",
            "additionalProperties": true,
            "description": "The record config and identity fields that define the space's client or organisation entity."
          },
          "custom_tab": {
            "type": "object",
            "additionalProperties": true,
            "description": "The space's own tab of buttons."
          },
          "hidden_tabs": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Built-in tabs the space does not offer."
          },
          "assigned_qa_users": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Users offered as a task's `assigned_qa`. Empty hides the field."
          },
          "task_export_fields": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "key"
              ],
              "properties": {
                "key": {
                  "type": "string"
                },
                "label": {
                  "type": "string"
                }
              }
            },
            "description": "Columns of a task export, in order."
          },
          "logo_key": {
            "type": "string",
            "readOnly": true,
            "description": "Key of a logo in the public profile-images bucket, set when the space was built from a template. Create-only."
          },
          "template": {
            "type": "object",
            "additionalProperties": true,
            "readOnly": true,
            "description": "Stamp left by the template the space was installed from. Kept as sent and read only by the platform."
          },
          "editing_disabled": {
            "type": "boolean",
            "readOnly": true,
            "description": "When true the space is locked: update and delete are refused. Create-only, with no unlock."
          }
        }
      },
      "SpaceList": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Space"
            }
          },
          "results_total": {
            "type": "integer"
          }
        }
      },
      "Task": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "readOnly": true
          },
          "url": {
            "type": "string",
            "readOnly": true,
            "description": "UI URL to navigate directly to this task"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "description": "Markdown / rich-text content"
          },
          "assignees": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "Assigned user IDs."
          },
          "attachments": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            }
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "created_by": {
            "type": "string",
            "readOnly": true
          },
          "priority": {
            "type": "string"
          },
          "folder": {
            "type": "string"
          },
          "reporter": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "description": "A status id of the space."
          },
          "space_id": {
            "type": "string"
          },
          "due_date": {
            "type": "string",
            "format": "date-time"
          },
          "scheduled_at": {
            "type": "string",
            "format": "date-time",
            "description": "RFC3339 date-time at which the task is scheduled. Archiving the task clears it."
          },
          "archived": {
            "type": "boolean",
            "description": "Whether the task is archived."
          },
          "order": {
            "type": "number",
            "description": "Sort order of the task within its column/board."
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Free-form tag ids on the task."
          },
          "metadata": {
            "type": "object",
            "additionalProperties": true,
            "description": "Arbitrary metadata bag stored on the task."
          },
          "watchers": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "readOnly": true,
            "description": "User ids watching the task. Only present on the get-task response, not stored on the task record."
          },
          "muted": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "readOnly": true,
            "description": "User ids who muted the task. Only present on the get-task response."
          },
          "parent": {
            "type": "string",
            "description": "Id of the parent task, when this is a subtask. Setting it needs read access to the parent's space."
          },
          "source": {
            "type": "string"
          },
          "source_detail": {
            "type": "string"
          },
          "value": {
            "type": "number"
          },
          "currency": {
            "type": "string"
          },
          "expected_close": {
            "type": "string"
          },
          "time_tracking": {
            "$ref": "#/components/schemas/TimeTracking"
          },
          "version": {
            "type": "integer",
            "readOnly": true,
            "description": "1 on create, +1 on every task write. Comments, time logs and activity stamps never bump it."
          },
          "sync_key": {
            "type": "string",
            "readOnly": true,
            "description": "Set when the task is shared with a connected account. Its version then belongs to that shared lineage."
          },
          "sync_conflict": {
            "type": "object",
            "additionalProperties": true,
            "readOnly": true,
            "description": "Present when an incoming change from a connected account conflicted with a local edit."
          },
          "external_id": {
            "type": "string",
            "maxLength": 256,
            "description": "Your own id for the task, at most 256 bytes of UTF-8."
          },
          "activity_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "description": "Moves on task, comment, time-log and action writes."
          },
          "subtasks": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            },
            "readOnly": true,
            "description": "Present on list and get responses."
          },
          "task_actions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TaskAction"
            },
            "readOnly": true
          },
          "implementation_date": {
            "type": "string",
            "description": "Estimated go-live date, ISO. Stored only; nothing schedules on it."
          },
          "assigned_qa": {
            "type": "string",
            "description": "User id, offered from the Space's assigned QA users. Not validated against them."
          }
        }
      },
      "CreateTaskRequest": {
        "type": "object",
        "required": [
          "title"
        ],
        "properties": {
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "description": "Markdown / rich-text content"
          },
          "assignees": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "Assigned user IDs. A client user can only be assigned tasks in their own folder."
          },
          "attachments": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            }
          },
          "priority": {
            "type": "string"
          },
          "folder": {
            "type": "string"
          },
          "reporter": {
            "type": "string",
            "description": " A client user can only report tasks in their own folder."
          },
          "status": {
            "type": "string",
            "description": "Initial status id. If omitted and `space_id` is set, the task inherits the space's `default_status`."
          },
          "space_id": {
            "type": "string",
            "description": "Parent space id. If omitted, the task lands in the default space. The task id is server-generated; any id you send is ignored."
          },
          "due_date": {
            "type": "string",
            "format": "date-time",
            "description": "RFC3339 date-time. A date-only value can fail to round-trip."
          },
          "scheduled_at": {
            "type": "string",
            "format": "date-time",
            "description": "RFC3339 date-time to schedule the task."
          },
          "archived": {
            "type": "boolean",
            "description": "Create the task in an archived state."
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Free-form tag ids."
          },
          "parent": {
            "type": "string",
            "description": "Id of the parent task, when this is a subtask. Setting it needs read access to the parent's space."
          },
          "source": {
            "type": "string"
          },
          "source_detail": {
            "type": "string"
          },
          "value": {
            "type": "number"
          },
          "currency": {
            "type": "string"
          },
          "expected_close": {
            "type": "string"
          },
          "external_id": {
            "type": "string",
            "maxLength": 256,
            "description": "Your own id for the task, at most 256 bytes of UTF-8."
          },
          "metadata": {
            "type": "object",
            "additionalProperties": true,
            "description": "Arbitrary metadata bag stored on the task."
          },
          "time_tracking": {
            "type": "object",
            "additionalProperties": true,
            "description": "Set `estimate` only, as `{\"estimate\": {\"time_in_seconds\": n}}`. Logged time goes through the time-log route."
          },
          "order": {
            "type": "number",
            "description": "Sort order of the task within its column/board."
          },
          "identity": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Keys the Space's base record, for example `{\"email\": \"jo@example.com\"}`. Request-only. If the contact link cannot be made the task is still created and the response carries `base_record_skipped`."
          },
          "suppress_events": {
            "type": "boolean",
            "description": "Hides the write from flow task triggers. The changes feed and webhooks still see it."
          },
          "implementation_date": {
            "type": "string"
          },
          "assigned_qa": {
            "type": "string"
          }
        }
      },
      "UpdateTaskRequest": {
        "allOf": [
          {
            "$ref": "#/components/schemas/CreateTaskRequest"
          },
          {
            "type": "object",
            "required": [
              "id"
            ],
            "properties": {
              "id": {
                "type": "string"
              },
              "archived": {
                "type": "boolean"
              },
              "resolve_conflict": {
                "type": "string",
                "enum": [
                  "keep_mine",
                  "take_theirs"
                ],
                "description": "Settles a sync conflict raised by a connected account. `no_conflict` (400) if there is none."
              },
              "distribution_share": {
                "type": "boolean",
                "description": "Shares a task that existed before its space was connected, with the connected account."
              },
              "metadata": {
                "type": "object",
                "additionalProperties": true,
                "description": "Replaces the task metadata wholesale; `{}` clears it. Not synced across accounts."
              },
              "move_subtasks": {
                "type": "boolean",
                "description": "On a space move, moves the subtasks with the task."
              },
              "updated_at": {
                "type": "string",
                "description": "Optimistic-concurrency token: the `updated_at` you last read."
              }
            }
          }
        ]
      },
      "UpdateMultiTaskRequest": {
        "type": "object",
        "required": [
          "tasks"
        ],
        "properties": {
          "tasks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UpdateTaskRequest"
            }
          }
        }
      },
      "TaskList": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Task"
            }
          },
          "results_total": {
            "type": "integer",
            "description": "Number of results on this page. It is not a total across pages."
          },
          "has_more": {
            "type": "boolean",
            "description": "True when another page exists. Left out when false."
          },
          "total_hits": {
            "type": "integer",
            "description": "Every match across all pages, as the index counts them."
          },
          "counts": {
            "type": "object",
            "description": "Present when `counts=status` was asked for and could be read.",
            "properties": {
              "status": {
                "type": "object",
                "additionalProperties": {
                  "type": "integer"
                }
              },
              "due": {
                "type": "integer"
              }
            }
          }
        }
      },
      "TaskAction": {
        "type": "object",
        "required": [
          "description"
        ],
        "description": "A checklist item on a task. `description` is required on every write, not only on create — an update that only flips `done` still has to resend it.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Action id. Omit on create and the server assigns one; pass an existing id to update that action.",
            "example": "ta_a1b2c3"
          },
          "description": {
            "type": "string",
            "minLength": 1,
            "description": "What the action is. Required on every write.",
            "example": "Confirm the report has been proofread"
          },
          "done": {
            "type": "boolean",
            "description": "Whether the item is ticked off."
          },
          "resources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TaskActionResource"
            },
            "description": "Resources the action opens. Required (at least one) when the action is new."
          },
          "keep_status": {
            "type": "boolean",
            "description": "Leaves this action out of the task's status automation."
          },
          "suppress_events": {
            "type": "boolean",
            "description": "Request-only. Stops this write publishing a task event."
          }
        }
      },
      "TaskActionResource": {
        "type": "object",
        "required": [
          "resource_id",
          "resource_type"
        ],
        "description": "A platform resource a checklist action opens. A new action must carry at least one valid resource; an action without one is refused with 400 (a step with nothing to open takes a `todo` resource). Stored actions that predate this stay editable.",
        "properties": {
          "resource_type": {
            "type": "string",
            "enum": [
              "record",
              "record_config",
              "file",
              "assistant_session",
              "todo",
              "flow_input"
            ],
            "description": "`record` (id `{configId}.{recordId}`), `record_config` (id of a record config attached to the task's space), `file`, `assistant_session` (id `{agentSubject}.{sessionId}`), `todo` (id of your choice, with `metadata.todos`), or `flow_input` (added by a paused flow run, id is the run tracking id)."
          },
          "resource_id": {
            "type": "string",
            "example": "customers.rec_123",
            "description": "Required. Format depends on `resource_type`."
          },
          "metadata": {
            "type": "object",
            "additionalProperties": true,
            "description": "For `todo`: `{\"todos\":[{\"text\":\"...\",\"done\":false}]}` with at least one item. Free-form for the other types."
          }
        }
      },
      "Comment": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "readOnly": true
          },
          "url": {
            "type": "string",
            "readOnly": true,
            "description": "UI URL to navigate directly to this comment"
          },
          "body": {
            "type": "string"
          },
          "attachments": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "author": {
            "type": "string",
            "readOnly": true,
            "description": "User ID of the comment author, set by the backend"
          },
          "reactions": {
            "type": "object",
            "readOnly": true,
            "description": "Reactions aggregated by emoji. Keys are emoji characters.",
            "additionalProperties": {
              "$ref": "#/components/schemas/CommentReactionEntry"
            }
          },
          "reply_id": {
            "type": "string",
            "description": "Id of the comment this replies to."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "external_author": {
            "$ref": "#/components/schemas/ExternalAuthor"
          },
          "mentions": {
            "type": "array",
            "maxItems": 50,
            "items": {
              "type": "string"
            },
            "description": "User ids mentioned in the comment (max 50)."
          },
          "internal": {
            "type": "boolean",
            "description": "Marks the comment as team-only, hidden from client users."
          }
        }
      },
      "CreateCommentRequest": {
        "type": "object",
        "required": [
          "body"
        ],
        "properties": {
          "body": {
            "type": "string",
            "description": "Plain text or markdown content"
          },
          "attachments": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "reply_id": {
            "type": "string",
            "description": "Id of the comment this replies to."
          },
          "mentions": {
            "type": "array",
            "maxItems": 50,
            "items": {
              "type": "string"
            },
            "description": "User ids mentioned in the comment (max 50)."
          },
          "internal": {
            "type": "boolean",
            "description": "Marks the comment as team-only, hidden from client users."
          }
        }
      },
      "UpdateCommentRequest": {
        "type": "object",
        "properties": {
          "body": {
            "type": "string"
          },
          "reply_id": {
            "type": "string",
            "description": "Id of the comment this replies to."
          },
          "mentions": {
            "type": "array",
            "maxItems": 50,
            "items": {
              "type": "string"
            },
            "description": "User ids mentioned in the comment (max 50)."
          },
          "internal": {
            "type": "boolean",
            "description": "Marks the comment as team-only, hidden from client users."
          }
        }
      },
      "CommentReactionEntry": {
        "type": "object",
        "properties": {
          "count": {
            "type": "integer",
            "description": "Number of users who reacted with this emoji"
          },
          "users": {
            "type": "array",
            "description": "IDs of users who reacted with this emoji",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "CommentReactionRequest": {
        "type": "object",
        "required": [
          "reaction"
        ],
        "properties": {
          "reaction": {
            "type": "object",
            "description": "Map of emoji character to boolean. Set true to add the reaction, false to remove it.",
            "additionalProperties": {
              "type": "boolean"
            },
            "example": {
              "😛": true
            }
          }
        }
      },
      "CommentList": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Comment"
            }
          },
          "results_total": {
            "type": "integer"
          }
        }
      },
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string"
          },
          "code": {
            "type": "string",
            "description": "Stable machine code. Branch on this, not on `error`."
          }
        },
        "required": [
          "error"
        ]
      },
      "VersionConflict": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string"
          },
          "code": {
            "type": "string",
            "enum": [
              "version_conflict"
            ]
          },
          "task": {
            "$ref": "#/components/schemas/Task"
          }
        },
        "required": [
          "error",
          "code",
          "task"
        ]
      },
      "CursorExpired": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string"
          },
          "code": {
            "type": "string",
            "enum": [
              "cursor_expired"
            ]
          },
          "next_cursor": {
            "type": "string",
            "description": "Resume from here."
          },
          "retention_days": {
            "type": "integer"
          }
        },
        "required": [
          "error",
          "code",
          "next_cursor"
        ]
      },
      "ExternalAuthor": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "url": {
            "type": "string",
            "format": "uri",
            "maxLength": 2048
          }
        },
        "required": [
          "name"
        ],
        "description": "The person in the other system a comment speaks for. Integration callers only; cleared for everyone else."
      },
      "TaskWrite": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "assignees": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "attachments": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "priority": {
            "type": "string"
          },
          "folder": {
            "type": "string"
          },
          "reporter": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "description": "A status id of the space."
          },
          "space_id": {
            "type": "string"
          },
          "due_date": {
            "type": "string",
            "format": "date-time"
          },
          "scheduled_at": {
            "type": "string",
            "format": "date-time"
          },
          "order": {
            "type": "number"
          },
          "archived": {
            "type": "boolean"
          },
          "metadata": {
            "type": "object",
            "additionalProperties": true
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "time_tracking": {
            "type": "object",
            "additionalProperties": true
          },
          "parent": {
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "source_detail": {
            "type": "string"
          },
          "value": {
            "type": "number"
          },
          "currency": {
            "type": "string"
          },
          "expected_close": {
            "type": "string"
          },
          "external_id": {
            "type": "string",
            "maxLength": 256,
            "description": "Caller's id, at most 256 bytes of UTF-8."
          },
          "suppress_events": {
            "type": "boolean",
            "description": "Hides the write from flow task triggers. The changes feed and webhooks still see it."
          }
        },
        "description": "Task fields. On the upsert route, `space_id` and `external_id` come from the path and any body value is ignored."
      },
      "CreateTaskResponse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Task"
          },
          {
            "type": "object",
            "properties": {
              "base_record_skipped": {
                "type": "string"
              }
            }
          }
        ]
      },
      "ChangeEvent": {
        "type": "object",
        "properties": {
          "event_id": {
            "type": "string",
            "description": "`<account_id>-<stream_sequence>`. Equals the `webhook-id` header of a delivery."
          },
          "event_type": {
            "type": "string",
            "enum": [
              "task-created",
              "task-updated",
              "task-status-changed",
              "task-moved",
              "task-deleted",
              "task-action-added",
              "task-action-completed",
              "task-action-deleted",
              "comment-created",
              "comment-updated",
              "comment-deleted"
            ]
          },
          "occurred_at": {
            "type": "string",
            "format": "date-time"
          },
          "account_id": {
            "type": "string"
          },
          "space_id": {
            "type": "string"
          },
          "folder": {
            "type": "string"
          },
          "origin": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "enum": [
                  "user",
                  "integration",
                  "api_key",
                  "flow",
                  "distribution",
                  "system"
                ]
              },
              "id": {
                "type": "string"
              }
            },
            "required": [
              "kind",
              "id"
            ]
          },
          "actor": {
            "type": "string"
          },
          "task": {
            "$ref": "#/components/schemas/Task"
          },
          "changed_fields": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "status_from": {
            "type": "string",
            "description": "Set only on a status change."
          },
          "old_space_id": {
            "type": "string",
            "description": "Set only on a move."
          },
          "comment": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": true
          },
          "action": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": true
          },
          "old_folder": {
            "type": "string",
            "description": "Set only when a task moved between folders."
          }
        },
        "required": [
          "event_id",
          "event_type",
          "occurred_at",
          "account_id",
          "space_id",
          "origin",
          "task"
        ]
      },
      "ChangesPage": {
        "type": "object",
        "properties": {
          "events": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChangeEvent"
            }
          },
          "next_cursor": {
            "type": "string"
          },
          "has_more": {
            "type": "boolean"
          },
          "retention_days": {
            "type": "integer",
            "enum": [
              30
            ]
          }
        },
        "required": [
          "events",
          "next_cursor",
          "has_more",
          "retention_days"
        ]
      },
      "CopyStructureRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1
          },
          "id": {
            "type": "string",
            "description": "Defaults to the upper-cased name with non-word runs replaced by `_`, at most 32 characters."
          },
          "staging": {
            "type": "boolean",
            "description": "Needs an account root or admin."
          }
        },
        "required": [
          "name"
        ]
      },
      "SpaceResetResponse": {
        "type": "object",
        "properties": {
          "space_id": {
            "type": "string"
          },
          "deleted": {
            "type": "integer"
          },
          "failed": {
            "type": "integer",
            "description": "Tasks in this batch that could not be deleted."
          },
          "remaining": {
            "type": "integer",
            "description": "Failed plus anything past the cap. Call again until 0. A lower bound when past the cap."
          },
          "external_ids_cleared": {
            "type": "integer",
            "description": "External-id map entries removed for the space. 0 while tasks remain past the cap; the map is cleared once the space is fully listed."
          }
        },
        "required": [
          "space_id",
          "deleted",
          "failed",
          "remaining",
          "external_ids_cleared"
        ]
      },
      "TimeLog": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "readOnly": true,
            "description": "Server-minted, `tl_` followed by random characters."
          },
          "time_spent": {
            "type": "object",
            "required": [
              "time_in_seconds"
            ],
            "properties": {
              "time_in_seconds": {
                "type": "integer",
                "minimum": 1
              }
            }
          },
          "started_at": {
            "type": "string",
            "format": "date-time"
          },
          "description": {
            "type": "string"
          },
          "user": {
            "type": "object",
            "readOnly": true,
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            }
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        },
        "required": [
          "time_spent",
          "started_at"
        ]
      },
      "TimeTracking": {
        "type": "object",
        "properties": {
          "estimate": {
            "type": "object",
            "properties": {
              "time_in_seconds": {
                "type": "integer"
              }
            }
          },
          "logs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TimeLog"
            }
          },
          "spent": {
            "type": "object",
            "properties": {
              "time_in_seconds": {
                "type": "integer"
              }
            }
          },
          "remaining": {
            "type": "object",
            "properties": {
              "time_in_seconds": {
                "type": "integer"
              }
            }
          },
          "progress_percent": {
            "type": "number"
          }
        }
      },
      "TaskTemplate": {
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "id": {
            "type": "string",
            "readOnly": true,
            "description": "Server-minted, `tt_` followed by random characters."
          },
          "name": {
            "type": "string",
            "description": "Shown in the template picker and used as the new task's title."
          },
          "description": {
            "type": "string"
          },
          "vertical": {
            "type": "string",
            "description": "Groups templates. Empty means generic."
          },
          "priority": {
            "type": "string"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "folder": {
            "type": "string"
          },
          "reporter": {
            "type": "string"
          },
          "assignees": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "estimate": {
            "type": "object",
            "properties": {
              "time_in_seconds": {
                "type": "integer"
              }
            }
          },
          "task_actions": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true,
              "required": [
                "kind",
                "description"
              ],
              "description": "A form, document or chat action seeded onto the new task.",
              "properties": {
                "kind": {
                  "type": "string",
                  "enum": [
                    "form",
                    "document",
                    "chat"
                  ]
                },
                "description": {
                  "type": "string"
                }
              }
            }
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        }
      },
      "CreateContactRequest": {
        "type": "object",
        "required": [
          "space_id"
        ],
        "properties": {
          "space_id": {
            "type": "string"
          },
          "first_name": {
            "type": "string"
          },
          "last_name": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "parent_folder": {
            "type": "string",
            "description": "Folder of the organisation the contact belongs to."
          },
          "config_id": {
            "type": "string",
            "description": "Writes the Space's organisation record config instead of its base record."
          },
          "extra_data": {
            "type": "object",
            "additionalProperties": true
          }
        },
        "description": "Fields depend on the Space's base record configuration."
      },
      "MeetingFile": {
        "type": "object",
        "properties": {
          "space_id": {
            "type": "string"
          },
          "folder": {
            "type": "string"
          },
          "file_type": {
            "type": "string",
            "enum": [
              "video",
              "audio",
              "transcript",
              "summary"
            ]
          },
          "recording_id": {
            "type": "string"
          },
          "bot_id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by": {
            "type": "string"
          },
          "file": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "size": {
                "type": "integer"
              },
              "mtime": {
                "type": "string"
              }
            }
          }
        }
      },
      "TimeLogList": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TimeLog"
            }
          },
          "results_total": {
            "type": "integer"
          }
        }
      },
      "TaskTemplateList": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TaskTemplate"
            }
          },
          "results_total": {
            "type": "integer"
          }
        }
      },
      "MeetingFileList": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MeetingFile"
            }
          },
          "results_total": {
            "type": "integer"
          }
        }
      },
      "UpdateTaskTemplateRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Shown in the template picker and used as the new task's title."
          },
          "description": {
            "type": "string"
          },
          "vertical": {
            "type": "string",
            "description": "Groups templates. Empty means generic."
          },
          "priority": {
            "type": "string"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "folder": {
            "type": "string"
          },
          "reporter": {
            "type": "string"
          },
          "assignees": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "estimate": {
            "type": "object",
            "properties": {
              "time_in_seconds": {
                "type": "integer"
              }
            }
          },
          "task_actions": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true,
              "required": [
                "kind",
                "description"
              ],
              "description": "A form, document or chat action seeded onto the new task.",
              "properties": {
                "kind": {
                  "type": "string",
                  "enum": [
                    "form",
                    "document",
                    "chat"
                  ]
                },
                "description": {
                  "type": "string"
                }
              }
            }
          }
        },
        "description": "Every field is optional. Tags, assignees and `task_actions` replace the stored list when sent."
      },
      "EntityRef": {
        "type": "object",
        "required": [
          "type",
          "id"
        ],
        "properties": {
          "type": {
            "type": "string"
          },
          "id": {
            "type": "string"
          }
        }
      },
      "EntityComment": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "author": {
            "type": "string"
          },
          "author_name": {
            "type": "string"
          },
          "account_id": {
            "type": "string"
          },
          "reply_id": {
            "type": "string"
          },
          "visibility": {
            "type": "string",
            "enum": [
              "private",
              "shared"
            ]
          },
          "counterparty_account_id": {
            "type": "string"
          },
          "entity": {
            "$ref": "#/components/schemas/EntityRef"
          },
          "target": {
            "$ref": "#/components/schemas/EntityRef"
          },
          "mentions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "counterparty_mentions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "attachments": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "reactions": {
            "type": "object",
            "readOnly": true,
            "additionalProperties": {
              "type": "object",
              "properties": {
                "count": {
                  "type": "integer"
                },
                "users": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "reactors": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "account_id": {
                        "type": "string"
                      },
                      "user_id": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "EntityCommentList": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EntityComment"
            }
          },
          "results_total": {
            "type": "integer"
          }
        }
      },
      "CreateEntityCommentRequest": {
        "type": "object",
        "required": [
          "body"
        ],
        "properties": {
          "body": {
            "type": "string",
            "maxLength": 20000,
            "description": "Up to 20,000 characters."
          },
          "reply_id": {
            "type": "string"
          },
          "visibility": {
            "type": "string",
            "enum": [
              "private",
              "shared"
            ],
            "default": "private"
          },
          "counterparty_account_id": {
            "type": "string",
            "description": "Required for a shared comment."
          },
          "target": {
            "$ref": "#/components/schemas/EntityRef",
            "description": "A part of the entity the comment is about."
          },
          "mentions": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "With `counterparty_mentions`, at most 50."
          },
          "counterparty_mentions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "attachments": {
            "type": "array",
            "maxItems": 20,
            "items": {
              "type": "string"
            },
            "description": "Workspace file paths copied onto the comment (max 20)."
          }
        }
      },
      "UpdateEntityCommentRequest": {
        "type": "object",
        "properties": {
          "body": {
            "type": "string"
          },
          "visibility": {
            "type": "string",
            "enum": [
              "private",
              "shared"
            ]
          },
          "target": {
            "$ref": "#/components/schemas/EntityRef"
          },
          "mentions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "counterparty_mentions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "attachments": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "TaskRelationType": {
        "type": "string",
        "enum": [
          "relates_to",
          "blocks",
          "is_blocked_by",
          "duplicates",
          "is_duplicated_by",
          "clones",
          "is_cloned_by"
        ],
        "description": "The link as read from `task_id`'s side."
      },
      "TaskRelation": {
        "type": "object",
        "properties": {
          "related_task_id": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "relates_to",
              "blocks",
              "duplicates",
              "clones"
            ]
          },
          "direction": {
            "type": "string",
            "enum": [
              "outward",
              "inward"
            ]
          },
          "label": {
            "type": "string",
            "example": "is blocked by"
          },
          "created_by": {
            "type": "string"
          },
          "created_at": {
            "type": "string"
          },
          "task": {
            "type": "object",
            "description": "The related task as it stands now.",
            "properties": {
              "id": {
                "type": "string"
              },
              "title": {
                "type": "string"
              },
              "status": {
                "type": "string"
              },
              "status_name": {
                "type": "string"
              },
              "status_color": {
                "type": "string"
              },
              "status_complete": {
                "type": "boolean"
              },
              "space_id": {
                "type": "string"
              },
              "url": {
                "type": "string"
              },
              "archived": {
                "type": "boolean"
              },
              "parent": {
                "type": "string"
              }
            }
          }
        }
      },
      "TaskRelationList": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TaskRelation"
            }
          },
          "results_total": {
            "type": "integer"
          }
        }
      },
      "SpaceCollection": {
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "id": {
            "type": "string",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "maxLength": 120
          },
          "description": {
            "type": "string",
            "maxLength": 500
          },
          "icon": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "maxLength": 64
              },
              "color": {
                "type": "string",
                "description": "Hex colour such as `#2563EB`."
              }
            }
          },
          "space_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Spaces in the collection, in display order. A space sits in one collection; adding it here removes it from the others."
          },
          "catch_all": {
            "type": "boolean",
            "description": "Receives every visible space not placed elsewhere."
          },
          "created_at": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          }
        }
      },
      "SpaceCollectionsResponse": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SpaceCollection"
            }
          },
          "results_total": {
            "type": "integer"
          },
          "is_default": {
            "type": "boolean",
            "description": "True when the user has saved nothing and the list is computed."
          },
          "collection": {
            "$ref": "#/components/schemas/SpaceCollection",
            "description": "The collection a create or update wrote."
          }
        }
      }
    },
    "responses": {
      "BadRequest": {
        "description": "Bad Request",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "NotFound": {
        "description": "Not Found",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Forbidden": {
        "description": "Forbidden",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Conflict": {
        "description": "Conflict",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Unauthorized": {
        "description": "Unauthorized",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      }
    },
    "securitySchemes": {
      "apiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "x-api-key"
      },
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      },
      "oauth2": {
        "type": "oauth2",
        "description": "API integration client credentials. Tokens only work on the task-sync routes in workspaces.",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "https://api.quiva.ai/oauth/token",
            "scopes": {}
          }
        }
      }
    }
  },
  "tags": [
    {
      "name": "Tasks"
    },
    {
      "name": "Files"
    },
    {
      "name": "Folders"
    },
    {
      "name": "Task Schedules"
    },
    {
      "name": "Distribution"
    }
  ]
}
