POST

Create Category


Creates a category.

Authentication

You can only call this method when authenticated as a Wix app or Wix user identity.

Permissions
Manage Blog
Learn more about app permissions.
Endpoint
POST
https://www.wixapis.com/blog/v3/categories

Body Params
categoryCategoryRequired

Category info.


fieldsetsArray <string>maxItems 10

List of additional category fields to include in the response. For example, use the URL fieldset to retrieve the url field in the response in addition to the category’s base fields. Base fields don’t include any of the supported fieldset values. By default only the category’s base fields are returned.

Response Object
categoryCategory

Category info.

Create Category Example 1
Request
cURL
curl --location --request POST 'https://www.wixapis.com/blog/v3/categories' \ -H 'Content-Type: application/json' \ -H 'Authorization: <AUTH>' \ --data-raw '{ "category": { "label": "Summer", "description": "Posts about my summer", "title": "Summer", "displayPosition": 1, "language": "en", "slug": "summer-slug" }, "fieldsets": ["URL"] }'
Response
JSON
{ "category": { "id": "5f2bcaa0879ad500173577f3", "label": "Summer", "postCount": 0, "url": { "base": "https://some-user.wixsite.com/my-site", "path": "/blog/categories/summer-slug" }, "description": "Posts about my summer", "title": "Summer", "coverMedia": { "enabled": true, "displayed": true, "custom": true }, "displayPosition": 1, "language": "en", "slug": "summer-slug" } }
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Event TriggersThis method triggers the following events:
Did this help?