Content - Folder (Connect API)

POST Create a folder.

POST /services/data/{apiVersion}/connect/cms/folders

Operation ID: createFolder. Tags: Folders.

Create a standard folder within a specified parent folder in your content workspace.

Parameters

  • apiVersion (path, string, required) The Salesforce API version.
  • Authorization (header, string, required) A unique, time-limited token that you can use to issue requests to Connect API. Replace YOUR_ACCESS_TOKEN with your authentication token.

    Example

    Bearer YOUR_ACCESS_TOKEN

Request body (required)

The folder to create.

Media type: application/json. Schema: FolderCreateRequest.

Example: createUnderParent Create a folder in a parent folder.

{
  "name": "Q4 Promotional Emails",
  "parentFolderId": "9PuSB000002KUDo0AO"
}

Responses

  • 201 The folder was created. The response contains the detailed folder representation, including the folder hierarchy and audit fields.

    Media type: application/json. Schema: ManagedContentSpaceFolderDetailRepresentation.

    Example: created A folder created in a parent folder.

    {
      "createdBy": "005SB00000eaki1YAA",
      "createdDate": "2026-07-30T15:04:32.000Z",
      "folderHierarchy": [
        {
          "folderType": "System",
          "id": "9PuSB000002aY6r0AE",
          "name": "Messaging Workspace_marketing",
          "parentFolderId": null
        }
      ],
      "folderType": "Standard",
      "id": "9PuSB000002yr570AA",
      "isShared": false,
      "lastModifiedBy": "005SB00000eaki1YAA",
      "lastModifiedDate": "2026-07-30T15:04:32.000Z",
      "name": "Q4 Promotional Emails",
      "parentFolderId": "9PuSB000002aY6r0AE"
    }
  • 400 The request is invalid because the name or parent folder is invalid, a folder with the same name exists in the parent folder, the folder nesting limit is reached, or you don't have access to manage the parent folder. Folder-level access errors return 400, not 403, because Connect API maps ResourceApiException responses to 400.

    Media type: application/json. Schema: ErrorList.

    Example: invalidName Invalid folder name.

    [
      {
        "errorCode": "INVALID_API_INPUT",
        "message": "Folder name is invalid"
      }
    ]

    Example: duplicateName Duplicate name in the parent folder.

    [
      {
        "errorCode": "DUPLICATE_VALUE",
        "message": "A folder with this name already exists under the parent folder"
      }
    ]

    Example: maxDepth Maximum folder nesting level reached.

    [
      {
        "errorCode": "LIMIT_EXCEEDED",
        "message": "Maximum folder nesting level reached"
      }
    ]

    Example: insufficientParentFolderAccess You can't manage the specified parent folder.

    [
      {
        "errorCode": "INSUFFICIENT_ACCESS",
        "message": "Insufficient permissions to manage this folder"
      }
    ]
  • 401 The request requires valid authentication credentials.

    Media type: application/json. Schema: ErrorList.

    Example: unauthorized Authentication credentials are missing or invalid.

    [
      {
        "errorCode": "UNAUTHORIZED",
        "message": "Authentication credentials are missing or invalid"
      }
    ]
  • 403 You don't have access to the managed content system. Connect API performs this organization-level or user-level access check before it evaluates folder-level access or request parameters.

    Media type: application/json. Schema: ErrorList.

    Example: managedContentUnavailable Managed content isn't enabled for the user.

    [
      {
        "errorCode": "INSUFFICIENT_ACCESS_OR_READONLY",
        "message": "This feature is not currently enabled for this user."
      }
    ]
  • 500 An internal server error occurred while the API processed the request.

    Media type: application/json. Schema: ErrorList.

    Example: internalServerError An unexpected error occurred.

    [
      {
        "errorCode": "INTERNAL_SERVER_ERROR",
        "message": "An unexpected error occurred while processing the request"
      }
    ]
  • 503 The service is temporarily unavailable. Try the request again later.

    Media type: application/json. Schema: ErrorList.

    Example: serviceUnavailable The service is temporarily unavailable.

    [
      {
        "errorCode": "SERVICE_UNAVAILABLE",
        "message": "The service is temporarily unavailable. Please try again later"
      }
    ]