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

Rename a folder

This API updates the name of an existing folder to a new name.

Important Notes:

  • The new folder name must be unique within your account.
  • Root folders cannot be renamed.
  • The folder being renamed must exist in your account.
  • Special characters in the new name will be converted to underscores (_).
Requires an API key. Send it as Authorization: API <your-key> — see Getting started.

Parameters

Body

NameTypeRequiredDescription
inputobjectoptional
input.namestringrequiredThe new name for the folder
input.oldNamestringrequiredThe current name of the folder to be renamed

Request

Request
curl -X POST 'https://api.synup.com/api/v4/locations/folders/rename' \
  -H 'Authorization: API YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '""'

Responses

StatusDescription
200Successfully renamed the folder
400Bad request - invalid input parameters
404Folder not found
409New folder name already exists
Example response
{
  "data": {
    "renameFolder": {
      "clientMutationId": null,
      "errors": null,
      "folder": {
        "accountId": 16154,
        "archived": false,
        "createdAt": "2025-02-02 15:27:00 UTC",
        "id": "098ba54d-3659-46fa-9c17-4af4329ce421",
        "locationCount": null,
        "name": "2feb2025855pm_2",
        "root": false
      },
      "success": true
    }
  }
}

Response body

NameTypeRequiredDescription
dataobjectoptional
data.renameFolderobjectoptional
data.renameFolder.errorsarray of stringoptionalArray of error messages if the operation failed
data.renameFolder.folderobjectoptional
data.renameFolder.folder.accountIdintegerrequiredID of the account that owns the folder
data.renameFolder.folder.archivedbooleanrequiredIndicates if the folder is archived
data.renameFolder.folder.idstringrequiredUnique identifier of the folder
data.renameFolder.folder.namestringrequiredThe new name of the folder
data.renameFolder.folder.rootbooleanrequiredIndicates if this is a root folder