Magidoc

RootMutationType
Object

Fields

#

approveAssignment

Approve a pending project assignment. When a project member whose own role is "member" or "only_my_work" adds someone to a project, the assignment is created with pending: true and must be approved by a project admin or workspace admin before it becomes active. Pass the project-level assignment's id; the user's pending todo assignments in the project are approved together with it.

On approval the assignments are activated, the inviter and the invitee are notified by email, and the approved user is added to the project's workspace (with no workspace permissions) if not already a member.

The caller must be a project admin or workspace admin. Returns true on success; calling it on an already-active assignment, on a todo-level assignment, or without sufficient access returns an unprocessable_entity error. Use denyAssignment to reject instead.

associateColorTag

Attaches an existing ColorTag to a Todo or RecipeTodo. id is the ColorTag id, not the task id; pass exactly one of todoId or recipeTodoId. The tag must belong to the task's own Project or Recipe — tag sets are scoped per Project and per Recipe, and cross-container associations fail with not_allowed.

Attaching the special Milestone tag converts the task into a milestone: a Todo's startDate and duration are cleared, its dependenciesType becomes "finish-to-finish", and project progress is recalculated (a RecipeTodo only loses duration).

Requires update permission on the target task — a user assigned to the Todo, a Project Admin, Stack Admin, or Workspace Admin; on the Recipe side, update access to the Recipe. Returns the ColorTag. Detach with disassociateColorTag.

createAssignment

Assign a user to a todo, a project, a stack, or in bulk to every todo in a slice. The target id on assignment selects the mode: todoId (single todo), projectId (project membership with a role), stackId (stack admin, role "stack_admin"), or sliceId together with projectId (bulk: one todo assignment per todo in the slice the user is not yet assigned to). userId is always required, and role (the project permission, see the field) is required for a project or stack; pass id as the string "new". Duplicate assignments for the same user and target are rejected.

Assigning a user to a project todo also puts them on the project if they are not on it yet, returned as projectAssignment. Someone already on the project keeps their project permission whatever role is sent; a new person gets role, or "member" when it is left out. Which project permission (role) the caller may grant depends on their own access: "only_my_work" is always allowed; "member" requires the caller to be a project member other than "only_my_work" (or a workspace admin or viewer); "admin", "admin+autoassign", and "member+invite" require project update rights (project admin, workspace admin, or stack admin). When the caller's own role on the project is "member" or "only_my_work", the assignment is created with pending: true and project admins are emailed approve/deny links (see approveAssignment and denyAssignment); otherwise the assigned user is notified directly. For todo assignments, notificationSent reports whether the assignment email was sent (suppressed when the assignee disabled assigned-to-task emails).

Access control: workspace admins always qualify; project targets also accept any user assigned to the project, todo targets accept project admins and users assigned to the todo, stack targets accept the stack's admins. Returns AssignmentResult with assignmentId (single) or assignments (bulk). Exceeding the rate limit (50 single or 5 bulk creates per ten minutes; for an organization access token, 500 single and 50 bulk) is reported through message rather than a GraphQL error.

createBox

Creates a single box inside a project slice. A Box is a container for todos within a slice; when the slice's boardView flag is true, its boxes render as board columns. The new box is always created with done: false.

The caller must be allowed to create todos in the slice's project: a workspace admin, or a workspace member assigned to the project as admin, admin+autoassign, member, or member+invite (members with the "only_my_work" role cannot manage boxes).

Returns the created Box; fails with not_found when the slice does not exist and not_allowed when the caller lacks permission. The box, the moved todos, and the slice's boardView change are saved together: if one of them fails, none of them is saved. To create several board columns at once and turn the slice into a board, use createBoxes instead.

createBoxes

[Box ]

Creates several boxes at once and turns the slice into a board (sets the slice's boardView flag to true) - the "create board" flow. One box is created per entry in titles, positioned in list order; a box titled exactly "Done" is automatically flagged done: true (the board's done column). The standard board uses ["Not Started", "In Progress", "Done"], but any titles are accepted.

Fails with not_allowed when the slice is already a board with existing boxes, or when the caller lacks permission to create todos in the slice's project. Returns the created boxes. To add a single box use createBox.

createPost

Creates a Post — a discussion entry attached to a Project, Recipe, Slice, or task. type sets the kind: "message" (team conversation), "idea" (improvement suggestion), "issue" (issue/risk tracking), or "reply". For issues, secondaryType distinguishes "Issue" from "Risk" and priority ranks it; these carry no meaning on other kinds. open is required on every call — pass true for non-issue Posts; passing open: false records the close timestamp internally (not exposed as a field).

A top-level Post attaches to exactly one container: pass exactly one of projectId, sliceId, todoId, recipeId, recipeSliceId, or recipeTodoId (zero or several fails with not_allowed). To reply to an existing Post, pass postId instead — the reply inherits the parent's container automatically. ownerId assigns the Post to a user; when the owner differs from the author, the new owner is notified by email. User mentions written in content (the UI's @-mention markup) are recorded against the Post.

