Creating folders
How to create a regular or shared folder with the organization
Creating a regular folder
The mutation to create a folder in the authenticated user’s account (owner of the API token) is:
mutation CreateFolderMutation($folder: FolderInput!) {
createFolder(folder: $folder) {
id
name
type
created_at
}
}Define the variable values:
{
"folder": {
"name": "Signed contracts"
}
}And testing this mutation in Altair:

Creating a shared folder
Compared to the mutation used to create folders, the only difference is the type parameter. So, by reusing almost the same mutation, just include the parameter:
mutation SharedFolderMutation(
$folder: FolderInput!,
$type: FolderTypeEnum
) {
createFolder(folder: $folder, type: $type) {
id
name
type
created_at
}
}And this time, by setting the value of the type parameter to ORGANIZATION:
{
"folder": {
"name": "Shared contracts"
},
"type": "ORGANIZATION"
}Then test it in Altair like this:

Last updated
Was this helpful?