> 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

# CreateCategory

# Package: onlinePrograms

# Namespace: CategoriesService

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

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

## Introduction

Creates a Category.

A site can contain up to 100 Categories, and each primary-language `label` must be unique within the site.

To create multiple Categories in one request, use [Bulk Create Categories](https://dev.wix.com/docs/api-reference/business-management/online-programs/categories/bulk-create-categories.md).

---

## REST API

### Schema

```
 Method: createCategory
 Description: Creates a Category.  A site can contain up to 100 Categories, and each primary-language `label` must be unique within the site.  To create multiple Categories in one request, use [Bulk Create Categories](https://dev.wix.com/docs/api-reference/business-management/online-programs/categories/bulk-create-categories.md).
 URL: https://www.wixapis.com/_api/program-categories-service/v3/categories
 Method: POST
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  category
 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: 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: CreateCategoryResponse
  - name: category | type: Category | description: Created 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

### Create a category
Creates a reusable site-level category. Primary-language labels must be unique within the site.

```curl
curl -X POST \
'https://www.wixapis.com/online-programs/v3/categories' \
-H 'Authorization: <AUTH>' \
-H 'Content-Type: application/json' \
-d '{
  "category": {
    "label": "Fitness"
  }
}'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.onlinePrograms.categories.createCategory(category)
 Description: Creates a Category.  A site can contain up to 100 Categories, and each primary-language `label` must be unique within the site.  To create multiple Categories in one request, use [Bulk Create Categories](https://dev.wix.com/docs/api-reference/business-management/online-programs/categories/bulk-create-categories.md).
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  category
 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: 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

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

async function createCategoryExample() {
  const result = await categories.createCategory({
    label: "Fitness",
  });
  return result;
}

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

```

### createCategory (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 createCategory(category) {
  const response = await myWixClient.categories.createCategory(category);
};
```

---