---
updatedAt: 2026-04-28T09:31:16.000Z
agentTools:
  projectIndex: https://docs.makaira.io/llms.txt
---

# Update Category

Update Category by ID

Updates the search configuration for a specific category, such as assigning a boost stream or configuring category-specific aggregations.

Requires authentication.

## Request

**`PUT /category/{id}`**

### Path Parameters

| Parameter | Type   | Required | Description                                   |
| --------- | ------ | -------- | --------------------------------------------- |
| `id`      | string | Yes      | The category identifier from the shop system. |

### Headers

| Header          | Value              |
| --------------- | ------------------ |
| `Authorization` | `Bearer <token>`   |
| `Content-Type`  | `application/json` |

### Request Body

| Field                        | Type    | Required | Description                                                                      |
| ---------------------------- | ------- | -------- | -------------------------------------------------------------------------------- |
| `stream`                     | string  | No       | ID of the boost stream to assign to this category.                               |
| `aggregations`               | array   | No       | Array of aggregation IDs to use for this category.                               |
| `overrideAggregations`       | boolean | No       | When `true`, uses the category-specific aggregations instead of global defaults. |
| `overrideAggregationSorting` | boolean | No       | When `true`, uses category-specific aggregation sorting.                         |

### Example Request

```json
{
  "stream": "3",
  "aggregations": ["1", "2", "5"],
  "overrideAggregations": true
}
```

## Response

Returns the updated category configuration.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Makaira API",
    "version": "1.0",
    "contact": {
      "name": "Makaira GmbH",
      "url": "https://www.makaira.io/",
      "email": "support@makaira.io"
    },
    "description": "API of the powerful Makaira Search/Recommendation and Marketing Suite"
  },
  "servers": [
    {
      "url": "https://{yourinstance}.makaira.io"
    }
  ],
  "paths": {
    "/category/{id}": {
      "parameters": [
        {
          "schema": {
            "type": "string"
          },
          "name": "id",
          "in": "path",
          "required": true
        },
        {
          "$ref": "#/components/parameters/instance"
        }
      ],
      "put": {
        "summary": "Update Category",
        "tags": [
          "Category"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "stream": {
                    "type": "string",
                    "description": "The stream ID for the category."
                  },
                  "aggregations": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "List of aggregation IDs for the category. Contains only the IDs."
                  },
                  "overrideAggregations": {
                    "type": "boolean",
                    "description": "Flag to override aggregations."
                  },
                  "overrideAggregationSorting": {
                    "type": "boolean",
                    "description": "Flag to override aggregation sorting."
                  },
                  "aggregationSorting": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "integer"
                      },
                      "description": "Each object represents sorting preferences with dynamic keys as aggregation identifiers and integer values as their positions."
                    },
                    "description": "Array of objects, each with dynamic keys representing aggregation identifiers and integer values indicating their sort positions."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "operationId": "categoryUpdate",
        "description": "Update Category by ID"
      }
    }
  },
  "components": {
    "parameters": {
      "instance": {
        "in": "header",
        "name": "X-Makaira-Instance",
        "required": true,
        "description": "Makaira Instance ID",
        "schema": {
          "type": "string"
        }
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "Authentication by JSON Web Token\n"
      }
    }
  },
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
```