Post content is plain text. Line breaks are kept. HTML is not rendered, so tags such as <p> or <strong> would show up as literal text. (A task's description is different — it takes HTML.)

The caller needs view access to the target container — or, for replies, must be the parent Post's author, owner, or a mentioned user, or have access to the parent's container. Returns the created Post. Issue Posts also feed the Project's status indicators.

createProject

Create a new project in a workspace. Only title and workspaceId are required; the caller must hold the "admin" or "project_creator" role in that workspace. Personal workspaces never allow projects — attempting one fails with "workspace_id not allowed - personal workspaces do not allow projects. You can create todos directly at the workspace level instead".

Two creation modes are useful to API callers: a plain call (no recipeId) creates the project with a single unnamed slice so tasks can be added right away, and recipeId instantiates the full structure of a recipe template. The aiData and aiPromptData arguments are reserved for Pie's in-app Create-from-AI flow and should not be populated by external callers — an AI assistant that wants an AI-generated project should design the structure itself and create it with createProject and its slices list (or saveProjectSlices afterwards), followed by createTodo. The caller is automatically assigned as project admin unless assignments contains an explicit self-assignment with another role; the API User of an organization access token is never assigned. startDate and endDate are stored exactly as given (they are never derived from task dates), and title must not contain a URL.

Returns the created project. Validation failures return a list of "field message" error strings. Rate limit: one user (or one organization access token) can create at most 50 projects per 10 minutes. See also updateProject, saveProjectSlices, createTodo, duplicateProject.

createStack

Creates a Stack — the portfolio-level grouping of Projects within a Workspace (Stacks apply to Projects only, not Recipes). title and workspaceId are required; description is an optional free-text note.

The optional assignments list attaches additional users to the Stack at creation time; the only meaningful role value is "stack_admin". A Stack Admin can view and update the Stack (and view its Projects) even without being a Workspace admin. The Stack Admin list cannot be edited through updateStack afterward.

The calling user must be a Workspace admin or have the project-creator permission in the target Workspace; otherwise the mutation fails with a "not_allowed" error. Returns the created Stack (initially empty). Add Projects to it afterward with moveStackProject.

createTextTag

Creates a text tag — a ColorTag with no color, typically used as a filter keyword — and attaches it to a Todo or RecipeTodo in one call. name is the label; pass exactly one of todoId or recipeTodoId. The tag is scoped to the task's own Project or Recipe, derived from the task (there is no projectId/recipeId argument). If a text tag with the same name already exists there, it is reused instead of duplicated.

Requires update permission on the target task — a user assigned to the Todo, a Project Admin, Stack Admin, or Workspace Admin; on the Recipe side, update access to the Recipe. Returns the ColorTag with color null. Text tags are deleted automatically when their last association is removed via disassociateColorTag.

createTimeEntry

Logs time into one day cell of a Timesheet row (a TimeItem). Pass timeItemId (the parent row), date (the day the time applies to), and seconds (time is stored in seconds; the UI renders hours and minutes). With planned: true the value is stored as planned effort (plannedSeconds); otherwise as actual time worked (seconds). A day cell can carry both tracks independently.

A row has one TimeEntry per day. The first call for a day creates it; later calls for the same day add their seconds to it, and a planned value replaces the day's plan. With externalId (the sender's own id for these hours, for example a Jira work log id), hours sent again with the same id replace what that id sent before instead of adding to it. To change a logged value directly, use updateTimeEntry; setting it to 0 removes the hours.

Without userId the parent row must belong to the calling user. Pass userId to log time on another user's row; the caller must be that user (with view access to the Todo on a Todo row), someone with update permission on the Project (Project Admin, Stack Admin, or Workspace Admin) on a Todo or Project row, or an admin of the organization on a Non-Project Activity row. Returns the day's TimeEntry; unauthorized calls fail with not_allowed.

createTimeEntryPlanned

Creates a planned-effort TimeEntry on a Todo-backed Timesheet row and recalculates the Todo's planned work distribution. userId and a Todo-backed timeItemId are required at runtime despite the nullable schema typing. Pass planned: true to store seconds as planned effort; omitting planned stores the value as actual time instead, with no recalculation. With planned: true and seconds omitted, the entry is flagged redistributed so its planned value is derived from the Todo's work-effort distribution.

When the entry's date falls inside the Todo's start–due range, planned effort is recalculated across the Todo and every affected Timesheet row is returned; otherwise only the parent row is returned. The return type is [TimeItem] (rows, not the entry) — use createTimeEntry if you need the created TimeEntry back.

The caller must be the row's owner (their own userId, with view access to the Todo) or have update permission on the Todo's Project (Project Admin, Stack Admin, or Workspace Admin).

createTimeItem

Creates a TimeItem — one row on a user's weekly OMP Timesheet, scoped to a single target. Select the target with the arguments: projectId for a Project-level row, todoId for a Task-level row, or organizationId plus nonProjectActivity (a free-text label) for a Non-Project Activity row. date places the row in its timesheet week (the Timesheet groups rows Sunday through Saturday). The row itself carries no hours — populate day cells afterwards with createTimeEntry, or createTimeEntryPlanned for planned effort.

By default the row is created on the calling user's own timesheet; for the caller's own Todo rows, an existing soft-deleted row for the same Todo and date is restored instead of duplicated. Pass userId to create a row on another user's timesheet, for a Todo, a Project or a Non-Project Activity; the caller must be that user (with view access to the Todo on a Todo row), someone with update permission on the Project (Project Admin, Stack Admin, or Workspace Admin) on a Todo or Project row, or an admin of the organization on a Non-Project Activity row.

