I need to create a DocumentSet in the Hostweb from inside the App.

I have tried this:

    var info = {
        __metadata: { 'type': 'SP.DocumentSet' },
        AllowContentTypes: true,
        ContentTypesEnabled: true,
        ContentTypeID: '0x0120D520',
        Description: 'new documentset',
        Title: 'new documentset',

        url: appweburl + "/_api/SP.AppContextSite(@target)/web/getFolderByServerRelativeUrl('/Shared Documents')?@target='" + hostweburl + "'",
        type: "POST",
        data: JSON.stringify(
                'parameters': info
        headers: {
            "X-HTTP-Method": "POST",
            "accept": "application/json;odata=verbose",
            "content-type": "application/json;odata=verbose",
            "X-RequestDigest": $("#__REQUESTDIGEST").val()
        success: function (site) {
        error: function (error) {

With no success, any suggestion?


it does not seem possible to create Document Set using SharePoint 2013 REST API since SP.DocumentSet.DocumentSet.create function is not accessible via REST. But you could utilize SharePoint 2010 REST API instead for that purpose.

Is it possible to create a Document Set using REST API

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.