> 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 # RemoveFormFromTrashBin # Package: forms # Namespace: FormSchemaService # Method link: https://dev.wix.com/docs/api-reference/crm/forms/form-schemas/remove-form-from-trash-bin.md ## Permission Scopes: Manage Challenges: SCOPE.CHALLENGES.MANAGE ## Introduction Removes a form schema from the trash bin, permanently deleting it. --- ## REST API ### Schema ``` Method: removeFormFromTrashBin Description: Removes a form schema from the trash bin, permanently deleting it. URL: https://www.wixapis.com/v4/forms/trash-bin/{formId} Method: DELETE # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: formId Method parameters: param name: formId | type: none | required: true Return type: RemoveFormFromTrashBinResponse EMPTY-OBJECT {} ``` ### Examples ### Remove Form From Trash Bin Permanently deletes form from trash bin ```curl curl -X DELETE \ 'https://www.wixapis.com/form-schema-service/v4/forms/trash-bin/c7dba23b-e0a6-4b01-8fdd-d06d34c0345d' \ -H 'Content-Type: application/json' \ -H 'Authorization: ' \ ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.forms.FormSchemaService.removeFormFromTrashBin(formId) Description: Removes a form schema from the trash bin, permanently deleting it. # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: formId Method parameters: param name: formId | type: string | description: GUID of the form schema to permanently delete from the trash bin. | required: true Return type: PROMISE EMPTY-OBJECT {} ``` ### Examples ### removeFormFromTrashBin ```javascript import { forms } from '@wix/forms'; async function removeFormFromTrashBin(formId) { const response = await forms.removeFormFromTrashBin(formId); }; ``` ### removeFormFromTrashBin (with elevated permissions) ```javascript import { forms } from '@wix/forms'; import { auth } from '@wix/essentials'; async function myRemoveFormFromTrashBinMethod(formId) { const elevatedRemoveFormFromTrashBin = auth.elevate(forms.removeFormFromTrashBin); const response = await elevatedRemoveFormFromTrashBin(formId); } ``` ### removeFormFromTrashBin (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 { forms } from '@wix/forms'; // Import the auth strategy for the relevant access type // Import the relevant host module if needed const myWixClient = createClient ({ modules: { forms }, // Include the auth strategy and host as relevant }); async function removeFormFromTrashBin(formId) { const response = await myWixClient.forms.removeFormFromTrashBin(formId); }; ``` ---