tags sets organization-managed reporting labels (for example "Billable") on the row; new tag names are also added to the organization's tag list. Returns the created TimeItem. Passing none of projectId, todoId, or organizationId fails with not_allowed; validation failures (such as a duplicate Project-level row for the same date and tags) return a list of "field message" strings. Time tracking is an Enterprise-plan feature.

createTimeItems

Bulk variant of createTimeItem: creates several Timesheet rows for the calling user in one call. Pass projectIds for Project-level rows or todoIds for Task-level rows; if both lists are supplied, only projectIds is processed. date places every created row in the same timesheet week.

Rows are created only for Projects or Todos the caller has an Assignment on — other ids are silently skipped, not errors. If a matching row already exists for the same target and date it is reused (and restored if soft-deleted) instead of duplicated. tags applies the given organization reporting labels to every created row.

Returns the list of created or reused TimeItem records (an empty list when neither id list is given). Day-cell hours are not created here; call createTimeEntry per date afterwards.

createTodo

Creates a todo (task). Two placements exist. Project todos: pass todo.sliceId for the target project slice, optionally with todo.boxId for a box in that same slice (the box must belong to the slice). Do not pass a projectId; the project association is inferred from the slice. Standalone todos: omit sliceId and pass todo.workspaceId - allowed only in the caller's personal workspace; other workspaces reject standalone todos with an explanatory validation error.

Creating a project todo requires the caller to be a workspace admin or a workspace member assigned to the project as admin, admin+autoassign, member, or member+invite. Pass todo.todoId to create the todo as a subtask: it inherits the parent's assignments and roles, and the parent's own dates, duration, and progress are cleared (parents derive them from subtasks). The creator is auto-assigned to standalone todos and, unless they are a project admin, to project todos. todo.workEffort is ignored on create and defaults to 8 hours (28800 seconds); change it with updateTodo. When startDate/dueDate fall outside the project's date range, the project dates are expanded to cover them.

Returns TodoMutationPayload: select todoId or todo, plus assignments and the recalculated progress, slices, and boxes aggregates. Validation failures return error messages of the form "field message".

createWorkspaceUser

Add a person to a workspace by creating a WorkspaceUser membership. Identify the person with workspaceUser.userId (existing user) or workspaceUser.user (email plus optional profile fields). An email matching no account creates a placeholder user and sends an invite email with a sign-up link; an email matching an existing account adds that account directly. Pass workspaceUser.id as the string "new"; duplicate memberships in the same workspace are rejected.

permissions may contain "admin", "project_creator", "recipe_creator", "viewer", "internal_rates", and "billing_rates"; unknown values are dropped and "admin" supersedes the creator/viewer values. Granting any permission requires workspace admin or organization admin rights. hourlyBillingRate and hourlyInternalRate set the member's default rates in cents. The optional todoId, projectId, stackId, or recipeId argument supports adding someone from within that context; the caller then needs assignment-creation rights there instead of workspace-level rights. Every supplied context must be authorized and belong to the requested workspace. Explicitly supplied rate fields, including zero or null, require the corresponding billing_rates or internal_rates permission together with a workspace admin or viewer role, or organization admin. Project administration alone does not grant these rates. Omitting rate fields does not require rate permissions. Invalid creation commands leave no partial invitee account or membership.

Without a context argument the caller must be a workspace admin or viewer, or an organization admin. On free and trial organizations the call fails with the error "max_users_per_organization_reached" once 20 distinct users exist across the organization. Returns the created WorkspaceUser.

deleteAssignment

Delete one or more assignments. The input shape selects the mode: assignment.id deletes a single assignment; assignmentIds plus projectId deletes the listed assignments; sliceId plus projectId deletes every assignment on every todo in that slice. Both bulk modes require update access to the project and report the deleted records in assignments.

Deletes are hard deletes with cascades and safeguards: removing a project-level assignment also removes that user's todo assignments within the project, and removing the project's last "admin" or "admin+autoassign" assignment, or a stack's last "stack_admin", is rejected. Removing a todo assignment cleans up the user's empty time entries on the todo and redistributes work effort to the remaining assignees; deleting the last assignment of a personal (no-slice) todo deletes the todo itself, and when a personal- workspace todo changes ownership as a result, the new workspaceId is returned.

For single deletes, users may always delete their own assignments; otherwise the updateAssignment access rules apply (workspace admin, project admin, or todo assignee for todo assignments). Returns AssignmentResult.

deleteBox

Deletes a box. The deleteTodos argument selects one of two distinct behaviors. With deleteTodos: true the box and all of its non-deleted todos are soft-deleted together and can be restored with undoDeleteBox. With deleteTodos: false or omitted, the box record is deleted permanently and its todos are kept: they lose their boxId and become loose todos directly on the slice - this path cannot be undone.

If the slice is a board and this was its last remaining box, the slice's boardView flag is reset to false.

