To list all templates available in the company, you can use the List Templates
query:
query ProjectList {
projectList(
filter: {
search: ""
isTemplate: true
companyIds: ["company-id"]
}
sort: [position_DESC]
take: 20
skip: null
) {
items {
id
slug
name
description
accessLevel
archived
createdAt
color
updatedAt
todoListsMaxPosition
unseenActivityCount
totalFileCount
totalFileSize
position
category
isTemplate
isOfficialTemplate
hideEmailFromRoles
hideStatusUpdate
hideRecordCount
icon
todoAlias
allowNotification
image {
id
thumbnail
small
}
}
pageInfo {
hasNextPage
totalItems
}
totalCount
}
}
## Create from a Template
To create a project from an existing template, you can add an optional `templateId` to the mutation.
```graphql
mutation {
createProject(
input: {
templateId: "YOUR TEMPLATE ID OR SLUG"
name: "YOUR PROJECT NEW NAME"
companyId: "YOUR COMPANY ID OR SLUG"
}
) {
id
}
}