Create Folder

Create Folder

To create a folder in Box you will need to provide our API with a name for the new folder, as well as the id of the parent folder that you would like to create the new folder within.

curl -i -X POST "" \
     -H "Authorization: Bearer <ACCESS_TOKEN>" \
     -H "Content-Type: application/json" \
     -d '{
       "name": "New Folder",
       "parent": {
         "id": "0"
BoxFolder parentFolder = new BoxFolder(api, "id");
BoxFolder.Info childFolderInfo = parentFolder.createFolder("Child Folder Name");
subfolder = client.folder('0').create_subfolder('My Stuff')
print('Created subfolder with ID {0}'.format(
client.folders.create(name: "New Folder", parentId: "22222") { (result: Result<Folder, BoxSDKError>) in
    guard case let .success(folder) = result else {
        print("Error creating folder")

    print("Created folder \"\(\" inside of folder \"\(\"")

Name restrictions

There are some restrictions to the file name. Names containing non-printable ASCII characters, forward and backward slashes (/, \), as well as names with trailing spaces are prohibited.

Additionally, the names . and .. are reserved names and therefore also prohibited.