Access control matches createBox (permission to create todos in the box's project). Returns the deleted Box; fails with not_allowed when the caller lacks permission.

deletePost

Soft-deletes a Post by setting deletedAt; the Post disappears from queries but is not destroyed, and there is no undo mutation. Only the identified Post is marked deleted — its replies are not modified. Permitted callers match updatePost: the author, the current owner, anyone with update permission on the Post's Project (Project Admin, Stack Admin, or Workspace Admin), or — for Recipe-side Posts — anyone with access to the Recipe. Returns the deleted Post. id is required at runtime despite the nullable schema typing.

deleteSlice

Soft-delete a project slice and optionally its contents; reversible with undoDeleteSlice. The three booleans control the scope: deleteSlice: true deletes the slice itself, while false or omitted keeps the slice and only marks its content as deleted (clear-slice behavior). deleteTodos: true additionally soft-deletes all tasks in the slice, and deleteBoxes: true soft-deletes the slice's boxes — deleteBoxes only takes effect when deleteTodos is also true. Project progress is recalculated when tasks are deleted.

Requires task-create permission in the project: workspace "admin" role or a project role of "admin", "admin+autoassign", "member", or "member+invite". Returns the slice with its todos and boxes, which supplies the ids needed for undoDeleteSlice.

deleteStack

Permanently deletes a Stack by id. Only the Stack record and its Stack admin assignments are removed; the Projects that were grouped under it are detached (their Stack reference is cleared) and remain unchanged in the Workspace. There is no undo for this operation.

The calling user must be an admin of the Stack's Workspace or a Stack admin assigned to the Stack; otherwise the mutation fails with "not_allowed" ("not_found" for an unknown id). Returns the deleted Stack.

deleteTimeItem

Soft-deletes a Timesheet row owned by the calling user; other users' rows cannot be deleted through this mutation. Pass the TimeItem id (required at runtime despite the nullable schema typing).

For Project-level and Todo-level rows the soft delete applies to all of the caller's TimeItems for that same Project or Todo across every week, not only the row identified by id. Non-Project Activity rows are removed individually. Logged TimeEntries are not destroyed — the rows are hidden by setting deletedAt, and creating a row again for the same Todo and date via createTimeItem restores the original record. Returns the deleted TimeItem.

deleteTodo

Soft-deletes a todo and all of its subtasks: deletedAt is set and the records disappear from list queries, but they remain restorable with undoDeleteTodo (no retention limit). Any Jira link (jiraId) is cleared and is not restored on undo. This mutation never hard-deletes; the only hard-delete path for todos is the move flow (copyTodosFromLocation with copyTodosOptions.move: true).

Permission matches updateTodo (workspace admin, project admin, or assigned to the todo); inaccessible or unknown ids fail with not_found.

Returns TodoMutationPayload with the deleted todo (deletedAt set) and recalculated progress, slices, and boxes aggregates. To clear a whole slice or box at once use deleteTodos.

denyAssignment

Reject a pending project assignment; the counterpart to approveAssignment. Pass the project-level assignment's id. The pending assignment and the user's pending todo assignments in that project are deleted, and the inviter is notified by email.

The caller must be a project admin or workspace admin on the project. Returns true on success; calling it on an already-active assignment or a todo-level assignment returns an unprocessable_entity error.

disassociateColorTag

Detaches a ColorTag from a Todo or RecipeTodo. id is the ColorTag id; pass exactly one of todoId or recipeTodoId. Other tasks wearing the same tag are unaffected. Color-variant tags remain in the Project's or Recipe's tag set, but a text tag (one with no color) is deleted entirely once its last association is removed. Requires update permission on the target task, mirroring associateColorTag. Returns the ColorTag; fails with not_allowed if the task is inaccessible or does not belong to the tag's Project or Recipe.

me

Returns the profile of the currently authenticated user. This is the recommended first call for any AI assistant or API session: it identifies who is logged in and returns the user's id, firstName, lastName, email, and linked organizationUsers and workspaceUsers. Use organizationUsers and workspaceUsers to navigate the user's available organizations and workspaces before making further queries.

moveBox

[Box ]

Moves a box, together with all of its todos, to another slice of the same project; cross-project moves are rejected with not_allowed. position sets the box's position in the destination slice. If the destination slice had loose todos and no boxes, a box titled "(Rename Box)" is created automatically to hold them. Requires permission to create todos in the project. Returns a list with the moved box, plus the auto-created box when one was made.

moveBoxToDoneSlice

[Box ]

Archives a finished board column (the "mark sprint as finished" action). Finds or creates a slice titled "Done Sprints" directly after the box's slice, creates a box there titled with the current date (e.g. "6/11 Done"), and moves every todo from the given box into it; the source box stays in place, now empty. Todos flagged recurring are additionally recreated as fresh copies (with files, roles, assignments, tags, and data-field links) in the first box of the source board. Requires permission to create todos in the project; fails with not_allowed when the box has no todos or already sits in the "Done Sprints" slice. Returns the affected boxes: the source box, the new dated box, and a "(Rename Box)" box when one was auto-created for loose todos in the Done Sprints slice.

moveStackProject

Move a project into a stack, between stacks, or out of its stack. Pass stackId to add the project to that stack (it is appended at the last position); omit it or pass null to remove the project from its current stack. The stack must belong to the project's workspace — cross-workspace moves are rejected. Adding requires Workspace Admin or direct Project Admin permission, plus access to the target stack through Stack Admin or workspace create-project permission. Removing requires Workspace Admin or workspace create-project permission. Moving between stacks requires both. Inherited Stack Admin permission alone does not authorize adding projects. Returns the updated project. See also reorderStackProjects.

ompTodos

Returns the tasks (Todos) assigned to the current user across all their workspaces — the data that powers Pie's On My Plate (OMP) page. The result combines two flavors of tasks the user is responsible for: standalone OMP tasks (todos with no project slice — these live in the user's personal workspace, the only place where new standalone todos can be created, plus any slice-less todos assigned to the user) and project tasks (todos belonging to a slice of any currently-open project in a workspace the user can access). The filters.name argument selects a date window and is matched case-sensitively — accepted values are "Late", "Next 7 days", "Weeks", "Custom days:", and "Personal tasks with no dates". For "Weeks" and "Custom days:" also supply filters.start and filters.due.

