> 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 # ListCustomEmbeds # Package: customEmbeds # Namespace: CustomEmbedsService # Method link: https://dev.wix.com/docs/api-reference/business-management/custom-embeds/list-custom-embeds.md ## Permission Scopes: SCOPE.EDITOR.MANAGE_CUSTOM_EMBEDS: SCOPE.EDITOR.MANAGE_CUSTOM_EMBEDS ## Introduction Retrieves a list of up to 100 custom embeds, sorted by position (`HEAD`, `BODY_START` or `BODY_END`). --- ## REST API ### Schema ``` Method: listCustomEmbeds Description: Retrieves a list of up to 100 custom embeds, sorted by position (`HEAD`, `BODY_START` or `BODY_END`). URL: https://www.wixapis.com/embeds/v1/custom-embeds Method: GET Method parameters: param name: paging | type: CursorPaging - name: limit | type: integer | description: Maximum number of items to return in the results. - name: cursor | type: string | description: Pointer to the next or previous page in the list of results. Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response. Not relevant for the first request. Return type: ListCustomEmbedsResponse - name: customEmbeds | type: array | description: List of custom embeds. - name: id | type: string | description: Custom embed GUID. - name: revision | type: string | description: Revision number, which increments by 1 each time the custom embed is updated. To prevent conflicting changes, the current revision must be passed when updating a custom embed. - name: name | type: string | description: Custom embed name, as displayed to Wix users. - name: enabled | type: boolean | description: Whether the custom embed is enabled on the site. Default: `true`. - name: loadOnce | type: boolean | description: Whether to load the custom embed once during initial site rendering, rather than on each page navigation. This setting affects performance and should be chosen based on the embed's functionality. Default: `true`. - name: domain | type: string | description: Site domain that's connected to the site, if relevant. - name: position | type: PositionOnPage | description: Position where the custom embed code is placed on the page. - enum: - UNKNOWN_POSITION: Illegal value, exception will be thrown if used - HEAD: HEAD position - BODY_START: BODY_START position - BODY_END: BODY_END position - name: embedData | type: CustomEmbed | description: Custom embed data. - name: category | type: Category | description: CustomEmbed's category - enum: - UNKNOWN_CATEGORY: Illegal type, exception will be thrown if used - ESSENTIAL: Essential category - FUNCTIONAL: Functional category - ANALYTICS: Analytics category - ADVERTISING: Advertising category - DATA_TO_THIRD_PARTY: Data to third party category - name: html | type: string | description: CustomEmbed's html - name: pageFilter | type: PageFilter | description: Page GUIDs where the custom embed should be loaded. By default, custom embeds are applied to all site pages. - name: pageIds | type: array | description: Pages where the site embed will be loaded. - name: pagingMetadata | type: CursorPagingMetadata | description: Pagination metadata. - name: count | type: integer | description: Number of items returned in current page. - name: cursors | type: Cursors | description: Cursor strings that point to the next page, previous page, or both. - name: next | type: string | description: Cursor string pointing to the next page in the list of results. - name: prev | type: string | description: Cursor pointing to the previous page in the list of results. - name: hasNext | type: boolean | description: Whether there are more pages to retrieve following the current page. + `true`: Another page of results can be retrieved. + `false`: This is the last page. ``` ### Examples ### List Custom Embeds ```curl curl -X GET \ 'https://www.wixapis.com/embeds/v1/custom-embeds' \ -H 'Authorization: ' ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.customEmbeds.CustomEmbedsService.listCustomEmbeds(options) Description: Retrieves a list of up to 100 custom embeds, sorted by position (`HEAD`, `BODY_START` or `BODY_END`). Method parameters: param name: options | type: ListCustomEmbedsOptions none - name: paging | type: CursorPaging | description: Pagination options. - name: limit | type: integer | description: Maximum number of items to return in the results. - name: cursor | type: string | description: Pointer to the next or previous page in the list of results. Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response. Not relevant for the first request. Return type: PROMISE - name: customEmbeds | type: array | description: List of custom embeds. - name: _id | type: string | description: Custom embed GUID. - name: revision | type: string | description: Revision number, which increments by 1 each time the custom embed is updated. To prevent conflicting changes, the current revision must be passed when updating a custom embed. - name: name | type: string | description: Custom embed name, as displayed to Wix users. - name: enabled | type: boolean | description: Whether the custom embed is enabled on the site. Default: `true`. - name: loadOnce | type: boolean | description: Whether to load the custom embed once during initial site rendering, rather than on each page navigation. This setting affects performance and should be chosen based on the embed's functionality. Default: `true`. - name: domain | type: string | description: Site domain that's connected to the site, if relevant. - name: position | type: PositionOnPage | description: Position where the custom embed code is placed on the page. - enum: - UNKNOWN_POSITION: Illegal value, exception will be thrown if used - HEAD: HEAD position - BODY_START: BODY_START position - BODY_END: BODY_END position - name: embedData | type: CustomEmbed | description: Custom embed data. - name: category | type: Category | description: CustomEmbed's category - enum: - UNKNOWN_CATEGORY: Illegal type, exception will be thrown if used - ESSENTIAL: Essential category - FUNCTIONAL: Functional category - ANALYTICS: Analytics category - ADVERTISING: Advertising category - DATA_TO_THIRD_PARTY: Data to third party category - name: html | type: string | description: CustomEmbed's html - name: pageFilter | type: PageFilter | description: Page GUIDs where the custom embed should be loaded. By default, custom embeds are applied to all site pages. - name: pageIds | type: array | description: Pages where the site embed will be loaded. - name: pagingMetadata | type: CursorPagingMetadata | description: Pagination metadata. - name: count | type: integer | description: Number of items returned in current page. - name: cursors | type: Cursors | description: Cursor strings that point to the next page, previous page, or both. - name: next | type: string | description: Cursor string pointing to the next page in the list of results. - name: prev | type: string | description: Cursor pointing to the previous page in the list of results. - name: hasNext | type: boolean | description: Whether there are more pages to retrieve following the current page. + `true`: Another page of results can be retrieved. + `false`: This is the last page. ``` ### Examples ### listCustomEmbeds ```javascript import { customEmbeds } from '@wix/embeds'; async function listCustomEmbeds(options) { const response = await customEmbeds.listCustomEmbeds(options); }; ``` ### listCustomEmbeds (with elevated permissions) ```javascript import { customEmbeds } from '@wix/embeds'; import { auth } from '@wix/essentials'; async function myListCustomEmbedsMethod(options) { const elevatedListCustomEmbeds = auth.elevate(customEmbeds.listCustomEmbeds); const response = await elevatedListCustomEmbeds(options); } ``` ### listCustomEmbeds (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 listCustomEmbeds(options) { const response = await myWixClient.customEmbeds.listCustomEmbeds(options); }; ``` ---