All Products
Document Center


Last Updated: Mar 04, 2019


You can call this operation to create a video category. You can create a maximum of three category levels and up to 100 subcategories in each category.

Request parameters

ActionStringYesThe operation that you want to perform. Set the value to AddCategory.
CateNameStringYesThe category name.
  • Length constraint: Maximum length of 64 bytes.
  • Encoding: UTF-8.
ParentIdLongNoThe parent category ID.
If you do not set this parameter, a level-1 category is generated by default. The root node category ID is -1.

Response parameters

RequestId String The GUID generated by Alibaba Cloud for the request.
CategoryCategory The video category information.


Sample requests

  1.<Common request parameters>

Note: For more information about common request parameters, see Common parameters.

Sample responses

JSON format

  1. {
  2. "RequestId": "25818875-5F78-4A13-BEF6-D7393642CA58",
  3. "Category": {
  4. "CateId": 67788823,
  5. "CateName": "exampleCategory",
  6. "ParentId": -1,
  7. "Level": 0
  8. }
  9. }

Error codes

The following table lists the error codes that this operation can return. For more information, see Error codes.

Error codeError messageHTTP status codeDescription
LevelExceededMaxThe level of categories exceeded maximum.400The error message returned when the levels of categories exceed the upper limit.
SubTotalExceededMaxThe total of sub categories exceeded maximum.400The error message returned when the number of subcategories exceeds the upper limit.
InvalidCateId.NotFoundThe CateId not exist.404The error message returned when the specified parent category ID does not exist.