"Today" is the server's current UTC date. "Late" returns incomplete tasks (progress below 100) whose due date is before today, excluding tasks snoozed to today or later. The date windows match a task whose date span overlaps the window: the span runs from its start date to its due date, a task with only one of the two dates matches when that date falls inside the window, and a snooze date replaces the start date and extends the due date. "Next 7 days" covers today through the sixth day after it; "Weeks" and "Custom days:" cover filters.start through filters.due, both inclusive. "Personal tasks with no dates" returns standalone tasks without a due date. Only "Late" excludes completed tasks; filter the other windows on progress if you only want open work.

Only "Late" is paginated: 10 tasks per page, most recently due first, with total counting every late task and pages past the end returning an empty list. Every other filter returns all matching tasks on every page, with total equal to that count, so request page 1 only. Use this query for "my work" across the whole account; use projectTodos when you need every task of a single project (which has no userId filter).

projectTodos

Returns the tasks (Todos) in a single project that the calling user is permitted to view. Visibility is based on the user's assignment to the project: a member assigned with any role other than "only_my_work" receives every task in the project; a member with the "only_my_work" role receives only the tasks directly assigned to them; a user with no assignment to the project — including workspace admins — receives an empty list rather than an error. An Organization Access Token receives every task in the project. Results are ordered by slice position, then box position, then task position.

Soft-deleted tasks are excluded; completed tasks are included. The Todo progress field (integer 0–100, nullable) is the only completion signal — progress >= 100 means done, nil means not started. Filter client-side on progress if you only want open work. There is no separate closed boolean on Todo.

Subtasks are not nested in the response: if a Todo references a parent, both appear as separate top-level items. Use this query for the task list of one project; use projectsTodos when you need tasks across multiple projects filtered by due date.

projectsTodos

Returns todos across the specified projects that are either due on or before the given dueDate, or whose startDate is on or before the dueDate. A todo is included when at least one of its dates is set and falls on or before the cutoff; todos with neither date set, or whose set dates all fall after the cutoff, are excluded. Completed todos are included in the result; if the caller wants only open work, they must filter client-side on the Todo's progress field (progress >= 100 = done).

Access control is applied per project: a project from projectIds contributes todos only when the calling user is a member of its workspace and additionally is a workspace admin, holds a project role of admin or admin+autoassign, or is assigned to the project's parent Stack. Projects that fail this check are silently skipped rather than raising an error. Pie's OMP Tasks "Teams Plate" view uses this query for cross-project deadline planning.

Use projectTodos instead when you need the full task list for a single project without date filtering.

refreshProjectPlannedWorkEffort

Recompute planned work effort for every assigned task in the project. For each task assignment the work effort is re-derived from the task's workEffort, or 8 hours per day of duration, or the task's date range, and planned time entries are rebuilt for tasks that have dates. This is a maintenance/recompute entry point; normal task edits keep these values up to date automatically. Requires project update permission. Returns the project.

reorderBoxes

[Box ]

Reorders the boxes of one slice. ids is the full desired order of box ids in sliceId; positions are assigned by list index, and ids that do not belong to the slice are ignored. The optional id identifies a box dragged in from another slice of the same project: it is first moved into sliceId (same logic as moveBox), then placed according to ids, or appended last when absent from ids. Requires permission to create todos in the slice's project; returns the reordered boxes, or not_allowed on missing permission.

reorderOmpTodos

Persists the display order of the calling user's On My Plate (OMP) list. ids is the full desired todo-id order; it is stored on the user's personal workspace, applies to that user only, and persists across sessions. Always returns true.

reorderProjectTodos

Reorders todos inside one project slice. ids is the desired order for the slice: positions are assigned by list index, ids outside the slice are ignored, and unlisted todos keep their positions. The optional pickedUpTodo applies the dragged task's location transition in the same call (for example when a drag changes its box or progress). Other task changes use updateTodo. Requires permission to update the slice's project, or a team member moving a task assigned to them (movedTodoId); otherwise fails with not_found. Returns true.

reorderStackProjects

Reorders the Projects within a Stack. ids is the desired full ordering of the Stack's Project ids; each listed Project is given its position from the list, and ids that do not belong to the Stack are silently ignored. The optional projectId first moves that Project into the Stack (it must be in the same Workspace and the caller must have the permissions documented by moveStackProject) before positions are applied atomically; a denied move changes no positions — this supports drag-and-drop of an outside Project into the Stack. The calling user must be an admin of the Stack's Workspace or a Stack admin. Returns the Stack.

saveProjectSlices

[Int ]

Create, update, and delete project slices in one call — this is a full-replace operation on the project's slice set. Entries with an id update that slice, entries without an id create a new slice, and any existing slice whose id is NOT in the submitted list is permanently deleted (a hard database delete, not recoverable with undoDeleteSlice). Always send the complete current set of slices you want to keep.

Each entry requires title and position (ordering within the project, starting at 1). Requires project update permission; an unknown or inaccessible projectId returns a not_found error. Returns the slice ids in the same order as the input, so callers can correlate created slices with their entries.

saveWorkspaceUser

