{
  "swagger": "2.0",
  "info": {
    "title": "Onplana",
    "description": "Onplana is project and portfolio management with AI. Create tasks and projects, log and approve time, file issues, and start flows when work changes.",
    "version": "1.0.0",
    "contact": {
      "name": "Onplana support",
      "url": "https://onplana.com/contact",
      "email": "support@onplana.com"
    }
  },
  "host": "api.onplana.com",
  "basePath": "/api",
  "schemes": [
    "https"
  ],
  "consumes": [
    "application/json"
  ],
  "produces": [
    "application/json"
  ],
  "paths": {
    "/comments": {
      "get": {
        "operationId": "ListTaskComments",
        "summary": "List the comments on a task",
        "description": "Lists the comments on one task, newest first, with their replies.",
        "x-ms-visibility": "none",
        "parameters": [
          {
            "name": "taskId",
            "in": "query",
            "required": true,
            "type": "string",
            "x-ms-summary": "Task",
            "description": "The task."
          }
        ],
        "responses": {
          "200": {
            "description": "Array of Comment.",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/Comment"
              }
            }
          },
          "default": {
            "description": "Error: { error, code? }. 402 when the workspace plan lacks the feature, 403 when the token scope or role refuses."
          }
        }
      },
      "post": {
        "operationId": "AddTaskComment",
        "summary": "Add a comment to a task",
        "description": "Posts a comment on a task in the team thread. Give a parent comment to post a reply.",
        "x-ms-visibility": "important",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "type": "object",
              "properties": {
                "taskId": {
                  "type": "string",
                  "description": "The task.",
                  "x-ms-summary": "Task",
                  "x-ms-visibility": "important"
                },
                "content": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 10000,
                  "description": "The content.",
                  "x-ms-summary": "Content",
                  "x-ms-visibility": "important"
                },
                "parentId": {
                  "type": "string",
                  "description": "The parent task.",
                  "x-ms-summary": "Parent task"
                }
              },
              "required": [
                "content",
                "taskId"
              ]
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Created.",
            "schema": {
              "$ref": "#/definitions/Comment"
            }
          },
          "default": {
            "description": "Error: { error, code? }. 402 when the workspace plan lacks the feature, 403 when the token scope or role refuses."
          }
        }
      }
    },
    "/issues": {
      "get": {
        "operationId": "ListIssues",
        "summary": "List issues",
        "description": "Lists the issues on one project, or on every project you can read when no project is given, highest severity first.",
        "x-ms-visibility": "none",
        "parameters": [
          {
            "name": "projectId",
            "in": "query",
            "required": false,
            "type": "string",
            "x-ms-summary": "Project",
            "description": "One project's issues.",
            "x-ms-dynamic-values": {
              "operationId": "ListProjects",
              "value-path": "id",
              "value-title": "name"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "type": "string",
            "x-ms-summary": "Status",
            "description": "One of OPEN, INVESTIGATING, BLOCKED, RESOLVED, CLOSED, DEFERRED, WONT_FIX, or several separated by commas; an unknown value matches nothing."
          },
          {
            "name": "severity",
            "in": "query",
            "required": false,
            "type": "string",
            "x-ms-summary": "Severity",
            "description": "One of LOW, MEDIUM, HIGH, CRITICAL, or several separated by commas."
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "type": "string",
            "x-ms-summary": "Search",
            "description": "Case-insensitive title-contains filter."
          }
        ],
        "responses": {
          "200": {
            "description": "An array of issues, or { issues, total } when limit is sent.",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/Issue"
              }
            }
          },
          "default": {
            "description": "Error: { error, code? }. 402 when the workspace plan lacks the feature, 403 when the token scope or role refuses."
          }
        }
      },
      "post": {
        "operationId": "CreateIssue",
        "summary": "Create an issue",
        "description": "Files an issue in the Issue Log, on a project or for the whole workspace. Every plan.",
        "x-ms-visibility": "important",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "type": "object",
              "properties": {
                "projectId": {
                  "type": "string",
                  "description": "The project the issue is on; leave out for an organization-level issue.",
                  "x-ms-summary": "Project",
                  "x-ms-dynamic-values": {
                    "operationId": "ListProjects",
                    "value-path": "id",
                    "value-title": "name"
                  }
                },
                "title": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 500,
                  "description": "The title.",
                  "x-ms-summary": "Title",
                  "x-ms-visibility": "important"
                },
                "description": {
                  "type": "string",
                  "maxLength": 10000,
                  "description": "The description.",
                  "x-ms-summary": "Description"
                },
                "type": {
                  "type": "string",
                  "enum": [
                    "OPERATIONAL",
                    "TECHNICAL",
                    "SCHEDULE",
                    "RESOURCE",
                    "BUDGET",
                    "SCOPE",
                    "QUALITY",
                    "EXTERNAL",
                    "OTHER"
                  ],
                  "description": "The type.",
                  "x-ms-summary": "Type",
                  "x-ms-visibility": "important"
                },
                "severity": {
                  "type": "string",
                  "enum": [
                    "LOW",
                    "MEDIUM",
                    "HIGH",
                    "CRITICAL"
                  ],
                  "description": "The severity.",
                  "x-ms-summary": "Severity",
                  "x-ms-visibility": "important"
                },
                "ownerId": {
                  "type": "string",
                  "description": "User id of the person who owns the issue.",
                  "x-ms-summary": "Owner"
                },
                "targetResolutionAt": {
                  "type": "string",
                  "format": "date-time",
                  "description": "When it should be resolved, an ISO 8601 timestamp.",
                  "x-ms-summary": "Target resolution at"
                },
                "linkedTaskId": {
                  "type": "string",
                  "description": "The linked task.",
                  "x-ms-summary": "Linked task"
                }
              },
              "required": [
                "title",
                "type",
                "severity"
              ]
            }
          }
        ],
        "responses": {
          "201": {
            "description": "The issue.",
            "schema": {
              "$ref": "#/definitions/Issue"
            }
          },
          "default": {
            "description": "Error: { error, code? }. 402 when the workspace plan lacks the feature, 403 when the token scope or role refuses."
          }
        }
      }
    },
    "/issues/{id}": {
      "get": {
        "operationId": "GetIssue",
        "summary": "Get an issue",
        "description": "Reads one issue from the Issue Log by its id.",
        "x-ms-visibility": "none",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "type": "string",
            "x-ms-summary": "Issue",
            "description": "The issue id.",
            "x-ms-url-encoding": "single"
          }
        ],
        "responses": {
          "200": {
            "description": "The issue, with its reporter, owner, links and project.",
            "schema": {
              "$ref": "#/definitions/Issue"
            }
          },
          "default": {
            "description": "Error: { error, code? }. 402 when the workspace plan lacks the feature, 403 when the token scope or role refuses."
          }
        }
      },
      "put": {
        "operationId": "UpdateIssue",
        "summary": "Update an issue",
        "description": "Changes an issue's title, description, severity, status, owner or target date. Fields left empty keep their value.",
        "x-ms-visibility": "none",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "type": "string",
            "x-ms-summary": "Issue",
            "description": "The issue id.",
            "x-ms-url-encoding": "single"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "type": "object",
              "properties": {
                "title": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 500,
                  "description": "The title.",
                  "x-ms-summary": "Title"
                },
                "description": {
                  "type": "string",
                  "maxLength": 10000,
                  "x-nullable": true,
                  "description": "The description.",
                  "x-ms-summary": "Description"
                },
                "severity": {
                  "type": "string",
                  "enum": [
                    "LOW",
                    "MEDIUM",
                    "HIGH",
                    "CRITICAL"
                  ],
                  "description": "The severity.",
                  "x-ms-summary": "Severity"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "OPEN",
                    "INVESTIGATING",
                    "BLOCKED",
                    "RESOLVED",
                    "CLOSED",
                    "DEFERRED",
                    "WONT_FIX"
                  ],
                  "description": "The status.",
                  "x-ms-summary": "Status"
                },
                "ownerId": {
                  "type": "string",
                  "description": "User id of the person who owns the issue; null clears.",
                  "x-nullable": true,
                  "x-ms-summary": "Owner"
                },
                "targetResolutionAt": {
                  "type": "string",
                  "format": "date-time",
                  "description": "When it should be resolved, an ISO 8601 timestamp; null clears.",
                  "x-nullable": true,
                  "x-ms-summary": "Target resolution at"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The updated issue.",
            "schema": {
              "$ref": "#/definitions/Issue"
            }
          },
          "default": {
            "description": "Error: { error, code? }. 402 when the workspace plan lacks the feature, 403 when the token scope or role refuses."
          }
        }
      }
    },
    "/issues/{id}/resolve": {
      "post": {
        "operationId": "ResolveIssue",
        "summary": "Resolve an issue",
        "description": "Closes out an issue with a note on what was done, setting its status and resolved time in one step.",
        "x-ms-visibility": "none",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "type": "string",
            "x-ms-summary": "Issue",
            "description": "The issue id.",
            "x-ms-url-encoding": "single"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "type": "object",
              "properties": {
                "resolution": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 10000,
                  "description": "What was done, or why nothing will be.",
                  "x-ms-summary": "Resolution",
                  "x-ms-visibility": "important"
                },
                "status": {
                  "default": "RESOLVED",
                  "type": "string",
                  "enum": [
                    "RESOLVED",
                    "WONT_FIX",
                    "DEFERRED"
                  ],
                  "description": "The status.",
                  "x-ms-summary": "Status"
                }
              },
              "required": [
                "resolution"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The updated issue.",
            "schema": {
              "$ref": "#/definitions/Issue"
            }
          },
          "default": {
            "description": "Error: { error, code? }. 402 when the workspace plan lacks the feature, 403 when the token scope or role refuses."
          }
        }
      }
    },
    "/projects": {
      "get": {
        "operationId": "ListProjects",
        "summary": "List projects",
        "description": "Lists the projects you can see. Feeds the project dropdowns.",
        "x-ms-visibility": "internal",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Array of projects the user has access to.",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/Project"
              }
            }
          },
          "default": {
            "description": "Error: { error, code? }. 402 when the workspace plan lacks the feature, 403 when the token scope or role refuses."
          }
        }
      }
    },
    "/projects/{id}": {
      "get": {
        "operationId": "GetProject",
        "summary": "Get a project",
        "description": "Reads one project by its id, with its tasks and members.",
        "x-ms-visibility": "none",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "type": "string",
            "x-ms-summary": "Project",
            "description": "The project id.",
            "x-ms-url-encoding": "single",
            "x-ms-dynamic-values": {
              "operationId": "ListProjects",
              "value-path": "id",
              "value-title": "name"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Project with embedded tasks and member list.",
            "schema": {
              "$ref": "#/definitions/Project"
            }
          },
          "default": {
            "description": "Error: { error, code? }. 402 when the workspace plan lacks the feature, 403 when the token scope or role refuses."
          }
        }
      },
      "put": {
        "operationId": "UpdateProject",
        "summary": "Update a project",
        "description": "Changes a project's name, description, status or dates. Fields left empty keep their value.",
        "x-ms-visibility": "none",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "type": "string",
            "x-ms-summary": "Project",
            "description": "The project id.",
            "x-ms-url-encoding": "single",
            "x-ms-dynamic-values": {
              "operationId": "ListProjects",
              "value-path": "id",
              "value-title": "name"
            }
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "minLength": 2,
                  "maxLength": 200,
                  "description": "The name.",
                  "x-ms-summary": "Name"
                },
                "description": {
                  "type": "string",
                  "maxLength": 10000,
                  "description": "The description.",
                  "x-ms-summary": "Description"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "PLANNING",
                    "ACTIVE",
                    "ON_HOLD",
                    "COMPLETED",
                    "CANCELLED"
                  ],
                  "description": "The status.",
                  "x-ms-summary": "Status"
                },
                "startDate": {
                  "type": "string",
                  "format": "date-time",
                  "description": "The start date.",
                  "x-ms-summary": "Start date"
                },
                "endDate": {
                  "type": "string",
                  "format": "date-time",
                  "description": "On or after startDate.",
                  "x-ms-summary": "End date"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Updated project.",
            "schema": {
              "$ref": "#/definitions/Project"
            }
          },
          "default": {
            "description": "Error: { error, code? }. 402 when the workspace plan lacks the feature, 403 when the token scope or role refuses."
          }
        }
      }
    },
    "/tasks": {
      "post": {
        "operationId": "CreateTask",
        "summary": "Create a task",
        "description": "Creates a task in a project.",
        "x-ms-visibility": "important",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "type": "object",
              "properties": {
                "projectId": {
                  "type": "string",
                  "description": "The project the task goes in.",
                  "x-ms-summary": "Project",
                  "x-ms-dynamic-values": {
                    "operationId": "ListProjects",
                    "value-path": "id",
                    "value-title": "name"
                  },
                  "x-ms-visibility": "important"
                },
                "title": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200,
                  "description": "The title.",
                  "x-ms-summary": "Title",
                  "x-ms-visibility": "important"
                },
                "description": {
                  "type": "string",
                  "maxLength": 10000,
                  "description": "Null clears.",
                  "x-nullable": true,
                  "x-ms-summary": "Description"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "TODO",
                    "IN_PROGRESS",
                    "REVIEW",
                    "DONE",
                    "BLOCKED"
                  ],
                  "description": "The status.",
                  "x-ms-summary": "Status"
                },
                "priority": {
                  "type": "string",
                  "enum": [
                    "LOW",
                    "MEDIUM",
                    "HIGH",
                    "CRITICAL"
                  ],
                  "description": "The priority.",
                  "x-ms-summary": "Priority"
                },
                "assigneeId": {
                  "type": "string",
                  "description": "User id; null unassigns.",
                  "x-nullable": true,
                  "x-ms-summary": "Assignee"
                },
                "startDate": {
                  "type": "string",
                  "description": "A date the server can store (year 1900 to 9999), YYYY-MM-DD or an ISO 8601 timestamp; null clears.",
                  "x-nullable": true,
                  "x-ms-summary": "Start date"
                },
                "dueDate": {
                  "type": "string",
                  "description": "A date the server can store (year 1900 to 9999), YYYY-MM-DD or an ISO 8601 timestamp; null clears. On or after startDate.",
                  "x-nullable": true,
                  "x-ms-summary": "Due date"
                },
                "estimatedHours": {
                  "type": "number",
                  "minimum": 0,
                  "x-nullable": true,
                  "description": "The estimated hours.",
                  "x-ms-summary": "Estimated hours"
                },
                "parentId": {
                  "type": "string",
                  "description": "Parent task id for a subtask; null makes it top level.",
                  "x-nullable": true,
                  "x-ms-summary": "Parent task"
                }
              },
              "required": [
                "title",
                "projectId"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A replay of an earlier create with the same idempotencyKey: the task it created.",
            "schema": {
              "$ref": "#/definitions/Task"
            }
          },
          "201": {
            "description": "Task created.",
            "schema": {
              "$ref": "#/definitions/Task"
            }
          },
          "default": {
            "description": "Error: { error, code? }. 402 when the workspace plan lacks the feature, 403 when the token scope or role refuses."
          }
        }
      },
      "get": {
        "operationId": "ListProjectTasks",
        "summary": "List the tasks in a project",
        "description": "Lists every task in one project, subtasks included.",
        "x-ms-visibility": "important",
        "parameters": [
          {
            "name": "projectId",
            "in": "query",
            "required": true,
            "type": "string",
            "x-ms-summary": "Project",
            "description": "Filter by project UUID.",
            "x-ms-dynamic-values": {
              "operationId": "ListProjects",
              "value-path": "id",
              "value-title": "name"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Array of tasks.",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/Task"
              }
            }
          },
          "default": {
            "description": "Error: { error, code? }. 402 when the workspace plan lacks the feature, 403 when the token scope or role refuses."
          }
        }
      }
    },
    "/tasks/mine": {
      "get": {
        "operationId": "ListMyTasks",
        "summary": "List my tasks",
        "description": "Lists the tasks you hold or collaborate on across the workspace (My Work).",
        "x-ms-visibility": "important",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "type": "integer",
            "x-ms-summary": "Limit",
            "description": "Max rows (default 15, max 1000)."
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "type": "string",
            "x-ms-summary": "Search",
            "description": "Case-insensitive title-contains filter."
          },
          {
            "name": "includeDoneSince",
            "in": "query",
            "required": false,
            "type": "string",
            "x-ms-summary": "Include done since",
            "description": "YYYY-MM-DD; also include tasks completed on/after this day (Completed section). Malformed value returns 400."
          },
          {
            "name": "dueFrom",
            "in": "query",
            "required": false,
            "type": "string",
            "x-ms-summary": "Due from",
            "description": "YYYY-MM-DD; only tasks due on or after this day (inclusive). Malformed value returns 400."
          },
          {
            "name": "dueTo",
            "in": "query",
            "required": false,
            "type": "string",
            "x-ms-summary": "Due to",
            "description": "YYYY-MM-DD; only tasks due on or before this day (inclusive). Malformed value returns 400."
          }
        ],
        "responses": {
          "200": {
            "description": "Array of assigned tasks, each with hasSubtasks / openSubtaskCount / isRecurring.",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/Task"
              }
            }
          },
          "default": {
            "description": "Error: { error, code? }. 402 when the workspace plan lacks the feature, 403 when the token scope or role refuses."
          }
        }
      }
    },
    "/tasks/{id}": {
      "get": {
        "operationId": "GetTask",
        "summary": "Get a task",
        "description": "Reads one task by its id, for example the task an event named.",
        "x-ms-visibility": "none",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "type": "string",
            "x-ms-summary": "Task",
            "description": "The task id.",
            "x-ms-url-encoding": "single"
          }
        ],
        "responses": {
          "200": {
            "description": "The task.",
            "schema": {
              "$ref": "#/definitions/Task"
            }
          },
          "default": {
            "description": "Error: { error, code? }. 402 when the workspace plan lacks the feature, 403 when the token scope or role refuses."
          }
        }
      },
      "put": {
        "operationId": "UpdateTask",
        "summary": "Update a task",
        "description": "Changes a task's status, title, priority, assignee, dates or progress. Fields left empty keep their value, and a task set to Done is 100% complete.",
        "x-ms-visibility": "important",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "type": "string",
            "x-ms-summary": "Task",
            "description": "The task id.",
            "x-ms-url-encoding": "single"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "type": "object",
              "properties": {
                "status": {
                  "type": "string",
                  "enum": [
                    "TODO",
                    "IN_PROGRESS",
                    "REVIEW",
                    "DONE",
                    "BLOCKED"
                  ],
                  "description": "The status.",
                  "x-ms-summary": "Status"
                },
                "title": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200,
                  "description": "The title.",
                  "x-ms-summary": "Title"
                },
                "description": {
                  "type": "string",
                  "maxLength": 10000,
                  "description": "Null clears.",
                  "x-nullable": true,
                  "x-ms-summary": "Description"
                },
                "priority": {
                  "type": "string",
                  "enum": [
                    "LOW",
                    "MEDIUM",
                    "HIGH",
                    "CRITICAL"
                  ],
                  "description": "The priority.",
                  "x-ms-summary": "Priority"
                },
                "assigneeId": {
                  "type": "string",
                  "description": "User id; null unassigns.",
                  "x-nullable": true,
                  "x-ms-summary": "Assignee"
                },
                "startDate": {
                  "type": "string",
                  "description": "A date the server can store (year 1900 to 9999), YYYY-MM-DD or an ISO 8601 timestamp; null clears.",
                  "x-nullable": true,
                  "x-ms-summary": "Start date"
                },
                "dueDate": {
                  "type": "string",
                  "description": "A date the server can store (year 1900 to 9999), YYYY-MM-DD or an ISO 8601 timestamp; null clears. On or after startDate.",
                  "x-nullable": true,
                  "x-ms-summary": "Due date"
                },
                "progress": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 100,
                  "description": "Whole percent. A task with status DONE must have progress 100 when progress is sent.",
                  "x-ms-summary": "Progress"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Updated task.",
            "schema": {
              "$ref": "#/definitions/Task"
            }
          },
          "default": {
            "description": "Error: { error, code? }. 402 when the workspace plan lacks the feature, 403 when the token scope or role refuses."
          }
        }
      }
    },
    "/templates": {
      "get": {
        "operationId": "ListTemplates",
        "summary": "List project templates",
        "description": "Lists the workspace's templates and the built-in ones. Feeds the template dropdown.",
        "x-ms-visibility": "internal",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Array of ProjectTemplate.",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/ProjectTemplate"
              }
            }
          },
          "default": {
            "description": "Error: { error, code? }. 402 when the workspace plan lacks the feature, 403 when the token scope or role refuses."
          }
        }
      }
    },
    "/templates/{id}/instantiate": {
      "post": {
        "operationId": "CreateProjectFromTemplate",
        "summary": "Create a project from a template",
        "description": "Creates a new project from a project template. Needs the Professional plan or above.",
        "x-ms-visibility": "important",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "type": "string",
            "x-ms-summary": "Template",
            "description": "The template id.",
            "x-ms-url-encoding": "single",
            "x-ms-dynamic-values": {
              "operationId": "ListTemplates",
              "value-path": "id",
              "value-title": "name"
            }
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "minLength": 1,
                  "description": "The new project's name.",
                  "x-ms-summary": "Name",
                  "x-ms-visibility": "important"
                },
                "startDate": {
                  "type": "string",
                  "description": "The new project's start: YYYY-MM-DD or an ISO 8601 timestamp (year 1900 to 9999).",
                  "x-ms-summary": "Start date",
                  "x-ms-visibility": "important"
                }
              },
              "required": [
                "name",
                "startDate"
              ]
            }
          }
        ],
        "responses": {
          "201": {
            "description": "The new project.",
            "schema": {
              "$ref": "#/definitions/Project"
            }
          },
          "default": {
            "description": "Error: { error, code? }. 402 when the workspace plan lacks the feature, 403 when the token scope or role refuses."
          }
        }
      }
    },
    "/timesheets": {
      "get": {
        "operationId": "ListTimesheetEntries",
        "summary": "List timesheet entries",
        "description": "Lists your own timesheet entries for a week or a date range, or everyone's for an Owner, Admin, Manager or approver. Needs the Professional plan or above.",
        "x-ms-visibility": "none",
        "parameters": [
          {
            "name": "userId",
            "in": "query",
            "required": false,
            "type": "string",
            "x-ms-summary": "User",
            "description": "One person's entries."
          },
          {
            "name": "weekStart",
            "in": "query",
            "required": false,
            "type": "string",
            "x-ms-summary": "Week start",
            "description": "First day of a week, YYYY-MM-DD; returns that day and the six after it."
          },
          {
            "name": "startDate",
            "in": "query",
            "required": false,
            "type": "string",
            "x-ms-summary": "Start date",
            "description": "With endDate: entries on or after this day, YYYY-MM-DD."
          },
          {
            "name": "endDate",
            "in": "query",
            "required": false,
            "type": "string",
            "x-ms-summary": "End date",
            "description": "With startDate: entries before this day, YYYY-MM-DD."
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "type": "string",
            "x-ms-summary": "Status",
            "description": "DRAFT, SUBMITTED, APPROVED or REJECTED; repeat it for more than one."
          }
        ],
        "responses": {
          "200": {
            "description": "Array of entries, each with user, task, project and approvedBy.",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/TimesheetEntry"
              }
            }
          },
          "default": {
            "description": "Error: { error, code? }. 402 when the workspace plan lacks the feature, 403 when the token scope or role refuses."
          }
        }
      },
      "post": {
        "operationId": "LogTime",
        "summary": "Log time on a task",
        "description": "Adds a draft entry to your own timesheet. Needs the Professional plan or above.",
        "x-ms-visibility": "important",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "type": "object",
              "properties": {
                "taskId": {
                  "type": "string",
                  "description": "The task.",
                  "x-ms-summary": "Task",
                  "x-ms-visibility": "important"
                },
                "projectId": {
                  "type": "string",
                  "description": "The project.",
                  "x-ms-summary": "Project",
                  "x-ms-dynamic-values": {
                    "operationId": "ListProjects",
                    "value-path": "id",
                    "value-title": "name"
                  },
                  "x-ms-visibility": "important"
                },
                "date": {
                  "type": "string",
                  "description": "The day the work was done: YYYY-MM-DD or an ISO 8601 timestamp (year 1900 to 9999).",
                  "x-ms-summary": "Date",
                  "x-ms-visibility": "important"
                },
                "hours": {
                  "type": "number",
                  "minimum": 0.25,
                  "maximum": 24,
                  "description": "Hours worked that day.",
                  "x-ms-summary": "Hours",
                  "x-ms-visibility": "important"
                },
                "notes": {
                  "type": "string",
                  "description": "The notes.",
                  "x-ms-summary": "Notes"
                }
              },
              "required": [
                "taskId",
                "projectId",
                "date",
                "hours"
              ]
            }
          }
        ],
        "responses": {
          "201": {
            "description": "The entry, status DRAFT.",
            "schema": {
              "$ref": "#/definitions/TimesheetEntry"
            }
          },
          "default": {
            "description": "Error: { error, code? }. 402 when the workspace plan lacks the feature, 403 when the token scope or role refuses."
          }
        }
      }
    },
    "/timesheets/approve-week": {
      "post": {
        "operationId": "ApproveTimesheetWeek",
        "summary": "Approve a submitted timesheet week",
        "description": "Approves one person's submitted entries for the week. You must be one of their timesheet approvers. Needs the Professional plan or above.",
        "x-ms-visibility": "none",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "type": "object",
              "properties": {
                "userId": {
                  "type": "string",
                  "description": "The person whose week is approved.",
                  "x-ms-summary": "User",
                  "x-ms-visibility": "important"
                },
                "weekStart": {
                  "type": "string",
                  "description": "First day of the week, YYYY-MM-DD.",
                  "x-ms-summary": "Week start",
                  "x-ms-visibility": "important"
                }
              },
              "required": [
                "userId",
                "weekStart"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "How many entries moved to APPROVED.",
            "schema": {
              "type": "object",
              "properties": {
                "approved": {
                  "type": "integer",
                  "description": "Entries approved.",
                  "x-ms-summary": "Approved"
                }
              },
              "required": [
                "approved"
              ]
            }
          },
          "default": {
            "description": "Error: { error, code? }. 402 when the workspace plan lacks the feature, 403 when the token scope or role refuses."
          }
        }
      }
    },
    "/timesheets/submit-week": {
      "post": {
        "operationId": "SubmitTimesheetWeek",
        "summary": "Submit my timesheet week",
        "description": "Submits your draft entries for the week to your approvers. Needs the Professional plan or above and the approval workflow turned on.",
        "x-ms-visibility": "none",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "type": "object",
              "properties": {
                "weekStart": {
                  "type": "string",
                  "description": "First day of the week, YYYY-MM-DD.",
                  "x-ms-summary": "Week start",
                  "x-ms-visibility": "important"
                }
              },
              "required": [
                "weekStart"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "How many entries moved to SUBMITTED.",
            "schema": {
              "type": "object",
              "properties": {
                "submitted": {
                  "type": "integer",
                  "description": "Entries submitted.",
                  "x-ms-summary": "Submitted"
                }
              },
              "required": [
                "submitted"
              ]
            }
          },
          "default": {
            "description": "Error: { error, code? }. 402 when the workspace plan lacks the feature, 403 when the token scope or role refuses."
          }
        }
      }
    },
    "/webhooks": {
      "x-ms-notification-content": {
        "description": "The event Onplana sent.",
        "schema": {
          "$ref": "#/definitions/OnplanaEvent"
        }
      },
      "post": {
        "operationId": "WhenAnEventHappens",
        "summary": "When an event happens in Onplana (Business plan)",
        "description": "Starts the flow when a task or project is created or changed, or a comment is added. Needs the Business plan or above and an Owner or Admin token; on a lower plan the subscribe is refused with 402.",
        "x-ms-trigger": "single",
        "x-ms-trigger-hint": "To see it work, create or change a task in Onplana.",
        "x-ms-visibility": "important",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "type": "object",
              "required": [
                "name",
                "url",
                "events"
              ],
              "properties": {
                "events": {
                  "type": "array",
                  "x-ms-summary": "Events",
                  "description": "The events that start the flow.",
                  "x-ms-visibility": "important",
                  "minItems": 1,
                  "items": {
                    "type": "string",
                    "enum": [
                      "task.created",
                      "task.updated",
                      "task.status_changed",
                      "project.created",
                      "project.updated",
                      "comment.created"
                    ]
                  }
                },
                "name": {
                  "type": "string",
                  "x-ms-summary": "Name",
                  "description": "The webhook name in Onplana.",
                  "default": "Power Automate flow",
                  "x-ms-visibility": "internal"
                },
                "url": {
                  "type": "string",
                  "x-ms-summary": "Callback URL",
                  "description": "Where Onplana sends the event.",
                  "x-ms-notification-url": true,
                  "x-ms-visibility": "internal"
                }
              }
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Subscribed. The Location header names the webhook to delete on unsubscribe."
          },
          "default": {
            "description": "Error. 402 below the Business plan, 403 for a role or token without webhook rights."
          }
        }
      }
    },
    "/webhooks/{id}": {
      "delete": {
        "operationId": "DeleteEventSubscription",
        "summary": "Remove an event subscription",
        "description": "Deletes the webhook a flow's trigger created. It is called when the flow is turned off or deleted.",
        "x-ms-visibility": "internal",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "type": "string",
            "x-ms-summary": "Webhook",
            "description": "The webhook id.",
            "x-ms-url-encoding": "single"
          }
        ],
        "responses": {
          "200": {
            "description": "Webhook deleted: `{ success: true }`."
          },
          "default": {
            "description": "Error: { error, code? }. 402 when the workspace plan lacks the feature, 403 when the token scope or role refuses."
          }
        }
      }
    }
  },
  "definitions": {
    "Comment": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "The id.",
          "x-ms-summary": "Id"
        },
        "content": {
          "type": "string",
          "description": "The content.",
          "x-ms-summary": "Content"
        },
        "authorId": {
          "type": "string",
          "description": "The author id.",
          "x-ms-summary": "Author id"
        },
        "projectId": {
          "type": "string",
          "x-nullable": true,
          "description": "The project.",
          "x-ms-summary": "Project"
        },
        "taskId": {
          "type": "string",
          "x-nullable": true,
          "description": "The task.",
          "x-ms-summary": "Task"
        },
        "proposalId": {
          "type": "string",
          "x-nullable": true,
          "description": "The proposal id.",
          "x-ms-summary": "Proposal id"
        },
        "issueId": {
          "type": "string",
          "x-nullable": true,
          "description": "The issue id.",
          "x-ms-summary": "Issue id"
        },
        "ideaId": {
          "type": "string",
          "x-nullable": true,
          "description": "The idea id.",
          "x-ms-summary": "Idea id"
        },
        "companyId": {
          "type": "string",
          "x-nullable": true,
          "description": "The company id.",
          "x-ms-summary": "Company id"
        },
        "parentId": {
          "type": "string",
          "description": "Parent comment id for threaded replies.",
          "x-nullable": true,
          "x-ms-summary": "Parent task"
        },
        "threadKind": {
          "type": "string",
          "enum": [
            "AGENT",
            null
          ],
          "description": "AGENT for the focused human-agent thread; null for the team thread.",
          "x-nullable": true,
          "x-ms-summary": "Thread kind"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time",
          "description": "The created at.",
          "x-ms-summary": "Created at"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time",
          "description": "The updated at.",
          "x-ms-summary": "Updated at"
        }
      },
      "required": [
        "id",
        "content",
        "authorId",
        "createdAt"
      ]
    },
    "Issue": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "The id.",
          "x-ms-summary": "Id"
        },
        "title": {
          "type": "string",
          "description": "The title.",
          "x-ms-summary": "Title"
        },
        "description": {
          "type": "string",
          "x-nullable": true,
          "description": "The description.",
          "x-ms-summary": "Description"
        },
        "type": {
          "type": "string",
          "enum": [
            "OPERATIONAL",
            "TECHNICAL",
            "SCHEDULE",
            "RESOURCE",
            "BUDGET",
            "SCOPE",
            "QUALITY",
            "EXTERNAL",
            "OTHER"
          ],
          "description": "The type.",
          "x-ms-summary": "Type"
        },
        "severity": {
          "type": "string",
          "enum": [
            "LOW",
            "MEDIUM",
            "HIGH",
            "CRITICAL"
          ],
          "description": "The severity.",
          "x-ms-summary": "Severity"
        },
        "status": {
          "type": "string",
          "enum": [
            "OPEN",
            "INVESTIGATING",
            "BLOCKED",
            "RESOLVED",
            "CLOSED",
            "DEFERRED",
            "WONT_FIX"
          ],
          "description": "The status.",
          "x-ms-summary": "Status"
        },
        "projectId": {
          "type": "string",
          "description": "Null for an organization-level issue.",
          "x-nullable": true,
          "x-ms-summary": "Project"
        },
        "reportedById": {
          "type": "string",
          "description": "The reported by id.",
          "x-ms-summary": "Reported by id"
        },
        "ownerId": {
          "type": "string",
          "x-nullable": true,
          "description": "The owner.",
          "x-ms-summary": "Owner"
        },
        "reportedAt": {
          "type": "string",
          "format": "date-time",
          "description": "The reported at.",
          "x-ms-summary": "Reported at"
        },
        "targetResolutionAt": {
          "type": "string",
          "format": "date-time",
          "x-nullable": true,
          "description": "The target resolution at.",
          "x-ms-summary": "Target resolution at"
        },
        "resolvedAt": {
          "type": "string",
          "format": "date-time",
          "x-nullable": true,
          "description": "The resolved at.",
          "x-ms-summary": "Resolved at"
        },
        "resolution": {
          "type": "string",
          "x-nullable": true,
          "description": "The resolution.",
          "x-ms-summary": "Resolution"
        },
        "linkedTaskId": {
          "type": "string",
          "x-nullable": true,
          "description": "The linked task.",
          "x-ms-summary": "Linked task"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time",
          "description": "The created at.",
          "x-ms-summary": "Created at"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time",
          "description": "The updated at.",
          "x-ms-summary": "Updated at"
        }
      },
      "required": [
        "id",
        "title",
        "type",
        "severity",
        "status"
      ]
    },
    "OnplanaEvent": {
      "type": "object",
      "properties": {
        "event": {
          "type": "string",
          "x-ms-summary": "Event",
          "description": "Which event happened, for example task.created.",
          "enum": [
            "task.created",
            "task.updated",
            "task.status_changed",
            "project.created",
            "project.updated",
            "comment.created"
          ]
        },
        "timestamp": {
          "type": "string",
          "format": "date-time",
          "x-ms-summary": "When",
          "description": "When the event happened."
        },
        "data": {
          "type": "object",
          "x-ms-summary": "Data",
          "description": "What changed. Fields depend on the event; ids only, read the full record with another action.",
          "properties": {
            "taskId": {
              "type": "string",
              "x-ms-summary": "Task id",
              "description": "The task the event is about."
            },
            "projectId": {
              "type": "string",
              "x-ms-summary": "Project id",
              "description": "The project the event is about."
            },
            "title": {
              "type": "string",
              "x-ms-summary": "Task title",
              "description": "Sent with task.created only."
            },
            "name": {
              "type": "string",
              "x-ms-summary": "Project name",
              "description": "Sent with project.created and project.updated."
            },
            "from": {
              "type": "string",
              "x-ms-summary": "Status before",
              "description": "Sent with task.status_changed only."
            },
            "to": {
              "type": "string",
              "x-ms-summary": "Status after",
              "description": "Sent with task.status_changed only."
            },
            "commentId": {
              "type": "string",
              "x-ms-summary": "Comment id",
              "description": "Sent with comment.created only."
            }
          }
        }
      }
    },
    "Project": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "The id.",
          "x-ms-summary": "Id"
        },
        "name": {
          "type": "string",
          "description": "The name.",
          "x-ms-summary": "Name"
        },
        "status": {
          "type": "string",
          "enum": [
            "PLANNING",
            "ACTIVE",
            "ON_HOLD",
            "COMPLETED",
            "CANCELLED"
          ],
          "description": "The status.",
          "x-ms-summary": "Status"
        },
        "progress": {
          "type": "integer",
          "minimum": 0,
          "maximum": 100,
          "description": "The progress.",
          "x-ms-summary": "Progress"
        },
        "budget": {
          "type": "number",
          "x-nullable": true,
          "description": "The budget.",
          "x-ms-summary": "Budget"
        },
        "startDate": {
          "type": "string",
          "format": "date-time",
          "x-nullable": true,
          "description": "The start date.",
          "x-ms-summary": "Start date"
        },
        "endDate": {
          "type": "string",
          "format": "date-time",
          "x-nullable": true,
          "description": "The end date.",
          "x-ms-summary": "End date"
        },
        "statusDate": {
          "type": "string",
          "format": "date",
          "description": "The \"as of\" date for progress reporting; null means today.",
          "x-nullable": true,
          "x-ms-summary": "Status date"
        },
        "autoSchedule": {
          "type": "boolean",
          "description": "Automatic scheduling. False: editing a date or adding a link moves no other task; only Recalculate writes the dates the scheduler works out. Set with PUT /scheduling/projects/{id}/auto-schedule.",
          "x-ms-summary": "Auto schedule"
        },
        "parentDatesFromSubtasks": {
          "type": "boolean",
          "description": "The default for a task with subtasks: true takes its start and due dates from them, unless the task's own isManual says otherwise. Read only while the server switch parent_date_rollup_enabled is on. Set with PUT /scheduling/projects/{id}/parent-dates.",
          "x-ms-summary": "Parent dates from subtasks"
        },
        "retainedLogic": {
          "type": "boolean",
          "description": "How a started task meets its links. false (the default, progress override): it holds at its actual start and its links stop moving it. true (retained logic, MS Project split in-progress tasks): its remaining work waits on its incoming links, so a late predecessor pushes it. Read only while the server switch retained_logic_enabled is on. Set with PUT /projects/{id}.",
          "x-ms-summary": "Retained logic"
        },
        "organizationId": {
          "type": "string",
          "description": "The organization id.",
          "x-ms-summary": "Organization id"
        }
      },
      "required": [
        "id",
        "name",
        "status",
        "progress",
        "organizationId"
      ]
    },
    "ProjectTemplate": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "The id.",
          "x-ms-summary": "Id"
        },
        "name": {
          "type": "string",
          "description": "The name.",
          "x-ms-summary": "Name"
        },
        "description": {
          "type": "string",
          "x-nullable": true,
          "description": "The description.",
          "x-ms-summary": "Description"
        },
        "organizationId": {
          "type": "string",
          "description": "Null = system-built-in template (available on all plans).",
          "x-nullable": true,
          "x-ms-summary": "Organization id"
        },
        "taskCount": {
          "type": "integer",
          "description": "The task count.",
          "x-ms-summary": "Task count"
        },
        "milestoneCount": {
          "type": "integer",
          "description": "The milestone count.",
          "x-ms-summary": "Milestone count"
        },
        "createdById": {
          "type": "string",
          "x-nullable": true,
          "description": "The created by id.",
          "x-ms-summary": "Created by id"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time",
          "description": "The created at.",
          "x-ms-summary": "Created at"
        }
      },
      "required": [
        "id",
        "name",
        "createdAt"
      ]
    },
    "Task": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "The id.",
          "x-ms-summary": "Id"
        },
        "title": {
          "type": "string",
          "description": "The title.",
          "x-ms-summary": "Title"
        },
        "status": {
          "type": "string",
          "enum": [
            "TODO",
            "IN_PROGRESS",
            "REVIEW",
            "DONE",
            "BLOCKED"
          ],
          "description": "The status.",
          "x-ms-summary": "Status"
        },
        "priority": {
          "type": "string",
          "enum": [
            "LOW",
            "MEDIUM",
            "HIGH",
            "CRITICAL"
          ],
          "description": "The priority.",
          "x-ms-summary": "Priority"
        },
        "projectId": {
          "type": "string",
          "description": "The project.",
          "x-ms-summary": "Project"
        },
        "assigneeId": {
          "type": "string",
          "x-nullable": true,
          "description": "The assignee.",
          "x-ms-summary": "Assignee"
        },
        "dueDate": {
          "type": "string",
          "format": "date-time",
          "x-nullable": true,
          "description": "The due date.",
          "x-ms-summary": "Due date"
        },
        "estimatedHours": {
          "type": "number",
          "x-nullable": true,
          "description": "The estimated hours.",
          "x-ms-summary": "Estimated hours"
        },
        "progress": {
          "type": "integer",
          "minimum": 0,
          "maximum": 100,
          "description": "The progress.",
          "x-ms-summary": "Progress"
        },
        "originalDurationMinutes": {
          "type": "integer",
          "description": "Planned duration in working minutes; a day is the project calendar hoursPerDay x 60 (default 480).",
          "x-nullable": true,
          "x-ms-summary": "Original duration minutes"
        },
        "remainingDurationMinutes": {
          "type": "integer",
          "description": "Working minutes left; 0 when DONE.",
          "x-nullable": true,
          "x-ms-summary": "Remaining duration minutes"
        },
        "actualStart": {
          "type": "string",
          "format": "date",
          "description": "Day work began (YYYY-MM-DD).",
          "x-nullable": true,
          "x-ms-summary": "Actual start"
        },
        "isManual": {
          "type": "boolean",
          "description": "For a task with subtasks: true keeps its own dates, false takes its start and due dates from its subtasks, null follows the project's parentDatesFromSubtasks. Read only while the server switch parent_date_rollup_enabled is on.",
          "x-nullable": true,
          "x-ms-summary": "Is manual"
        },
        "datesFromSubtasks": {
          "type": "boolean",
          "description": "True when this task's start and due dates come from its subtasks right now (it has subtasks, is not a milestone or held by a live Planner sync, and its isManual or its project's default says so); a change to its dates, durations or constraint is then refused with PARENT_DATES_FROM_SUBTASKS. False whenever the server switch parent_date_rollup_enabled is off. On GET /tasks, /tasks/mine, /tasks/delegated-to-agents and /projects/{id}/tasks; the same flag the MCP task tools return.",
          "x-ms-summary": "Dates from subtasks"
        },
        "optimisticDurationMinutes": {
          "type": "integer",
          "description": "Three-point estimate, best case, in working minutes. At most the task's duration (the remaining duration once started) when written; used by schedule risk runs. Null: the run's default range applies.",
          "x-nullable": true,
          "x-ms-summary": "Optimistic duration minutes"
        },
        "pessimisticDurationMinutes": {
          "type": "integer",
          "description": "Three-point estimate, worst case, in working minutes. At least the task's duration (the remaining duration once started) when written.",
          "x-nullable": true,
          "x-ms-summary": "Pessimistic duration minutes"
        },
        "collaborators": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/TaskCollaborator"
          },
          "description": "People working on the task besides its one assignee, oldest first (at most 20). Present on task reads that load them; change them with PUT /tasks/{id}/collaborators.",
          "x-ms-summary": "Collaborators"
        },
        "myRole": {
          "type": "string",
          "enum": [
            "collaborator"
          ],
          "description": "GET /tasks/mine only: present on a row the caller collaborates on but does not hold. Such a row also carries `assignee`; a row the caller holds carries neither.",
          "x-ms-summary": "My role"
        },
        "assignee": {
          "type": "object",
          "description": "GET /tasks/mine only, beside myRole: who holds the task.",
          "properties": {
            "id": {
              "type": "string",
              "description": "The id.",
              "x-ms-summary": "Id"
            },
            "name": {
              "type": "string",
              "x-nullable": true,
              "description": "The name.",
              "x-ms-summary": "Name"
            }
          },
          "x-nullable": true,
          "x-ms-summary": "Assignee"
        }
      },
      "required": [
        "id",
        "title",
        "status",
        "priority",
        "projectId",
        "progress"
      ]
    },
    "TaskCollaborator": {
      "type": "object",
      "description": "A person working on a task besides its assignee. Always a member of the task's project. Collaborating counts as owning the task for editing it, but not for deleting, reassigning, moving it or changing who collaborates (anyone may remove themselves).",
      "properties": {
        "id": {
          "type": "string",
          "description": "User id.",
          "x-ms-summary": "Id"
        },
        "name": {
          "type": "string",
          "x-nullable": true,
          "description": "The name.",
          "x-ms-summary": "Name"
        },
        "avatar": {
          "type": "string",
          "x-nullable": true,
          "description": "The avatar.",
          "x-ms-summary": "Avatar"
        },
        "isAgentPersona": {
          "type": "boolean",
          "description": "An AI agent member of the organization.",
          "x-ms-summary": "Is agent persona"
        }
      },
      "required": [
        "id",
        "name",
        "avatar",
        "isAgentPersona"
      ]
    },
    "TimesheetEntry": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "The id.",
          "x-ms-summary": "Id"
        },
        "userId": {
          "type": "string",
          "description": "The user.",
          "x-ms-summary": "User"
        },
        "taskId": {
          "type": "string",
          "description": "The task.",
          "x-ms-summary": "Task"
        },
        "projectId": {
          "type": "string",
          "description": "The project.",
          "x-ms-summary": "Project"
        },
        "date": {
          "type": "string",
          "format": "date-time",
          "description": "The day the hours were worked.",
          "x-ms-summary": "Date"
        },
        "hours": {
          "type": "number",
          "description": "The hours.",
          "x-ms-summary": "Hours"
        },
        "notes": {
          "type": "string",
          "x-nullable": true,
          "description": "The notes.",
          "x-ms-summary": "Notes"
        },
        "status": {
          "type": "string",
          "enum": [
            "DRAFT",
            "SUBMITTED",
            "APPROVED",
            "REJECTED"
          ],
          "description": "The status.",
          "x-ms-summary": "Status"
        },
        "approvedById": {
          "type": "string",
          "description": "Who approved or rejected the entry; status says which.",
          "x-nullable": true,
          "x-ms-summary": "Approved by id"
        },
        "approvedAt": {
          "type": "string",
          "format": "date-time",
          "x-nullable": true,
          "description": "The approved at.",
          "x-ms-summary": "Approved at"
        },
        "rejectionReason": {
          "type": "string",
          "x-nullable": true,
          "description": "The rejection reason.",
          "x-ms-summary": "Rejection reason"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time",
          "description": "The created at.",
          "x-ms-summary": "Created at"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time",
          "description": "The updated at.",
          "x-ms-summary": "Updated at"
        }
      },
      "required": [
        "id",
        "userId",
        "taskId",
        "projectId",
        "date",
        "hours",
        "status"
      ]
    }
  },
  "parameters": {},
  "responses": {},
  "securityDefinitions": {
    "API_Key": {
      "type": "apiKey",
      "in": "header",
      "name": "Authorization",
      "description": "Bearer and then your Onplana personal access token, for example \"Bearer pat_...\". Create the token in Onplana under Settings, Developer."
    }
  },
  "security": [
    {
      "API_Key": []
    }
  ],
  "tags": [],
  "x-ms-connector-metadata": [
    {
      "propertyName": "Website",
      "propertyValue": "https://onplana.com"
    },
    {
      "propertyName": "Privacy policy",
      "propertyValue": "https://onplana.com/privacy"
    },
    {
      "propertyName": "Categories",
      "propertyValue": "Productivity;Collaboration"
    }
  ]
}
