> ## Documentation Index
> Fetch the complete documentation index at: https://developer.jtl-software.com/llms.txt
> Use this file to discover all available pages before exploring further.

# CreateCategory

> Creates a new category.

If a request with this mutation's Idempotency-Key was already completed, the response's `extensions` contains an `idempotency.{responseName}` entry with `wasReplayed: true`.



**mutation** `CreateCategory(request: CreateCategoryCommandRequestInput!): CreateCategoryCommandResponse!`

## Arguments

**`request`**: `CreateCategoryCommandRequestInput!` (required)

## Returns

`CreateCategoryCommandResponse!`

**`categoryId`**: `ID!`

The ID of the newly created category.

## Examples

```graphql Mutation
mutation CreateCategory($request: CreateCategoryCommandRequestInput!) {
  CreateCategory(request: $request) {
    categoryId
  }
}
```

```json Variables
{
  "request": {
    "name": "string"
  }
}
```

```json Response
{
  "data": {
    "CreateCategory": {
      "categoryId": "id"
    }
  }
}
```
