Magidoc

createProject
Mutation

Creates a new project in a workspace with comprehensive configuration options.

This is the primary mutation for project creation, supporting both basic project setup and advanced features like copying from existing projects, custom fields, etc.

Access: Requires user access to the workspace

Returns: The newly created Project object with all computed fields

Errors:

  • Throws error if user doesn't have access to the workspace
  • Throws error if copyFrom project doesn't exist or user lacks access
  • Throws error if endDate is before startDate
  • Throws error if members don't have workspace access

Arguments

#

workspace

ID !
Non-null

The workspace ID where the project will be created

name

The name of the project

archived

Whether the project should be archived

actionDateSync

Whether action dates should sync with project dates

attachments

File attachments to add to the project

autoCompleteParent

Whether to auto-complete parent when all children complete

automationWorkflows

Automation workflow IDs to apply

color

Hex color code for the project

copyActionStatuses

Copy action statuses when copying from another project

copyApprovals

Copy approval settings when copying from another project

copyAssignees

Copy assignees when copying from another project

copyAppWorkflows

Copy app workflows when copying from another project

copyActionDates

Copy action dates when copying from another project

copyAttachments

Set false when copying from another project to drop the source attachments its copied child projects carry. The new project's own attachments always come from the attachments argument. Defaults to true.

copyCustomFields

Copy project and action custom fields when copying from another project. Defaults to true.

copyProjectChildren

Copy child projects when copying from another project

copyFrom

Project ID to copy settings and structure from

description

Project description in HTML format

startDate

Project start date

endDate

Project end date

ganttGroupBy

How to group items in Gantt view

hiddenApps

App names to hide for this project

hideActionsForExternal

Whether the client mode is enabled

hideActionsForExternalByDefault

Whether to hide actions from external users by default (when client mode is enabled)

isDraftMode

Whether the project is in draft mode

labels

[ID !]

Label IDs to apply to the project

members

[ID !]

User IDs to add as project members

readOnlyMembers

[ID !]

Member IDs that retain view-only access

readOnlyTeams

[ID !]

Team IDs that retain view-only access

externalMembersIds

[ID !]

Workspace external collaborators to retain when sharing with everyone

parentProject

Parent project ID if this is a sub-project

copyParentAccess

Copy the parent's current access when creating a blank child project. Later changes do not sync. Requires access to a regular parent in the same workspace.

destination

Destination ID for project organization

permissions

Custom permission settings for the project

phases

Project phases to create

pinActionView

Whether to pin the default action view

resourcePlaceholderIds

[ID !]

Resource placeholder IDs to assign

sharingType

Project sharing type

showKanbanViewSubactions

How to display sub-actions in Kanban view

showCompletedSubactionsByDefault

Whether to show completed sub-actions by default

showRootActionCustomFields

Default sort type for project actions

showRootProjectCustomFields

showProjCustomFieldsOnActions

Show project custom fields on action cards in this project

sortType

teams

[ID !]

Team IDs to give access to the project

viewType

Default view type (list, kanban, gantt, etc.)

layout

Default layout; takes precedence over legacy viewType and listTitle

listTitle

Grouping for listView: assignees for Team, labels for Label.

template

Whether this project is a template

copyUserPermissions

Copy user permissions when copying from another project

customFieldsToCreate

Custom field definitions to create for this project

notifyProjectMembers

Whether to send notifications to project members

projCustomFields

Custom field values to set on the project

isAutomated

Whether this project creation is automated

ganttAutoScheduling

Auto-scheduling mode for Gantt view

projectStatuses

Custom project status names

harvestProjectId

Harvest project ID to link for time tracking

clientAccountId

CRM account this project is for, in the same workspace. Null creates it with none. When omitted, a duplicate keeps its source's client and a project made from or saved as a template gets none. Child projects copied with it keep their own sources' clients.

scheduleAnchor

When copyActionDates is true, anchor copied action dates to the new project start or end date using the earliest or latest copied action date when copying from a template. Ignored when copyActionDates is false.

Response

#

Returns Project .

Example

#