Create, update, delete and query categories(folders) in Content Builder.
Table Specific Information
Select all categories:
SELECT * FROM Categories
Retrieve all categories which have a specific ParentId:
SELECT * FROM Categories WHERE ParentId=71839
Retrieve a specific category:
SELECT * FROM Categories WHERE Id=94766
All the columns except SharedWith and SharingType can be sorted server side:
SELECT * FROM Categories ORDER BY Name ASC
To create a Category, you will need to specify at least the Name and ParentId column.
INSERT INTO Categories(Name,ParentId,categoryType) VALUES('New New New Folder',71839,'asset')
Categories may be modified by providing the Id of the category and issuing an UPDATE statement.
Update Categories SET SharedWith='333,555,888', SharingType='edit', EnterpriseId=12345 WHERE Id=71839
Categories may be deleted by providing the Id of the category and issuing a DELETE statement.
DELETE FROM Categories WHERE Id=94843
The Id of the category(folder) in Content Builder.
Name of the category.
ID of the parent category.
The type of category, either asset or asset-shared, which is automatically set to the CategoryType of the parent category. If set to asset-shared, include the SharingProperties in the call.
ID of the enterprise this business unit belongs to.
ID of the member who creates the category.
List of up to 100 MID IDs the category is shared with. To share the category with all business units in the enterprise, and if your account has access to Content Builder Across Enterprise Sharing, set this to 0. SharedWith cannot contain 0 and other MIDs simultaneously. Since shared categories live in and are owned by the enterprise business unit, don't include the enterprise business unit in the SharedWith property.
Indicates the permission that you are granting to the list of MIDs in sharedWith. The only possible value for categories is edit.
The allowed values are edit.
Description of the category.