Source: https://atomicwork-preview.docs-staging.pageloop.ai/api-reference/servicecatalog/postapi-v-1-workspaces-workspace-id-catalogue-categories

# Create category

POST `https://{tenant}.atomicwork.com/api/v1/workspaces/{workspaceId}/catalogue/categories`

## Authorization

#### X-Api-Key (header, string, required)

## Headers

#### X-Workspace-Id (header, string)

## Path Parameters

#### workspaceId (path, integer, required)

The workspace ID

## Query Parameters

#### category\_type (query, enum (string))

The category type

## Body

#### name (body, string, required)

#### description (body, string)

#### icon (body, object)

#### properties

#### name (string, required)

#### type (string, required)

#### order (body, object)

Any type

#### user\_segments (body, array of integer, required)

#### archived (body, boolean)

#### category\_type (body, enum (string))

## Response

#### 200

Successful response

#### Request

```bash cURL
curl -X POST 'https://{tenant}.atomicwork.com/api/v1/workspaces/{workspaceId}/catalogue/categories' \
  -H 'X-Api-Key: <api-key>' \
  -H 'Content-Type: application/json' \
  -d '{"name": "string", "description": "string", "icon": {"name": "string", "type": "string"}, "order": {}, "user_segments": [0], "archived": true, "category_type": "SERVICE_REQUEST"}'
```

```javascript JavaScript
const res = await fetch('https://{tenant}.atomicwork.com/api/v1/workspaces/{workspaceId}/catalogue/categories', {
  method: 'POST',
  headers: {
    'X-Api-Key': '<api-key>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"name": "string", "description": "string", "icon": {"name": "string", "type": "string"}, "order": {}, "user_segments": [0], "archived": true, "category_type": "SERVICE_REQUEST"}),
});
const data = await res.json();
```

```python Python
import requests

res = requests.post(
    'https://{tenant}.atomicwork.com/api/v1/workspaces/{workspaceId}/catalogue/categories',
    headers={'X-Api-Key': '<api-key>'},
    json={"name": "string", "description": "string", "icon": {"name": "string", "type": "string"}, "order": {}, "user_segments": [0], "archived": true, "category_type": "SERVICE_REQUEST"}
)
data = res.json()
```