Upsert a workspace membership. The mutation first looks for an existing WorkspaceUser - by workspaceUser.id, or by matching workspaceUser.user.email or workspaceUser.userId within workspaceUser.workspaceId. If none exists, a membership is created exactly like createWorkspaceUser, inviting a brand-new user by email when needed. If one exists and the caller may manage it (workspace admin or organization admin), it is updated like updateWorkspaceUser; if the caller may only view the workspace, the existing record is returned unchanged instead of erroring.

See createWorkspaceUser for the input semantics, the optional todoId/projectId/stackId/recipeId context arguments, the allowed permissions values, and the per-organization user limit. Returns the WorkspaceUser.

setProjectDot

Manually set the project's status dot (health indicator) to green, yellow, or red. Pie normally maintains the dot automatically from the project's open Issue and Risk posts: an open Issue makes it red, an open Risk yellow, and it reverts to green once all are closed. Setting the dot through this mutation records a manual override, and from then on automatic updates are permanently disabled for the project — no API re-enables them. Requires project update permission. Returns the newly created status dot.

setProjectPriority

Set the project's priority integer, shown in Pie's report views. No server-side range validation is applied. Requires project report permission: workspace "admin" or "viewer" role, project "admin"/"admin+autoassign" assignment, or stack admin. Returns the updated project.

setProjectTodosProgresses

Bulk-sets the completion percentage of todos in one slice, optionally narrowed to one box. Each todosProgresses item carries a todo id and an integer progress from 0 to 100, or null for not started; 100 means done. Every target must exist, be non-deleted and belong to sliceId (and boxId when given). Missing, foreign or duplicate ids and invalid progress reject the entire command. An empty list is a no-op that returns stored aggregates.

Requires view access to the slice's project (not_found otherwise). Requires project administration (including admin+autoassign), workspace administration, or active assignment to every listed todo. Pending assignments confer no write authority. A caller who is not an administrator receives the same unauthorized error for a missing target and for a target they cannot edit. Unauthorized batches fail without changes.

Returns ProjectTodosProgressPayload with the recalculated project progress and per-slice/per-box aggregates. todosProgresses contains the saved values of the requested tasks only. Sending a parent as 0 or 100 also sets every same-box child, including children omitted from the request; an explicit child value wins. Those children are not listed in todosProgresses. When the batch touches a parent that has same-box children, or one of those children, the parent's stored progress is cleared. previousProgresses lists the progress every affected task had before the change, children and cleared parents included. Pass undoToken and the original requested targets to undo the change. Task changes and aggregate saves are atomic, and subscription updates follow success. Unlike updateTodo, this path does not email assignees of successor todos.

setTodosDependencies

Sets or clears a dependency chain across todos of one project. With clear: false, ids is treated as an ordered chain: each todo's predecessor list is replaced with exactly the previous todo in the list (the first todo's existing predecessors are left untouched), and dependent dates are recalculated down the chain. With clear: true, all predecessors of the listed todos are removed. For arbitrary, non-chain dependency graphs set todo.predecessors via updateTodo instead.

Ids that do not belong to projectId are ignored. Requires edit permission on the project, otherwise fails with not_allowed. Returns the affected todos.

sliceTodos

Returns the tasks (Todos) in the given Project-Slices that the calling user is permitted to view. Visibility follows the parent Project's access rule: the user must be a workspace admin or viewer, or a workspace member with an assignment to the Project (or a stack_admin role on its parent Stack). Slice ids belonging to Projects the user cannot view — or to deleted Slices or Projects — are silently omitted from the result rather than raising an error.

A user holding the "only_my_work" role on a Project receives only the tasks assigned to them, plus parent tasks of their assigned subtasks — the same scope they see on the Project board. An Organization Access Token receives every task in the Slices. Soft-deleted tasks are excluded; completed tasks are included (filter client-side on progress if you only want open work).

Slice ids from different Projects may be mixed in a single call; the response is a flat [Todo] list across Projects. Group results after the fact via each Todo's sliceId (or slice { projectId } for the parent Project). No ordering is guaranteed — sort client-side on the position field if a stable order is needed.

Use this query for the task lists of specific Slices; use projectTodos for the full task list of a Project. This query is for Project-Slices only; Recipe-Slice contents are retrieved through the Recipe type.

todo

Returns a single Todo by id, if the calling user is permitted to view it. A Todo is a task in Pie's model — the unit of work that can be assigned to one or more users, placed inside a Box on a Project board (or directly at the Project level when the Project has no Slices), associated with a parent Todo as a subtask, given start and due dates, given estimated and planned work effort, tagged with one or more ColorTags, and tracked for time.

Use this query when the caller has a Todo id (from a list query like projectTodos, sliceTodos, ompTodos, or projectsTodos) and needs the full detail of that one Todo. When the calling user is not permitted to view the Todo, or no Todo has the given id, the query returns null rather than an error.

See projectTodos for the full task list of a Project, sliceTodos for the task list of one or more Project-Slices, and recipeTodo for the equivalent query on a Recipe template.

undoDeleteBox

