POST
/
v1
/
organizations
/
folders
/
add
curl --request POST \
  --url https://api.velt.dev/v1/organizations/folders/add \
  --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 created successfully.",
    "data": {
      "yourFolderId": {
        "success": true,
        "id": "yourFolderId",
        "message": "Folder added."
      }
    }
  }
}

Use this API to create a new folder in an organization.

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/add

Headers

x-velt-api-key
string
required

Your API key.

x-velt-auth-token
string
required

Body

Params

data
object
required

Example Requests

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

Response

Success Response

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

Failure Response

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