> 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: faqApp # Namespace: CategoryService # Method link: https://dev.wix.com/docs/api-reference/business-management/faq-app/category-v2/delete-category.md ## Permission Scopes: Manage FAQ: SCOPE.DC-LABS.MANAGE-FAQ ## Introduction Deletes a category. Deleting a category permanently removes it from the site's FAQ page. Questions that belong to the deleted category are also deleted. --- ## REST API ### Schema ``` Method: deleteCategory Description: Deletes a category. Deleting a category permanently removes it from the site's FAQ page. Questions that belong to the deleted category are also deleted. URL: https://www.wixapis.com/faq/v2/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 --request DELETE \ --url https://www.wixapis.com/faq/v2/categories/a1b2c3d4-e5f6-7890-abcd-ef1234567890 \ --header 'Authorization: ' \ --header 'Content-Type: application/json' ~~~ ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.faqApp.CategoryService.deleteCategory(categoryId) Description: Deletes a category. Deleting a category permanently removes it from the site's FAQ page. Questions that belong to the deleted category are also deleted. # 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: GUID of the category to delete. | required: true Return type: PROMISE EMPTY-OBJECT {} ``` ### Examples ### deleteCategory ```javascript import { category } from '@wix/faq'; async function deleteCategory(categoryId) { const response = await category.deleteCategory(categoryId); }; ``` ### deleteCategory (with elevated permissions) ```javascript import { category } from '@wix/faq'; import { auth } from '@wix/essentials'; async function myDeleteCategoryMethod(categoryId) { const elevatedDeleteCategory = auth.elevate(category.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 { category } from '@wix/faq'; // Import the auth strategy for the relevant access type // Import the relevant host module if needed const myWixClient = createClient ({ modules: { category }, // Include the auth strategy and host as relevant }); async function deleteCategory(categoryId) { const response = await myWixClient.category.deleteCategory(categoryId); }; ``` ---