Restores a box that was soft-deleted via deleteBox with deleteTodos: true, together with the todos soft-deleted in the same operation (matched by the box's deletion timestamp). Boxes deleted with deleteTodos: false were removed permanently and cannot be restored. Requires permission to create todos in the box's project. Returns the restored Box.

undoDeleteSlice

Restore a slice previously removed with deleteSlice. The slice itself is always restored; in addition, exactly the boxes listed in boxIds and the tasks listed in todoIds are restored, so pass back the ids affected by the original deleteSlice call. Both lists are required in practice — use empty lists to restore the slice alone. The deleteTodos, deleteSlice, and deleteBoxes arguments are accepted for symmetry with deleteSlice but ignored. Requires the same permission as deleteSlice. Returns the restored slice.

undoDeleteTodo

Restores a soft-deleted todo and its subtasks by clearing their deletedAt. There is no time limit on restoring; a Jira link cleared by deleteTodo is not re-established. Permission matches updateTodo; inaccessible or unknown ids fail with not_found. Returns TodoMutationPayload with the restored todo and recalculated progress aggregates.

updateAssignment

Update an existing assignment. Pass the assignment's id in assignment.id (as a string) plus the fields to change: role, hourlyBillingRate, hourlyInternalRate, plannedHours, workEffort, workEffortCustomized, redistributed. The assignment's userId and target (todoId, projectId, stackId) cannot be changed; delete and recreate instead. The pending flag is not updatable here; use approveAssignment or denyAssignment.

Updating a project todo assignment also syncs the rate overrides onto the user's project-level assignment (returned as projectAssignment); plannedHours stays per-todo. Role changes are validated with the same rules as createAssignment. Changing workEffort marks the assignment as customized and triggers recalculation of the todo's total work effort and planned time.

Access control: workspace admins, project admins ("admin" or "admin+autoassign"), or, for todo assignments, any user assigned to that todo. Returns AssignmentResult with assignmentId and projectAssignment; not-found, access, and validation failures return an unprocessable_entity error.

updateBox

Updates a box's title, description, done flag, and markedDoneAt timestamp. Structural position is not handled here: use reorderBoxes or moveBox to reposition a box, and moveBoxToDoneSlice for the done-sprint flow.

done is one-way through this mutation: done: true marks the box as the slice's "Done" column and automatically clears done on every other box in the same slice (at most one done box per slice); done: false or omitting the argument leaves the current value unchanged, so done cannot be unset here. Todos moved or copied into a done box get their progress set to 100. markedDoneAt likewise can only be set, not cleared.

Access control matches createBox (permission to create todos in the box's project). Returns the updated Box; fails with not_allowed when the caller lacks permission.

updateColorTag

Renames a ColorTag. id is the ColorTag id and name the new label; the tag's color and its existing associations to tasks are unchanged. Works for both Project-scoped and Recipe-scoped tags, color and text variants alike, but the special Milestone tag cannot be renamed.

There is no createColorTag mutation, so renaming the entries seeded by createDefaultColorTags is how the color set is customized. Requires update permission on the owning Project (Project Admin, Stack Admin, or Workspace Admin) or Recipe. Returns the updated ColorTag; fails with not_allowed otherwise.

updatePost

Updates an existing Post. Mutable fields are title, content, secondaryType, priority, open, and ownerId; omitted optional arguments are left unchanged. content is plain text. HTML is not rendered (tags would show up as literal text). A Post's type, its thread parent, and its container cannot be changed after creation. open is required on every call — pass the current value when not changing it; open: false records the close timestamp internally. Changing ownerId emails the new owner.

Permitted callers: the Post's author, its current owner, anyone with update permission on the Post's Project (Project Admin, Stack Admin, or Workspace Admin), or — for Recipe-side Posts — anyone with access to the Recipe. Returns the updated Post. id is required at runtime despite the nullable schema typing.

updateProject

Update an existing project. title and workspaceId are required on every call even when unchanged — pass the project's current values when changing other fields. Writable fields: title, description, workspaceId, stackId, closed, closedStatus, tags, startDate, and endDate. recipeId is accepted for compatibility but ignored: a project's recipe link cannot be changed after creation.

Passing a different workspaceId moves the project to that workspace (allowed only into workspaces where the caller can create projects); the project's tasks move along with it and assignees are added to the target workspace as needed. stackId must reference a stack in the project's (target) workspace. closed and closedStatus are stored independently; keep them consistent (for example closedStatus: "closed" together with closed: true). title must not contain a URL.

Requires project update permission: workspace "admin" role, project "admin"/"admin+autoassign" assignment, or "stack_admin" on the project's stack. The returned project object carries only id and workspaceId; re-query project to read the full updated state. For single-field changes prefer the dedicated mutations: updateProjectEndDate, updateProjectTotalBudget, updateProjectDataFields, updateProjectSharing, setProjectDot, setProjectPriority.

updateProjectBox

Set or clear the unneeded flag on a project box. An unneeded box is treated as done and excluded from project progress; passing false restores it. Project progress is recalculated after the change. Requires project update permission. Returns the parent project, not the box. For other box fields use updateBox.

updateProjectEndDate

Update only the endDate of a project; all other fields are preserved. Pass null to clear the date. Requires project update permission. Returns the updated project. Use updateProject for multi-field changes.

updateProjectPropagateDependencies

Toggle the project's propagateDependencies flag. When true, changing a task's dates automatically recalculates the dates of its dependent (successor) tasks along the project's dependency chains; when false, date changes never shift other tasks. Requires project update permission (workspace "admin", project "admin"/"admin+autoassign", or stack admin). Returns the updated project.

updateProjectSlice

Update runtime attributes of a single project slice. unneeded: true marks the slice as not needed so it is treated as done and excluded from project progress; false reverses it. order sets the sort direction ("asc" or "desc") applied to the slice's boxes. progress writes the slice progress value directly; progress aggregates are recalculated after the update. Requires project update permission. Returns the parent project, not the slice. To rename, reorder, create, or delete slices use saveProjectSlices and deleteSlice.

updateStack

Updates a Stack identified by id. This is a full-state update: title and workspaceId are required on every call, and the optional description and closed values are written as given — omitting them clears the stored values — so always resend the current values you want to keep.

Passing a different workspaceId moves the Stack to that Workspace and reassigns every Project in the Stack to the new Workspace in the same operation. Setting closed: true marks the Stack as done/archived for list views; setting closed: false reopens it.

The calling user must be an admin of the Stack's Workspace or a Stack admin assigned to the Stack; otherwise the mutation fails with "not_allowed" ("not_found" for an unknown id). Returns the updated Stack. Stack Admin assignments cannot be changed here — they are only settable at creation via createStack.

updateTimeEntry

Overwrites the actual-time value (seconds) of an existing TimeEntry. Pass the TimeEntry id and the new seconds; the previous value is replaced, not accumulated, and seconds: 0 keeps the entry with a zero value rather than deleting it. This mutation edits the actual track only — use updateTimeEntryPlanned for the planned track.

Without userId the entry's parent row must belong to the calling user. Pass userId to edit another user's entry; the caller must be that user (with view access to the Todo on a Todo row), someone with update permission on the Project (Project Admin, Stack Admin, or Workspace Admin) on a Todo or Project row, or an admin of the organization on a Non-Project Activity row. Returns the updated TimeEntry.

updateTimeEntryPlanned

Planned-track counterpart of updateTimeEntry, for entries on Todo-backed Timesheet rows. userId is required at runtime despite the nullable schema typing. With planned: true the entry's plannedSeconds is overwritten; passing planned: true with seconds omitted flags the entry as redistributed so its planned value is recomputed from the Todo's work-effort distribution. If planned is omitted, the entry's actual seconds is updated instead.

When the entry's date falls inside the Todo's start–due range, planned effort is recalculated across the Todo and every affected Timesheet row is returned; otherwise only the parent row is returned. The return type is [TimeItem], not the updated TimeEntry.

The caller must be the row's owner (their own userId, with view access to the Todo) or have update permission on the Todo's Project (Project Admin, Stack Admin, or Workspace Admin).

updateTimeItem

Updates an existing Timesheet row. tags is the only mutable field: it replaces the row's organization reporting labels (new tag names are also added to the organization's tag list). The row's target, week, and owner cannot be changed — delete the row and create a new one instead. Day-cell hours are edited with updateTimeEntry or updateTimeEntryPlanned, not here.

Without userId the mutation targets the calling user's own row. Pass userId to edit a row on another user's timesheet; the caller must be that user (with view access to the Todo on a Todo row), someone with update permission on the Project (Project Admin, Stack Admin, or Workspace Admin) on a Todo or Project row, or an admin of the organization on a Non-Project Activity row. Returns the updated TimeItem; unauthorized calls fail with not_allowed.

updateTodo

Updates an existing todo. id selects the todo; todo carries the changes - only the provided input fields are written, but todo.title is required by the input type, so pass the current title when not changing it. Likewise pass the current position, otherwise the todo is re-sorted to the end of its slice. The caller must be a workspace admin, a project admin, or assigned to the todo (for standalone todos: assigned to it or admin of the personal workspace); inaccessible or unknown ids fail with not_found.

Structural rules: changing sliceId/boxId moves the todo and its subtasks; the box must belong to the target slice; workspaceId cannot be changed; jiraId can only be set while previously null. When a todo with subtasks receives progress, date, duration, or location changes, its own dates, duration, and progress are cleared (derived from subtasks), and setting progress to 0 or 100 on such a parent cascades that value to all subtasks. Side effects: setting progress to 100 emails assignees of dependent (successor) todos; a due-date change by a non-admin notifies project admins (subject to their notification settings); snoozeDate is stored per calling user, not on the shared todo.

Returns TodoMutationPayload with the updated todo, affected parentTodo and subtasks, and recalculated progress, slices, and boxes. Prefer moveTodos for relocating several todos at once and setProjectTodosProgresses for bulk progress updates.

updateTodoChecklist

Replaces a todo's checklist wholesale. checklist is the full desired list of items (title plus optional done flag); items have no ids and are stored positionally, so send every item you want to keep - omitted items are removed. The caller needs permission to update the todo. Checklists are available on standalone todos and on project todos; otherwise the mutation fails with not_allowed. Returns the updated Todo.

updateTodosDates

Bulk-updates start and due dates of todos in one project. Each todos item carries a todo id plus the new startDate and dueDate; both values are written exactly as given, so omitting one clears that date. Every id must be a todo of projectId that the caller is permitted to update (including the "only_my_work" restriction); a duplicate, unauthorized, or other-project id rejects the entire request with no changes.

Dependent (successor) todos are not rescheduled by this mutation, and unlike updateTodo it does not expand the project's date range; the project's late status is recalculated. Returns the todos that were actually updated.

viewedPosts

Records that the calling user has seen the Posts in ids, clearing their unread indicators. Receipts are per-user; already-viewed ids are skipped, so the call is idempotent, and there is no un-view operation. Returns the NothingToReturn placeholder — a non-error response means success.