> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt # DeleteCategory # Package: blog # Namespace: CategoryService # Method link: https://dev.wix.com/docs/api-reference/business-solutions/blog/category/delete-category.md ## Permission Scopes: Manage Blog: SCOPE.DC-BLOG.MANAGE-BLOG ## Introduction Deletes a category. --- ## REST API ### Schema ``` Method: deleteCategory Description: Deletes a category. URL: https://www.wixapis.com/blog/v3/categories/{categoryId} Method: DELETE # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: categoryId Method parameters: param name: categoryId | type: none | required: true Return type: DeleteCategoryResponse EMPTY-OBJECT {} ``` ### Examples ### DeleteCategory ```curl ~~~cURL curl --location --request DELETE 'https://www.wixapis.com/blog/v3/categories/5f2bcaa0879ad500173577f3' \ -H 'Content-Type: application/json' \ -H 'Authorization: ' \ }' ~~~ ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.blog.CategoryService.deleteCategory(categoryId) Description: Deletes a category. # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: categoryId Method parameters: param name: categoryId | type: string | description: Category GUID. | required: true Return type: PROMISE EMPTY-OBJECT {} ``` ### Examples ### deleteCategory ```javascript import { categories } from '@wix/blog'; async function deleteCategory(categoryId) { const response = await categories.deleteCategory(categoryId); }; ``` ### deleteCategory (with elevated permissions) ```javascript import { categories } from '@wix/blog'; import { auth } from '@wix/essentials'; async function myDeleteCategoryMethod(categoryId) { const elevatedDeleteCategory = auth.elevate(categories.deleteCategory); const response = await elevatedDeleteCategory(categoryId); } ``` ### deleteCategory (self-hosted) Self-hosted SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md). ```javascript import { createClient } from '@wix/sdk'; import { categories } from '@wix/blog'; // Import the auth strategy for the relevant access type // Import the relevant host module if needed const myWixClient = createClient ({ modules: { categories }, // Include the auth strategy and host as relevant }); async function deleteCategory(categoryId) { const response = await myWixClient.categories.deleteCategory(categoryId); }; ``` ---