> 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

# QueryEmailDesignThemes

# Package: emails

# Namespace: EmailDesignThemesService

# Method link: https://dev.wix.com/docs/api-reference/business-management/marketing/emails/email-design-theme/query-email-design-themes.md

## Permission Scopes:
Read Email Marketing: SCOPE.DC-PROMOTE.READ-EMAIL-MARKETING

## Introduction

Retrieves a list of up to 100 email design themes, given the provided paging, filtering, and sorting.

Query Email Design Themes runs with these defaults, which you can override:

- `id` is sorted in `ASC` order
- `cursorPaging.limit` is `50`

Supported filter fields: `id` (`$eq`, `$ne`, `$in`), `title`, `createdDate`, `updatedDate`,
and `tags` (all applicable operators). You can sort by `id`, `title`, `createdDate`, and
`updatedDate`. Filtering or sorting by any other field, including anything inside `body`,
fails validation.

To learn about working with Query methods, see [API Query Language](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language.md),
[Sorting and Paging](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-sorting-and-paging.md),
and [Field Projection](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-field-projection.md).

---

## REST API

### Schema

```
 Method: queryEmailDesignThemes
 Description: Retrieves a list of up to 100 email design themes, given the provided paging, filtering, and sorting.  Query Email Design Themes runs with these defaults, which you can override:  - `id` is sorted in `ASC` order - `cursorPaging.limit` is `50`  Supported filter fields: `id` (`$eq`, `$ne`, `$in`), `title`, `createdDate`, `updatedDate`, and `tags` (all applicable operators). You can sort by `id`, `title`, `createdDate`, and `updatedDate`. Filtering or sorting by any other field, including anything inside `body`, fails validation.  To learn about working with Query methods, see [API Query Language](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language.md), [Sorting and Paging](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-sorting-and-paging.md), and [Field Projection](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-field-projection.md).
 URL: https://www.wixapis.com/emails/themes/v1/email-design-themes/query
 Method: POST
 Method parameters:
   param name: query | type: CursorQuery    
     - name: cursorPaging | type: CursorPaging | description: Cursor paging options. See [Sorting and Paging](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-sorting-and-paging.md) for more information.  
        - name: limit | type: integer | description: Maximum number of items to return in the results.  Default: `50`  | 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
        - name: filter | type: object | description: Filter object. See [API Query Language](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language.md) for more information.  
        - name: sort | type: array<Sorting> | description: Sort object. See [Sorting and Paging](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-sorting-and-paging.md) for more information.  | validation: maxItems 5
           - name: fieldName | type: string | description: Field to sort by.  Supported properties: `id`, `title`, `createdDate`, `updatedDate`  | validation: maxLength 512
           - name: order | type: SortOrder | description: Sort order. Use `ASC` for ascending order or `DESC` for descending order.  Default: `ASC`  
                 - enum: ASC, DESC
 Query fields:
   - field: id | operators: $eq, $ne, $in | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: title | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte, $startsWith | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: createdDate | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: updatedDate | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: tags | operators: $exists | sort: none | aggregatable: undefined | searchable: undefined
 Return type: QueryEmailDesignThemesResponse
  - name: emailDesignThemes | type: array<EmailDesignTheme> | description: Retrieved email design themes.  | validation: maxItems 100
     - name: id | type: string | description: Email design theme GUID.  | read-only: true | validation: format GUID
     - name: createdDate | type: string | description: Date and time the email design theme was created.  | read-only: true | validation: format date-time
     - name: updatedDate | type: string | description: Date and time the email design theme was updated.  | read-only: true | validation: format date-time
     - name: revision | type: string | description: Revision number, which increments by 1 each time the email design theme is updated. To prevent conflicting changes, the current revision must be passed when updating the email design theme.  Ignored when creating an email design theme.  | read-only: true | validation: format int64
     - name: title | type: string | description: Email design theme title. Titles aren't unique, so a site can have multiple email design themes with the same title. To help site owners tell them apart, display additional context alongside the title, such as the date the email design theme was last updated.  | validation: minLength 1, maxLength 200
     - name: body | type: object | description: Styling definition of the email design theme, as a free-form JSON object. Its structure is defined by the Wix email editor. For example, `palette` holds the theme's colors, and `classes` maps named styles such as `heading-text` and `primary-button` to the properties the editor applies.  The Wix email editor doesn't render styling that doesn't follow its structure. When `body` doesn't define a style class, the editor uses its default styling for that class. When `body` doesn't include `palette`, the theme's color palette is empty.  This API doesn't validate the structure of `body`, so a theme that saves successfully may still not render as expected. Don't rely on a particular set of keys being present, and ignore keys you don't recognize. Don't store personal data in `body`.  Limited to 256 KB (262,144 bytes), measured on the JSON encoding without insignificant whitespace.  
     - name: extendedFields | type: ExtendedFields | description: Custom field data for the email design theme.  [Extended fields](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/schema-plugins/about-schema-plugin-extensions.md) must be configured in the app dashboard before they can be accessed with API calls. Don't store personal data in extended fields.  To update extended fields, call [Update Extended Fields](https://dev.wix.com/docs/api-reference/business-management/marketing/emails/email-design-theme/update-extended-fields.md). [Update Email Design Theme](https://dev.wix.com/docs/api-reference/business-management/marketing/emails/email-design-theme/update-email-design-theme.md) also applies any `extendedFields` specified in the request.  
        - name: namespaces | type: object | description: Extended field data. Each key corresponds to the namespace of the app that created the extended fields. The value of each key is structured according to the schema defined when the extended fields were configured.  You can only access fields for which you have the appropriate permissions.  Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md).  | validation: format map
     - name: tags | type: Tags | description: Tags assigned to the email design theme. Tags are owned by the Tags API ([SDK](https://dev.wix.com/docs/sdk/backend-modules/tags/tags/introduction.md) | [REST](https://dev.wix.com/docs/rest/business-management/tags/introduction.md)), which you can use to resolve these GUIDs into labels and to create tags.  Specifying `tags` in [Update Email Design Theme](https://dev.wix.com/docs/api-reference/business-management/marketing/emails/email-design-theme/update-email-design-theme.md) replaces the existing tags instead of adding to them. To assign or unassign individual tags, call [Bulk Update Email Design Theme Tags](https://dev.wix.com/docs/api-reference/business-management/marketing/emails/email-design-theme/bulk-update-email-design-theme-tags.md).  
        - name: privateTags | type: TagList | description: Tags that require an additional permission to access, typically restricted from site members and visitors.  
           - name: tagIds | type: array<string> | description: List of tag GUIDs.  | validation: maxItems 100, maxLength 5
        - name: publicTags | type: TagList | description: Tags that are exposed to anyone with access to the entity, including site members and visitors.  
  - name: pagingMetadata | type: CursorPagingMetadata | description: Paging metadata.  
     - name: count | type: integer | description: Number of items returned in the 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 string 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

### Query Email Design Themes
Retrieves email design themes whose title starts with a given prefix, most recently updated first

```curl
curl -X POST \
'https://www.wixapis.com/emails/themes/v1/email-design-themes/query' \
-H 'Authorization: <AUTH>' \
-H 'Content-Type: application/json' \
-d '{
  "query": {
    "filter": {
      "title": {
        "$startsWith": "Editorial"
      }
    },
    "sort": [
      {
        "fieldName": "updatedDate",
        "order": "DESC"
      }
    ],
    "cursorPaging": {
      "limit": 50
    }
  }
}'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.emailDesignThemes.emailDesignThemes.queryEmailDesignThemes(query)
 Description: Retrieves a list of up to 100 email design themes, given the provided paging, filtering, and sorting.  Query Email Design Themes runs with these defaults, which you can override:  - `id` is sorted in `ASC` order - `cursorPaging.limit` is `50`  Supported filter fields: `id` (`$eq`, `$ne`, `$in`), `title`, `createdDate`, `updatedDate`, and `tags` (all applicable operators). You can sort by `id`, `title`, `createdDate`, and `updatedDate`. Filtering or sorting by any other field, including anything inside `body`, fails validation.  To learn about working with Query methods, see [API Query Language](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language.md), [Sorting and Paging](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-sorting-and-paging.md), and [Field Projection](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-field-projection.md).
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  query
 Method parameters: 
   param name: query | type: EmailDesignThemeQuery   | required: true 
     - name: cursorPaging | type: CursorPaging | description: Cursor paging options. See [Sorting and Paging](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-sorting-and-paging.md) for more information.  
        - name: limit | type: integer | description: Maximum number of items to return in the results.  Default: `50`  | 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
        - name: filter | type: object | description: Filter object. See [API Query Language](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language.md) for more information.  
        - name: sort | type: array<Sorting> | description: Sort object. See [Sorting and Paging](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-sorting-and-paging.md) for more information.  | validation: maxItems 5
           - name: fieldName | type: string | description: Field to sort by.  Supported properties: `id`, `title`, `createdDate`, `updatedDate`  | validation: maxLength 512
           - name: order | type: SortOrder | description: Sort order. Use `ASC` for ascending order or `DESC` for descending order.  Default: `ASC`  
                 - enum: ASC, DESC
 Query fields:
   - field: _id | operators: $eq, $ne, $in | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: title | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte, $startsWith | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: _createdDate | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: _updatedDate | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: tags | operators: $exists | sort: none | aggregatable: undefined | searchable: undefined
 Return type: PROMISE<QueryEmailDesignThemesResponse>
  - name: emailDesignThemes | type: array<EmailDesignTheme> | description: Retrieved email design themes.  | validation: maxItems 100
     - name: _id | type: string | description: Email design theme GUID.  | read-only: true | validation: format GUID
     - name: _createdDate | type: Date | description: Date and time the email design theme was created.  | read-only: true 
     - name: _updatedDate | type: Date | description: Date and time the email design theme was updated.  | read-only: true 
     - name: revision | type: string | description: Revision number, which increments by 1 each time the email design theme is updated. To prevent conflicting changes, the current revision must be passed when updating the email design theme.  Ignored when creating an email design theme.  | read-only: true | validation: format int64
     - name: title | type: string | description: Email design theme title. Titles aren't unique, so a site can have multiple email design themes with the same title. To help site owners tell them apart, display additional context alongside the title, such as the date the email design theme was last updated.  | validation: minLength 1, maxLength 200
     - name: body | type: object | description: Styling definition of the email design theme, as a free-form JSON object. Its structure is defined by the Wix email editor. For example, `palette` holds the theme's colors, and `classes` maps named styles such as `heading-text` and `primary-button` to the properties the editor applies.  The Wix email editor doesn't render styling that doesn't follow its structure. When `body` doesn't define a style class, the editor uses its default styling for that class. When `body` doesn't include `palette`, the theme's color palette is empty.  This API doesn't validate the structure of `body`, so a theme that saves successfully may still not render as expected. Don't rely on a particular set of keys being present, and ignore keys you don't recognize. Don't store personal data in `body`.  Limited to 256 KB (262,144 bytes), measured on the JSON encoding without insignificant whitespace.  
     - name: extendedFields | type: ExtendedFields | description: Custom field data for the email design theme.  [Extended fields](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/schema-plugins/about-schema-plugin-extensions.md) must be configured in the app dashboard before they can be accessed with API calls. Don't store personal data in extended fields.  To update extended fields, call [Update Extended Fields](https://dev.wix.com/docs/api-reference/business-management/marketing/emails/email-design-theme/update-extended-fields.md). [Update Email Design Theme](https://dev.wix.com/docs/api-reference/business-management/marketing/emails/email-design-theme/update-email-design-theme.md) also applies any `extendedFields` specified in the request.  
        - name: namespaces | type: object | description: Extended field data. Each key corresponds to the namespace of the app that created the extended fields. The value of each key is structured according to the schema defined when the extended fields were configured.  You can only access fields for which you have the appropriate permissions.  Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md).  | validation: format map
     - name: tags | type: Tags | description: Tags assigned to the email design theme. Tags are owned by the Tags API ([SDK](https://dev.wix.com/docs/sdk/backend-modules/tags/tags/introduction.md) | [REST](https://dev.wix.com/docs/rest/business-management/tags/introduction.md)), which you can use to resolve these GUIDs into labels and to create tags.  Specifying `tags` in [Update Email Design Theme](https://dev.wix.com/docs/api-reference/business-management/marketing/emails/email-design-theme/update-email-design-theme.md) replaces the existing tags instead of adding to them. To assign or unassign individual tags, call [Bulk Update Email Design Theme Tags](https://dev.wix.com/docs/api-reference/business-management/marketing/emails/email-design-theme/bulk-update-email-design-theme-tags.md).  
        - name: privateTags | type: TagList | description: Tags that require an additional permission to access, typically restricted from site members and visitors.  
           - name: tagIds | type: array<string> | description: List of tag GUIDs.  | validation: maxItems 100, maxLength 5
        - name: publicTags | type: TagList | description: Tags that are exposed to anyone with access to the entity, including site members and visitors.  
  - name: pagingMetadata | type: CursorPagingMetadata | description: Paging metadata.  
     - name: count | type: integer | description: Number of items returned in the 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 string 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

### Query email design themes
Retrieves email design themes created since a given date, sorted by title

```javascript
import { emailDesignThemes } from "@wix/email-design-themes";

async function queryEmailDesignThemes() {
  const response = await emailDesignThemes.queryEmailDesignThemes({
    filter: {
      _createdDate: {
        $gt: new Date("2026-09-28T00:00:00.000Z"),
      },
    },
    sort: [
      {
        fieldName: "title",
        order: "ASC",
      },
    ],
    cursorPaging: {
      limit: 50,
    },
  });
}

/* Promise resolves to:
 * {
 *   "emailDesignThemes": [
 *     {
 *       "revision": "6",
 *       "title": "Editorial Elegance",
 *       "body": {
 *         "body": {
 *           "width": "700px",
 *           "backgroundColor": "#E3E0D8"
 *         },
 *         "classes": {
 *           "section": {
 *             "style": {
 *               "padding": "40px 32px",
 *               "backgroundColor": "#F3F1EC"
 *             }
 *           },
 *           "heading-text": {
 *             "style": {
 *               "color": "#0C1622",
 *               "fontSize": "44px",
 *               "fontFamily": "Georgia,'Times New Roman',serif"
 *             }
 *           }
 *         },
 *         "palette": ["#F3F1EC", "#0C1622"]
 *       },
 *       "_id": "b7b5672a-f936-4a7d-a6a2-01c1bd91498f",
 *       "_createdDate": "2026-09-28T17:32:34.347Z",
 *       "_updatedDate": "2026-09-29T07:15:15.479Z"
 *     }
 *   ],
 *   "pagingMetadata": {
 *     "count": 1,
 *     "hasNext": false
 *   }
 * }
 */

```

### queryEmailDesignThemes (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 { emailDesignThemes } from '@wix/email-design-themes';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

const myWixClient = createClient ({
  modules: { emailDesignThemes },
  // Include the auth strategy and host as relevant
});


async function queryEmailDesignThemes(query) {
  const response = await myWixClient.emailDesignThemes.queryEmailDesignThemes(query);
};
```

---