0

I want to create a folder inside "Communications" document library in below site using rest api.

https://contoso.sharepoint.com/sites/SP

Can you please assist on how to do that?

1 Answer 1

2

You need to use the Folders endpoint something like below:

_spPageContextInfo.siteAbsoluteUrl + "/_api/Web/Folders/add('Communications/NewFolderName')"

Note: You need to pass the ServerRelativeUrl inside the add method.

Official documentation: Working with folders by using REST.

Similar question: Creating Folder using REST and JavaScript

2
  • Thanks @Ganesh i am able to create a folder but now i want to create a new folder inside a pre-existing folder of a list. How i can achieve that? Commented Dec 3, 2019 at 11:20
  • You need pass the ServerRelativeUrl of the existing folder in add. Commented Dec 3, 2019 at 11:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.