POST
/
v1
/
organizations
/
folders
/
update
curl --request POST \
  --url https://api.velt.dev/v1/organizations/folders/update \
  --header 'Content-Type: application/json' \
  --header 'x-velt-api-key: <x-velt-api-key>' \
  --header 'x-velt-auth-token: <x-velt-auth-token>' \
  --data '{
  "data": {
    "organizationId": "<string>",
    "folders": [
      {
        "folderId": "<string>",
        "folderName": "<string>",
        "parentFolderId": "<string>"
      }
    ]
  }
}'
{
   "result": {
       "status": "success",
       "message": "Folder Updated successfully.",
       "data": {
           "yourFolderId": {
               "success": true,
               "id": "yourFolderId",
               "message": "Folder Updated."
           }
       }
   }
}

Use this API to:

  1. update metadata of a folder within an organization.
  2. move a folder and its contents to a different parent folder.

Prior to using this API, you must:

  • Deploy v4.0.0-beta.19 or higher of the Velt SDK.
  • Enable advanced queries option in the console

Endpoint

POST https://api.velt.dev/v1/organizations/folders/update

Headers

x-velt-api-key
string
required

Your API key.

x-velt-auth-token
string
required

Body

Params

data
object
required

Example Request

{
  "data": {
    "organizationId": "yourOrganizationId",
    "folders": [
        {
          "folderId": "yourFolderId", 
          "folderName": "yourFolderName",
          "parentFolderId": "yourParentFolderId"
        }
    ]
  }
}

Response

Success Response

{
   "result": {
       "status": "success",
       "message": "Folder Updated successfully.",
       "data": {
           "yourFolderId": {
               "success": true,
               "id": "yourFolderId",
               "message": "Folder Updated."
           }
       }
   }
}

Failure Response

{
  "error": {
    "message": "ERROR_MESSAGE",
    "status": "INVALID_ARGUMENT"
  }
}
{
   "result": {
       "status": "success",
       "message": "Folder Updated successfully.",
       "data": {
           "yourFolderId": {
               "success": true,
               "id": "yourFolderId",
               "message": "Folder Updated."
           }
       }
   }
}