Skip to content
SynupAPI
Get an API key
POSTapi.synup.com/api/v4/folders/create

Create a new folder

This API creates a new folder to help organize locations within an account. The folder name must be unique across the account.

If a parent folder ID (parentFolder) or parent folder name (parentFolderName) is not provided, the folder will be created under the root folder.

Folders support a hierarchical structure, allowing subfolders to be organized within parent folders.

Requires an API key. Send it as Authorization: API <your-key> — see Getting started.

Parameters

Headers

NameTypeRequiredDescription
Content-Typestringoptional

Body

NameTypeRequiredDescription
inputobjectrequired
input.namestringrequiredUnique name for the folder
input.parentFolderNamestringoptionalName of the parent folder (optional)
input.parentFolderstringoptionalUUID of the parent folder (optional)

Request

Request
curl -X POST 'https://api.synup.com/api/v4/folders/create' \
  -H 'Authorization: API YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "input": {
    "name": "franchise",
    "parentFolderName": "all_franchise"
  }
}'

Responses

StatusDescription
200Folder created successfully
Example response (generated from the schema)
{
  "data": {
    "createFolder": {
      "clientMutationId": "string",
      "errors": [
        {
          "message": "string",
          "code": "string",
          "contextInfo": [
            {
              "key": null,
              "value": null
            }
          ]
        }
      ],
      "folder": {
        "accountId": 0,
        "archived": true,
        "createdAt": "string",
        "id": "string",
        "locationCount": 0,
        "name": "string",
        "root": true
      },
      "success": true
    }
  }
}

Response body

NameTypeRequiredDescription
dataobjectoptional
data.createFolderobjectoptional
data.createFolder.clientMutationIdstringoptional
data.createFolder.errorsarray of objectoptional
data.createFolder.errors[].messagestringoptional
data.createFolder.errors[].codestringoptional
data.createFolder.errors[].contextInfoarray of objectoptional
data.createFolder.errors[].contextInfo[].keystringoptional
data.createFolder.errors[].contextInfo[].valuestringoptional
data.createFolder.folderobjectoptional
data.createFolder.folder.accountIdintegeroptionalID of the account owning this folder
data.createFolder.folder.archivedbooleanoptionalWhether the folder is archived
data.createFolder.folder.createdAtstringoptionalUTC timestamp of folder creation
data.createFolder.folder.idstringoptionalUnique identifier (UUID) of the folder
data.createFolder.folder.locationCountintegeroptionalNumber of locations in this folder
data.createFolder.folder.namestringoptionalName of the folder
data.createFolder.folder.rootbooleanoptionalWhether this is the root folder
data.createFolder.successbooleanoptional