> 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

# UpdateCategory

# Package: onlinePrograms

# Namespace: CategoriesService

# Method link: https://dev.wix.com/docs/api-reference/business-management/online-programs/categories/update-category.md

## Permission Scopes:
Manage Online Programs: SCOPE.CHALLENGES.MANAGE

## Introduction

Updates a Category.

Supports partial updates. Each time the Category is updated, `revision` increments by 1. Pass the current `revision` to prevent unintentionally overwriting another update.

Renaming a Category preserves its stable ID. Primary-language labels must remain unique within the site. Edit secondary-language labels through Wix Multilingual.

Updating `assignedTo` synchronizes the corresponding `Program.categoryIds` values asynchronously. For routine Program-centric assignment changes, use [Bulk Assign Categories to Program](https://dev.wix.com/docs/api-reference/business-management/online-programs/categories/bulk-assign-categories-to-program.md).

---

## REST API

### Schema

```
 Method: updateCategory
 Description: Updates a Category.  Supports partial updates. Each time the Category is updated, `revision` increments by 1. Pass the current `revision` to prevent unintentionally overwriting another update.  Renaming a Category preserves its stable GUID. Primary-language labels must remain unique within the site. Edit secondary-language labels through Wix Multilingual.  Updating `assignedTo` synchronizes the corresponding `Program.categoryIds` values asynchronously. For routine Program-centric assignment changes, use [Bulk Assign Categories to Program](https://dev.wix.com/docs/api-reference/business-management/online-programs/categories/bulk-assign-categories-to-program.md).
 URL: https://www.wixapis.com/_api/program-categories-service/v3/categories/{category.id}
 Method: PATCH
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  category, category.id, category.revision
 Method parameters: 
   param name: category | type: Category | description: A reusable, site-level classification for Online Programs.  Categories exist independently of Programs and remain available when they have no Program assignments. | required: true 
        - name: id | type: string | description: Category GUID. | required: true | read-only: true | validation: format GUID
        - name: revision | type: string | description: Revision number, which increments by 1 each time the Category is updated. To prevent conflicting changes, the current `revision` must be passed when updating the Category. | required: true | read-only: true | validation: format int64
        - name: label | type: string | description: Category's display label. The primary-language label must be unique within the site. Localized reads return the Wix Multilingual translation when one exists, and otherwise fall back to the primary label.  | validation: maxLength 100
        - name: assignedTo | type: array<string> | description: IDs of Programs assigned to this Category. For routine assignment changes, use [Bulk Assign Categories to Program](https://dev.wix.com/docs/api-reference/business-management/online-programs/categories/bulk-assign-categories-to-program.md), whose 10-Category-per-Program check is best-effort. Direct writes to `assignedTo` through Create Category, Bulk Create Categories, or Update Category bypass that check; callers using them must keep each Program at or below 10 Categories. Relationship updates are eventually consistent across the Program Categories and Programs APIs.  | validation: maxItems 200, format GUID
        - name: extendedFields | type: ExtendedFields | description: Custom field data for the Category. [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md) must be configured in the app dashboard for `wix.achievements.categories.v3.category` before they can be accessed with API calls.  
           - 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
 Return type: UpdateCategoryResponse
  - name: category | type: Category | description: Updated Category.  
     - name: id | type: string | description: Category GUID.  | read-only: true | validation: format GUID
     - name: revision | type: string | description: Revision number, which increments by 1 each time the Category is updated. To prevent conflicting changes, the current `revision` must be passed when updating the Category.  | read-only: true | validation: format int64
     - name: createdDate | type: string | description: Date and time the Category was created.  | read-only: true | validation: format date-time
     - name: updatedDate | type: string | description: Date and time the Category was last updated.  | read-only: true | validation: format date-time
     - name: label | type: string | description: Category's display label. The primary-language label must be unique within the site. Localized reads return the Wix Multilingual translation when one exists, and otherwise fall back to the primary label.  | validation: maxLength 100
     - name: assignedTo | type: array<string> | description: IDs of Programs assigned to this Category. For routine assignment changes, use [Bulk Assign Categories to Program](https://dev.wix.com/docs/api-reference/business-management/online-programs/categories/bulk-assign-categories-to-program.md), whose 10-Category-per-Program check is best-effort. Direct writes to `assignedTo` through Create Category, Bulk Create Categories, or Update Category bypass that check; callers using them must keep each Program at or below 10 Categories. Relationship updates are eventually consistent across the Program Categories and Programs APIs.  | validation: maxItems 200, format GUID
     - name: extendedFields | type: ExtendedFields | description: Custom field data for the Category. [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md) must be configured in the app dashboard for `wix.achievements.categories.v3.category` before they can be accessed with API calls.  
        - 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


```

### Examples

### Rename a category
Renames a Category without changing its Program assignments. Pass the current revision.

```curl
curl -X PATCH \
'https://www.wixapis.com/online-programs/v3/categories/f69516df-6a8d-4fb7-894e-5c8291c23573' \
-H 'Authorization: <AUTH>' \
-H 'Content-Type: application/json' \
-d '{
  "category": {
    "id": "f69516df-6a8d-4fb7-894e-5c8291c23573",
    "revision": "1",
    "label": "Health and Fitness"
  }
}'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.onlinePrograms.categories.updateCategory(_id, category)
 Description: Updates a Category.  Supports partial updates. Each time the Category is updated, `revision` increments by 1. Pass the current `revision` to prevent unintentionally overwriting another update.  Renaming a Category preserves its stable GUID. Primary-language labels must remain unique within the site. Edit secondary-language labels through Wix Multilingual.  Updating `assignedTo` synchronizes the corresponding `Program.categoryIds` values asynchronously. For routine Program-centric assignment changes, use [Bulk Assign Categories to Program](https://dev.wix.com/docs/api-reference/business-management/online-programs/categories/bulk-assign-categories-to-program.md).
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  category, _id, category.revision
 Method parameters: 
   param name: _id | type: string | description: Category GUID. | required: true | validation: format GUID
   param name: category | type: UpdateCategory | description: A reusable, site-level classification for Online Programs.  Categories exist independently of Programs and remain available when they have no Program assignments. | required: true 
        - name: revision | type: string | description: Revision number, which increments by 1 each time the Category is updated. To prevent conflicting changes, the current `revision` must be passed when updating the Category. | required: true | read-only: true | validation: format int64
        - name: label | type: string | description: Category's display label. The primary-language label must be unique within the site. Localized reads return the Wix Multilingual translation when one exists, and otherwise fall back to the primary label.  | validation: maxLength 100
        - name: assignedTo | type: array<string> | description: IDs of Programs assigned to this Category. For routine assignment changes, use [Bulk Assign Categories to Program](https://dev.wix.com/docs/api-reference/business-management/online-programs/categories/bulk-assign-categories-to-program.md), whose 10-Category-per-Program check is best-effort. Direct writes to `assignedTo` through Create Category, Bulk Create Categories, or Update Category bypass that check; callers using them must keep each Program at or below 10 Categories. Relationship updates are eventually consistent across the Program Categories and Programs APIs.  | validation: maxItems 200, format GUID
        - name: extendedFields | type: ExtendedFields | description: Custom field data for the Category. [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md) must be configured in the app dashboard for `wix.achievements.categories.v3.category` before they can be accessed with API calls.  
           - 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
 Return type: PROMISE<Category>
  - name: _id | type: string | description: Category GUID.  | read-only: true | validation: format GUID
  - name: revision | type: string | description: Revision number, which increments by 1 each time the Category is updated. To prevent conflicting changes, the current `revision` must be passed when updating the Category.  | read-only: true | validation: format int64
  - name: _createdDate | type: Date | description: Date and time the Category was created.  | read-only: true 
  - name: _updatedDate | type: Date | description: Date and time the Category was last updated.  | read-only: true 
  - name: label | type: string | description: Category's display label. The primary-language label must be unique within the site. Localized reads return the Wix Multilingual translation when one exists, and otherwise fall back to the primary label.  | validation: maxLength 100
  - name: assignedTo | type: array<string> | description: IDs of Programs assigned to this Category. For routine assignment changes, use [Bulk Assign Categories to Program](https://dev.wix.com/docs/api-reference/business-management/online-programs/categories/bulk-assign-categories-to-program.md), whose 10-Category-per-Program check is best-effort. Direct writes to `assignedTo` through Create Category, Bulk Create Categories, or Update Category bypass that check; callers using them must keep each Program at or below 10 Categories. Relationship updates are eventually consistent across the Program Categories and Programs APIs.  | validation: maxItems 200, format GUID
  - name: extendedFields | type: ExtendedFields | description: Custom field data for the Category. [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md) must be configured in the app dashboard for `wix.achievements.categories.v3.category` before they can be accessed with API calls.  
     - 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


```

### Examples

### Rename a category
```javascript
import { categories } from "@wix/online-programs";

async function updateCategoryExample() {
  const result = await categories.updateCategory(
    "0a4314a1-5237-4b7f-992f-d8ecdcbe73fc",
    {
      revision: "1",
      label: "Health and Fitness",
    },
  );
  return result;
}

/* Promise resolves to (captured response; Date values serialized as ISO strings):
{
  "revision": "2",
  "label": "Health and Fitness",
  "assignedTo": [],
  "_id": "0a4314a1-5237-4b7f-992f-d8ecdcbe73fc",
  "_createdDate": "2026-10-15T08:16:44.427Z",
  "_updatedDate": "2026-10-15T08:27:16.407Z"
}
*/

```

### updateCategory (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 { categories } from '@wix/online-programs';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

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


async function updateCategory(_id,category) {
  const response = await myWixClient.categories.updateCategory(_id,category);
};
```

---