> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> 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`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - 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.  | validation: minimum 0, maximum 100, format int32
        - 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.  | validation: maxLength 16000
 Return type: ListCustomEmbedsResponse
  - name: customEmbeds | type: array<CustomEmbed> | description: List of custom embeds.  
     - name: id | type: string | description: Custom embed GUID.  | read-only: true | validation: format 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.  | read-only: true | validation: format int64
     - name: name | type: string | description: Custom embed name, as displayed to Wix users.  | validation: minLength 1, maxLength 100
     - 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.  | validation: format HOSTNAME
     - 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  | validation: maxLength 15000
     - name: pageFilter | type: PageFilter | description: Page GUIDs where the custom embed should be loaded. By default, custom embeds are applied to all site pages.  | read-only: true 
        - name: pageIds | type: array<string> | description: Pages where the site embed will be loaded.  | validation: maxItems 100, minLength 0, maxLength 50
  - name: pagingMetadata | type: CursorPagingMetadata | description: Pagination metadata.  
     - name: count | type: integer | description: Number of items returned in current page.  | validation: format int32
     - 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.  | validation: maxLength 16000
        - name: prev | type: string | description: Cursor pointing to the previous page in the list of results.  | validation: maxLength 16000
     - 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: <AUTH>'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.embeds.customEmbeds.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.  | validation: minimum 0, maximum 100, format int32
           - 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.  | validation: maxLength 16000
 Return type: PROMISE<ListCustomEmbedsResponse>
  - name: customEmbeds | type: array<CustomEmbed> | description: List of custom embeds.  
     - name: _id | type: string | description: Custom embed GUID.  | read-only: true | validation: format 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.  | read-only: true | validation: format int64
     - name: name | type: string | description: Custom embed name, as displayed to Wix users.  | validation: minLength 1, maxLength 100
     - 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.  | validation: format HOSTNAME
     - 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  | validation: maxLength 15000
     - name: pageFilter | type: PageFilter | description: Page GUIDs where the custom embed should be loaded. By default, custom embeds are applied to all site pages.  | read-only: true 
        - name: pageIds | type: array<string> | description: Pages where the site embed will be loaded.  | validation: maxItems 100, minLength 0, maxLength 50
  - name: pagingMetadata | type: CursorPagingMetadata | description: Pagination metadata.  
     - name: count | type: integer | description: Number of items returned in current page.  | validation: format int32
     - 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.  | validation: maxLength 16000
        - name: prev | type: string | description: Cursor pointing to the previous page in the list of results.  | validation: maxLength 16000
     - 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-managed)
Self-managed 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);
};
```

---