{
  "openapi": "3.0.3",
  "info": {
    "title": "Path SDK API",
    "version": "1.0.0",
    "description": "The HTTP surface behind `createPathClient()` in `@pathsystems/path`.\n\nApps authenticate as themselves with an app token and receive their own\npermissions; user-level authorization is the app's responsibility.\n"
  },
  "servers": [
    {
      "url": "https://api.path.dev",
      "description": "Production"
    },
    {
      "url": "http://localhost:8080",
      "description": "Local development"
    }
  ],
  "security": [
    {
      "appToken": []
    }
  ],
  "tags": [
    {
      "name": "assets",
      "description": "Files and folders. Documented in the snake_case the endpoints actually\nsend; the SDK maps them into camelCase types.\n"
    },
    {
      "name": "tasks",
      "description": "Tracked work items — the feature the console calls Tasks, stored in\n`tickets`. Carries assignees, app assignments, comments, checklist items\nand a status history.\n\nCreating a task does not start any work. The automatic-pickup path that\nonce provisioned a session on create is retired and deliberately absent\nfrom this contract; today a task is worked by a person, or by Scout when\nsomeone asks it to.\n"
    }
  ],
  "paths": {
    "/api/v1/tenants/{tenantId}/tickets": {
      "parameters": [
        {
          "$ref": "#/components/parameters/TenantId"
        }
      ],
      "get": {
        "operationId": "listTasks",
        "tags": [
          "tasks"
        ],
        "summary": "List tasks",
        "x-required-permission": "read_tickets",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "description": "Page size.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "app_id",
            "in": "query",
            "description": "Filter to tasks assigned to one app. Query name is legacy.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "ticket_number",
            "in": "query",
            "description": "Look up by per-organization number, with or without a leading \"#\".\nQuery name is legacy; the field is `number` in responses.\n",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "assignee_id",
            "in": "query",
            "description": "Filter to tasks assigned to this Path user.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "search",
            "in": "query",
            "description": "Filter to tasks whose title contains this text, ignoring case.",
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Matching tasks.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        }
      },
      "post": {
        "operationId": "createTask",
        "tags": [
          "tasks"
        ],
        "summary": "Create a task",
        "description": "Files a tracked task. Nothing is started automatically — a task is\npicked up by a person, or by Scout when someone asks it to.\n",
        "x-required-permission": "manage_tickets",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTaskInput"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The created task.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Task"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        }
      }
    },
    "/api/v1/tenants/{tenantId}/tickets/assignable-users": {
      "parameters": [
        {
          "$ref": "#/components/parameters/TenantId"
        }
      ],
      "get": {
        "operationId": "listAssignableUsers",
        "tags": [
          "tasks"
        ],
        "summary": "List users who may be assigned a task",
        "x-required-permission": "manage_tickets",
        "responses": {
          "200": {
            "description": "Eligible assignees.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AssignableUserList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        }
      }
    },
    "/api/v1/tenants/{tenantId}/tickets/assignable-apps": {
      "parameters": [
        {
          "$ref": "#/components/parameters/TenantId"
        }
      ],
      "get": {
        "operationId": "listAssignableApps",
        "tags": [
          "tasks"
        ],
        "summary": "List apps a task may be assigned to",
        "x-required-permission": "manage_tickets",
        "responses": {
          "200": {
            "description": "Eligible apps.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AssignableAppList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        }
      }
    },
    "/api/v1/tenants/{tenantId}/tickets/{taskId}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/TenantId"
        },
        {
          "$ref": "#/components/parameters/TaskId"
        }
      ],
      "get": {
        "operationId": "getTask",
        "tags": [
          "tasks"
        ],
        "summary": "Get a task",
        "x-required-permission": "read_tickets",
        "responses": {
          "200": {
            "description": "The task.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Task"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "patch": {
        "operationId": "updateTask",
        "tags": [
          "tasks"
        ],
        "summary": "Update a task",
        "description": "PATCH, not PUT: every field is optional and an omitted field is left\nalone rather than cleared. Send null to clear a nullable field.\n",
        "x-required-permission": "manage_tickets",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateTaskInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated task.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Task"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "delete": {
        "operationId": "deleteTask",
        "tags": [
          "tasks"
        ],
        "summary": "Delete a task",
        "x-required-permission": "manage_tickets",
        "responses": {
          "204": {
            "description": "Deleted."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/api/v1/tenants/{tenantId}/tickets/{taskId}/status": {
      "parameters": [
        {
          "$ref": "#/components/parameters/TenantId"
        },
        {
          "$ref": "#/components/parameters/TaskId"
        }
      ],
      "post": {
        "operationId": "setTaskStatus",
        "tags": [
          "tasks"
        ],
        "summary": "Transition a task's status",
        "x-required-permission": "manage_tickets",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetTaskStatusInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The task in its new status.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Task"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/api/v1/tenants/{tenantId}/tickets/{taskId}/close": {
      "parameters": [
        {
          "$ref": "#/components/parameters/TenantId"
        },
        {
          "$ref": "#/components/parameters/TaskId"
        }
      ],
      "post": {
        "operationId": "closeTask",
        "tags": [
          "tasks"
        ],
        "summary": "Close a task",
        "description": "Shorthand for the closed transition. Answers ok with a message when\nthere was nothing to close, rather than failing.\n",
        "x-required-permission": "manage_tickets",
        "responses": {
          "200": {
            "description": "Outcome of the close.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OperationResult"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/api/v1/tenants/{tenantId}/tickets/{taskId}/events": {
      "parameters": [
        {
          "$ref": "#/components/parameters/TenantId"
        },
        {
          "$ref": "#/components/parameters/TaskId"
        }
      ],
      "get": {
        "operationId": "listTaskEvents",
        "tags": [
          "tasks"
        ],
        "summary": "Status history for a task",
        "x-required-permission": "read_tickets",
        "responses": {
          "200": {
            "description": "Events, oldest first.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskEventList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/api/v1/tenants/{tenantId}/tickets/{taskId}/applications": {
      "parameters": [
        {
          "$ref": "#/components/parameters/TenantId"
        },
        {
          "$ref": "#/components/parameters/TaskId"
        }
      ],
      "put": {
        "operationId": "setTaskApplications",
        "tags": [
          "tasks"
        ],
        "summary": "Replace the apps a task is assigned to",
        "description": "PUT — the supplied list becomes the whole set; [] clears it.",
        "x-required-permission": "manage_tickets",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetTaskApplicationsInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The task with its new app assignments.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Task"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/api/v1/tenants/{tenantId}/tickets/{taskId}/assignees": {
      "parameters": [
        {
          "$ref": "#/components/parameters/TenantId"
        },
        {
          "$ref": "#/components/parameters/TaskId"
        }
      ],
      "put": {
        "operationId": "setTaskAssignees",
        "tags": [
          "tasks"
        ],
        "summary": "Replace a task's assignees",
        "description": "PUT — the supplied list becomes the whole set; [] unassigns.",
        "x-required-permission": "manage_tickets",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetTaskAssigneesInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The task with its new assignees.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Task"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/api/v1/tenants/{tenantId}/tickets/{taskId}/comments": {
      "parameters": [
        {
          "$ref": "#/components/parameters/TenantId"
        },
        {
          "$ref": "#/components/parameters/TaskId"
        }
      ],
      "get": {
        "operationId": "listTaskComments",
        "tags": [
          "tasks"
        ],
        "summary": "Comments on a task",
        "x-required-permission": "read_tickets",
        "responses": {
          "200": {
            "description": "Comments, oldest first. Replies carry parentId.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskCommentList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "post": {
        "operationId": "addTaskComment",
        "tags": [
          "tasks"
        ],
        "summary": "Comment on a task",
        "x-required-permission": "manage_tickets",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddTaskCommentInput"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The created comment.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskComment"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/api/v1/tenants/{tenantId}/tickets/{taskId}/comments/{commentId}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/TenantId"
        },
        {
          "$ref": "#/components/parameters/TaskId"
        },
        {
          "name": "commentId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "patch": {
        "operationId": "updateTaskComment",
        "tags": [
          "tasks"
        ],
        "summary": "Edit a comment",
        "description": "Sets editedAt, which is the reliable \"(edited)\" signal — updatedAt also\nmoves on soft-delete cascades and reply reparenting.\n",
        "x-required-permission": "manage_tickets",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateTaskCommentInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The edited comment.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskComment"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "delete": {
        "operationId": "deleteTaskComment",
        "tags": [
          "tasks"
        ],
        "summary": "Delete a comment",
        "x-required-permission": "manage_tickets",
        "responses": {
          "204": {
            "description": "Deleted."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/api/v1/tenants/{tenantId}/tickets/{taskId}/tasks": {
      "parameters": [
        {
          "$ref": "#/components/parameters/TenantId"
        },
        {
          "$ref": "#/components/parameters/TaskId"
        }
      ],
      "get": {
        "operationId": "listChecklistItems",
        "tags": [
          "tasks"
        ],
        "summary": "Checklist items on a task",
        "description": "The /tasks path segment is legacy — these are CHECKLIST ITEMS\n(`ticket_tasks`), the sub-items of one task, not tasks themselves.\n",
        "x-required-permission": "read_tickets",
        "responses": {
          "200": {
            "description": "Items in position order.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChecklistItemList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "post": {
        "operationId": "addChecklistItem",
        "tags": [
          "tasks"
        ],
        "summary": "Add a checklist item",
        "x-required-permission": "manage_tickets",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddChecklistItemInput"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The created item.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChecklistItem"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/api/v1/tenants/{tenantId}/tickets/{taskId}/tasks/{checklistItemId}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/TenantId"
        },
        {
          "$ref": "#/components/parameters/TaskId"
        },
        {
          "name": "checklistItemId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "patch": {
        "operationId": "updateChecklistItem",
        "tags": [
          "tasks"
        ],
        "summary": "Rename a checklist item or tick it off",
        "x-required-permission": "manage_tickets",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateChecklistItemInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated item.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChecklistItem"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "delete": {
        "operationId": "deleteChecklistItem",
        "tags": [
          "tasks"
        ],
        "summary": "Delete a checklist item",
        "x-required-permission": "manage_tickets",
        "responses": {
          "204": {
            "description": "Deleted."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/api/v1/tenants/{tenantId}/assets/folders": {
      "parameters": [
        {
          "$ref": "#/components/parameters/TenantId"
        }
      ],
      "get": {
        "operationId": "listAssetFolders",
        "tags": [
          "assets"
        ],
        "summary": "List asset folders",
        "description": "Folders directly under `parent_id`, or the root folders when it is\nomitted. `all=true` returns every folder in the organization in one\nquery, for rendering a tree.\n\nListing root folders (or passing `all`) also creates any missing\nper-app folder as a side effect, so a newly created app gains its\nfolder the first time something lists. Pass `ensure_app_folders=false`\nto list only existing folders without provisioning. Omitting this\noption preserves the existing folder synchronization behavior.\n",
        "x-required-permission": "read_assets",
        "parameters": [
          {
            "name": "parent_id",
            "in": "query",
            "description": "Snake_case on the wire; the SDK exposes it as parentId.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "all",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "ensure_app_folders",
            "in": "query",
            "description": "Set false for a read-only listing without creating missing App folders. Explicit values must be true or false.",
            "schema": {
              "type": "boolean",
              "default": true
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Folders, as a bare array rather than an envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AssetFolderWire"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        }
      },
      "post": {
        "operationId": "createAssetFolder",
        "tags": [
          "assets"
        ],
        "summary": "Create an asset folder",
        "description": "An App credential acting as itself needs `manage_asset_folders`. A\nPath user needs it only without `parent_id`, at the Organization\nroot: inside a folder, edit access to that folder is enough. An App\ncredential carrying a verified delegated user is graded as that\nPath user.\n",
        "x-required-permission": "manage_asset_folders",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateAssetFolderWire"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The created folder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AssetFolderWire"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        }
      }
    },
    "/api/v1/tenants/{tenantId}/assets/folders/{folderId}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/TenantId"
        },
        {
          "name": "folderId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "put": {
        "operationId": "updateAssetFolder",
        "tags": [
          "assets"
        ],
        "summary": "Rename or move an asset folder",
        "description": "The caller must be able to edit the folder. An App credential acting\nas itself also needs `manage_asset_folders`; so does a Path user for\nan App's own folder (`application_id` set). An App credential\ncarrying a verified delegated user is graded as that Path user.\n",
        "x-required-permission": "manage_asset_folders",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateAssetFolderWire"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledgement only — this endpoint does NOT return the folder.\nRe-list if the caller needs the updated row.\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessageResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "delete": {
        "operationId": "deleteAssetFolder",
        "tags": [
          "assets"
        ],
        "summary": "Delete an asset folder",
        "description": "Permanently deletes the folder with its subfolders and files. Every\ncaller needs `manage_asset_folders` and must be able to edit\neverything in the folder. Edit access alone is not enough.\n",
        "x-required-permission": "manage_asset_folders",
        "responses": {
          "200": {
            "description": "Acknowledgement. Answers 200 with a message, not 204.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessageResult"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    }
  },
  "components": {
    "parameters": {
      "TenantId": {
        "name": "tenantId",
        "in": "path",
        "required": true,
        "description": "The organization the call is made against. For an app token it must\nequal the tenant the token was issued for; a mismatch is rejected before\nany handler runs. The SDK reads it from PATH_ORGANIZATION_ID, falling\nback to the older ORGANIZATION_ID.\n",
        "schema": {
          "type": "string",
          "format": "uuid"
        }
      },
      "TaskId": {
        "name": "taskId",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "format": "uuid"
        }
      }
    },
    "securitySchemes": {
      "appToken": {
        "type": "http",
        "scheme": "bearer",
        "description": "An app token (PATH_APP_TOKEN), or a user session for the console. The\norganization is derived from an app token; there is no header to set.\n"
      }
    },
    "responses": {
      "BadRequest": {
        "description": "The request was malformed.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Unauthorized": {
        "description": "Missing, malformed, or expired credential.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Forbidden": {
        "description": "The caller lacks the required permission.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "NotFound": {
        "description": "No such resource visible to this caller.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      }
    },
    "schemas": {
      "AssetFolderWire": {
        "type": "object",
        "required": [
          "id",
          "organization_id",
          "name",
          "path",
          "created_at"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "organization_id": {
            "type": "string"
          },
          "application_id": {
            "type": "string",
            "nullable": true,
            "description": "Owning app; null for an org-level folder."
          },
          "name": {
            "type": "string"
          },
          "parent_id": {
            "type": "string",
            "nullable": true
          },
          "path": {
            "type": "string",
            "description": "Materialized path, e.g. /Brand/Logos."
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by": {
            "type": "string",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "can_edit": {
            "type": "boolean",
            "description": "Whether the caller may rename this folder or create a folder\ninside it, by its access to the folder. It says nothing about\ndeleting the folder. Present in listings and\non a created folder. An App credential acting as itself also\nneeds `manage_asset_folders`.\n"
          }
        }
      },
      "CreateAssetFolderWire": {
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1
          },
          "parent_id": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "UpdateAssetFolderWire": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "parent_id": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "MessageResult": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string"
          }
        }
      },
      "Error": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "string",
            "description": "Machine-readable code on the newer handlers (invalid_filter,\nfailed_to_list), a human sentence on the older ones. Do not parse it.\n"
          },
          "message": {
            "type": "string",
            "description": "Human-readable detail, present when the handler supplies one."
          }
        }
      },
      "OperationResult": {
        "type": "object",
        "required": [
          "ok"
        ],
        "properties": {
          "ok": {
            "type": "boolean"
          },
          "message": {
            "type": "string",
            "description": "Set when the call was a no-op, explaining why."
          }
        }
      },
      "Task": {
        "type": "object",
        "required": [
          "id",
          "number",
          "reference",
          "title",
          "status",
          "organizationId",
          "createdBy",
          "createdAt",
          "updatedAt",
          "agentNeeded",
          "applicationIds",
          "applications",
          "assignees"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "number": {
            "type": "integer",
            "format": "int64",
            "description": "Per-organization number, unique within the org only. Never use it as\na global identifier.\n"
          },
          "taskKey": {
            "type": "string",
            "description": "The organization's key — the MEDI in MEDI-3."
          },
          "reference": {
            "type": "string",
            "description": "Human identifier such as MEDI-3. What users type and read."
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "acceptanceCriteria": {
            "type": "string",
            "nullable": true
          },
          "priority": {
            "type": "string",
            "nullable": true
          },
          "type": {
            "type": "string",
            "nullable": true,
            "description": "bug_report | feature_request"
          },
          "status": {
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          },
          "appId": {
            "type": "string",
            "nullable": true,
            "description": "Primary app assignment, mirrored for the agent pipeline.\napplicationIds is the authoritative set.\n"
          },
          "sessionId": {
            "type": "string",
            "nullable": true
          },
          "agentNeeded": {
            "type": "boolean",
            "readOnly": true,
            "description": "Stored flag from the retired automatic-pickup path. Read-only and\nnot settable — kept because existing rows carry it. Creating a task\nnever starts anything on its own.\n"
          },
          "intakeSource": {
            "type": "string",
            "nullable": true,
            "description": "How the task arrived — agent for Scout-filed work, null for a\nperson-created task.\n"
          },
          "applicationIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "applications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TaskApplicationRef"
            }
          },
          "assignees": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TaskAssignee"
            }
          },
          "previewUrl": {
            "type": "string",
            "nullable": true
          },
          "previewStatus": {
            "type": "string",
            "nullable": true
          },
          "createdBy": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "TaskList": {
        "type": "object",
        "required": [
          "data",
          "count"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Task"
            }
          },
          "count": {
            "type": "integer",
            "description": "Items in this page. Retained because it predates totalCount; it is\njust the length of data.\n"
          },
          "totalCount": {
            "type": "integer",
            "description": "Matching tasks across every page — what makes limit/offset usable,\nsince without it a short final page is indistinguishable from a full\none. Absent on views that span Organizations, which have no count path,\nand absent if the count query failed after the page succeeded.\n"
          }
        }
      },
      "TaskApplicationRef": {
        "type": "object",
        "required": [
          "id",
          "name"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        }
      },
      "TaskAssignee": {
        "type": "object",
        "required": [
          "userId",
          "email",
          "name"
        ],
        "properties": {
          "userId": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        }
      },
      "AssignableUser": {
        "type": "object",
        "required": [
          "userId",
          "email",
          "name",
          "source",
          "organizationId",
          "organizationName"
        ],
        "properties": {
          "userId": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "source": {
            "type": "string",
            "description": "client | partner"
          },
          "organizationId": {
            "type": "string"
          },
          "organizationName": {
            "type": "string"
          }
        }
      },
      "AssignableUserList": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AssignableUser"
            }
          }
        }
      },
      "AssignableAppList": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TaskApplicationRef"
            }
          }
        }
      },
      "TaskEvent": {
        "type": "object",
        "required": [
          "id",
          "taskId",
          "time",
          "status"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "taskId": {
            "type": "string"
          },
          "time": {
            "type": "string",
            "format": "date-time"
          },
          "status": {
            "type": "string"
          },
          "changedBy": {
            "type": "string",
            "nullable": true
          },
          "changedByName": {
            "type": "string",
            "description": "Empty for a system or agent action."
          },
          "changedByEmail": {
            "type": "string"
          },
          "reason": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "TaskEventList": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TaskEvent"
            }
          }
        }
      },
      "TaskComment": {
        "type": "object",
        "required": [
          "id",
          "taskId",
          "body",
          "authorName",
          "authorEmail",
          "createdAt",
          "updatedAt",
          "revisions"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "taskId": {
            "type": "string"
          },
          "parentId": {
            "type": "string",
            "nullable": true,
            "description": "Set for a reply. One level deep only."
          },
          "authorId": {
            "type": "string",
            "nullable": true
          },
          "authorName": {
            "type": "string"
          },
          "authorEmail": {
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "editedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Null when never edited. The reliable \"(edited)\" signal."
          },
          "revisions": {
            "type": "array",
            "description": "Immutable prior bodies, newest first.",
            "items": {
              "$ref": "#/components/schemas/TaskCommentRevision"
            }
          }
        }
      },
      "TaskCommentRevision": {
        "type": "object",
        "required": [
          "id",
          "body",
          "editedAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "editedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "TaskCommentList": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TaskComment"
            }
          }
        }
      },
      "ChecklistItem": {
        "type": "object",
        "required": [
          "id",
          "taskId",
          "content",
          "isDone",
          "position",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "taskId": {
            "type": "string"
          },
          "content": {
            "type": "string"
          },
          "isDone": {
            "type": "boolean"
          },
          "position": {
            "type": "integer"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ChecklistItemList": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChecklistItem"
            }
          }
        }
      },
      "CreateTaskInput": {
        "type": "object",
        "properties": {
          "intakeSource": {
            "type": "string",
            "enum": [
              "agent"
            ],
            "description": "Attributes the task to something other than a person typing it.\nOnly `agent` is accepted; the historical path_support values are\nread-only. Omit it for a person-created task.\n"
          },
          "title": {
            "type": "string",
            "description": "May be empty; the server derives a fallback."
          },
          "description": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "description": "bug_report | feature_request"
          },
          "appId": {
            "type": "string",
            "nullable": true
          },
          "applicationIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "assigneeIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "priority": {
            "type": "string",
            "nullable": true
          },
          "acceptanceCriteria": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "UpdateTaskInput": {
        "type": "object",
        "description": "Every field optional; omitted means unchanged.",
        "properties": {
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "acceptanceCriteria": {
            "type": "string",
            "nullable": true
          },
          "priority": {
            "type": "string",
            "nullable": true
          },
          "type": {
            "type": "string",
            "nullable": true
          },
          "applicationIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "assigneeIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "SetTaskStatusInput": {
        "type": "object",
        "required": [
          "status"
        ],
        "properties": {
          "status": {
            "type": "string"
          },
          "reason": {
            "type": "string",
            "nullable": true,
            "description": "Recorded on the resulting event."
          }
        }
      },
      "SetTaskApplicationsInput": {
        "type": "object",
        "required": [
          "applicationIds"
        ],
        "properties": {
          "applicationIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "SetTaskAssigneesInput": {
        "type": "object",
        "required": [
          "assigneeIds"
        ],
        "properties": {
          "assigneeIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "AddTaskCommentInput": {
        "type": "object",
        "required": [
          "body"
        ],
        "properties": {
          "body": {
            "type": "string",
            "minLength": 1
          },
          "parentId": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "UpdateTaskCommentInput": {
        "type": "object",
        "required": [
          "body"
        ],
        "properties": {
          "body": {
            "type": "string",
            "minLength": 1
          }
        }
      },
      "AddChecklistItemInput": {
        "type": "object",
        "required": [
          "content"
        ],
        "properties": {
          "content": {
            "type": "string",
            "minLength": 1
          }
        }
      },
      "UpdateChecklistItemInput": {
        "type": "object",
        "description": "Every field optional; omitted means unchanged.",
        "properties": {
          "content": {
            "type": "string"
          },
          "isDone": {
            "type": "boolean"
          }
        }
      }
    }
  }
}
