> 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

# UpdateExtendedFields

# Package: emails

# Namespace: EmailDesignThemesService

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

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

## Introduction

Updates the extended fields of an email design theme.

Unlike [Update Email Design Theme](https://dev.wix.com/docs/api-reference/business-management/marketing/emails/email-design-theme/update-email-design-theme.md), this method doesn't require the current `revision`.
Updating extended fields triggers the [Email Design Theme Updated](https://dev.wix.com/docs/api-reference/business-management/marketing/emails/email-design-theme/email-design-theme-updated.md) domain event.

---

## REST API

### Schema

```
 Method: updateExtendedFields
 Description: Updates the extended fields of an email design theme.  Unlike [Update Email Design Theme](https://dev.wix.com/docs/api-reference/business-management/marketing/emails/email-design-theme/update-email-design-theme.md), this method doesn't require the current `revision`. Updating extended fields triggers the [Email Design Theme Updated](https://dev.wix.com/docs/api-reference/business-management/marketing/emails/email-design-theme/email-design-theme-updated.md) domain event.
 URL: https://www.wixapis.com/emails/themes/v1/email-design-themes/{id}/update-extended-fields
 Method: POST
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  namespace, namespaceData
 Method parameters: 
   param name: namespace | type: namespace | description: Identifier for the app whose extended fields are being updated. | required: true 
   param name: namespaceData | type: namespaceData | description: Data to update. Structured according to the [schema](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md#json-schema-for-extended-fields) defined when the extended fields were configured. | required: true 
 Return type: UpdateExtendedFieldsResponse
  - name: emailDesignTheme | type: EmailDesignTheme | description: Updated email design theme.  
     - 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.  


```

### Examples

### Update Extended Fields
Updates an app's custom field data on an email design theme

```curl
curl -X POST \
'https://www.wixapis.com/emails/themes/v1/email-design-themes/b7b5672a-f936-4a7d-a6a2-01c1bd91498f/update-extended-fields' \
-H 'Authorization: <AUTH>' \
-H 'Content-Type: application/json' \
-d '{
  "id": "b7b5672a-f936-4a7d-a6a2-01c1bd91498f",
  "namespace": "@my-company/my-app",
  "namespaceData": {
    "sourceTemplateId": "spring-2024-editorial"
  }
}'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.emailDesignThemes.emailDesignThemes.updateExtendedFields(_id, namespace, options)
 Description: Updates the extended fields of an email design theme.  Unlike [Update Email Design Theme](https://dev.wix.com/docs/api-reference/business-management/marketing/emails/email-design-theme/update-email-design-theme.md), this method doesn't require the current `revision`. Updating extended fields triggers the [Email Design Theme Updated](https://dev.wix.com/docs/api-reference/business-management/marketing/emails/email-design-theme/email-design-theme-updated.md) domain event.
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  _id, namespace, options.namespaceData, options
 Method parameters: 
   param name: _id | type: string | description: GUID of the entity to update. | required: true 
   param name: namespace | type: string | description: Identifier for the app whose extended fields are being updated. | required: true 
   param name: options | type: UpdateExtendedFieldsOptions  none | required: true 
        - name: namespaceData | type: object | description: Data to update. Structured according to the [schema](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md#json-schema-for-extended-fields) defined when the extended fields were configured. | required: true 
 Return type: PROMISE<UpdateExtendedFieldsResponse>
  - name: emailDesignTheme | type: EmailDesignTheme | description: Updated email design theme.  
     - 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.  


```

### Examples

### Update extended fields
Updates an app's custom field data on an email design theme

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

async function updateExtendedFields() {
  const response = await emailDesignThemes.updateExtendedFields(
    "e1d8bd46-22c5-4b4d-b1a6-92bfe83d452a",
    "@my-company/my-app",
    {
      namespaceData: {
        sourceTemplateId: "spring-2024-editorial",
      },
    },
  );
}

/* Promise resolves to:
 * {
 *   "emailDesignTheme": {
 *     "revision": "3",
 *     "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"]
 *     },
 *     "extendedFields": {
 *       "namespaces": {
 *         "@my-company/my-app": {
 *           "sourceTemplateId": "spring-2024-editorial"
 *         }
 *       }
 *     },
 *     "_id": "e1d8bd46-22c5-4b4d-b1a6-92bfe83d452a",
 *     "_createdDate": "2026-09-29T07:12:34.018Z",
 *     "_updatedDate": "2026-09-29T07:14:05.412Z"
 *   }
 * }
 */

```

### updateExtendedFields (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 updateExtendedFields(_id,namespace,options) {
  const response = await myWixClient.emailDesignThemes.updateExtendedFields(_id,namespace,options);
};
```

---