> 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 # DeleteCustomEmbed # Package: customEmbeds # Namespace: CustomEmbedsService # Method link: https://dev.wix.com/docs/api-reference/business-management/custom-embeds/delete-custom-embed.md ## Permission Scopes: SCOPE.EDITOR.MANAGE_CUSTOM_EMBEDS: SCOPE.EDITOR.MANAGE_CUSTOM_EMBEDS ## Introduction Permanently deletes a custom embed. --- ## REST API ### Schema ``` Method: deleteCustomEmbed Description: Permanently deletes a custom embed. URL: https://www.wixapis.com/embeds/v1/custom-embeds/{customEmbedId} Method: DELETE # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: customEmbedId Method parameters: param name: customEmbedId | type: none | required: true Return type: DeleteCustomEmbedResponse EMPTY-OBJECT {} Possible Errors: HTTP Code: 404 | Status Code: NOT_FOUND | Application Code: CUSTOM_EMBED_NOT_FOUND | Description: Couldn't find the custom embed. ``` ### Examples ### Delete Custom Embed ```curl curl -X DELETE \ 'https://www.wixapis.com/embeds/v1/custom-embeds/8046df3c-7575-4098-a5ab-c91ad8f33c47' \ -H 'Authorization: ' ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.customEmbeds.CustomEmbedsService.deleteCustomEmbed(customEmbedId) Description: Permanently deletes a custom embed. # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: customEmbedId Method parameters: param name: customEmbedId | type: string | description: Custom embed GUID to delete. | required: true Return type: PROMISE EMPTY-OBJECT {} Possible Errors: HTTP Code: 404 | Status Code: NOT_FOUND | Application Code: CUSTOM_EMBED_NOT_FOUND | Description: Couldn't find the custom embed. ``` ### Examples ### deleteCustomEmbed ```javascript import { customEmbeds } from '@wix/embeds'; async function deleteCustomEmbed(customEmbedId) { const response = await customEmbeds.deleteCustomEmbed(customEmbedId); }; ``` ### deleteCustomEmbed (with elevated permissions) ```javascript import { customEmbeds } from '@wix/embeds'; import { auth } from '@wix/essentials'; async function myDeleteCustomEmbedMethod(customEmbedId) { const elevatedDeleteCustomEmbed = auth.elevate(customEmbeds.deleteCustomEmbed); const response = await elevatedDeleteCustomEmbed(customEmbedId); } ``` ### deleteCustomEmbed (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 { customEmbeds } from '@wix/embeds'; // Import the auth strategy for the relevant access type // Import the relevant host module if needed const myWixClient = createClient ({ modules: { customEmbeds }, // Include the auth strategy and host as relevant }); async function deleteCustomEmbed(customEmbedId) { const response = await myWixClient.customEmbeds.deleteCustomEmbed(customEmbedId); }; ``` ---