> ## Documentation Index
> Fetch the complete documentation index at: https://docs.evermind.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Update a category

> Rename a category or edit its description. Documents filed under it are not re-classified; they keep pointing at the same category id. Tenant-global preset categories are read-only.



## OpenAPI

````yaml /api-reference/openapi.json patch /api/v2/knowledge_bases/{kb_id}/categories/{category_id}
openapi: 3.1.0
info:
  title: EverOS Cloud Memory API
  version: 2.0.0
  license:
    name: Apache-2.0
    identifier: Apache-2.0
  contact:
    name: EverMind AI
    email: service@evermind.ai
    url: https://github.com/EverMind-AI/everos-cloud-sdk-python
  description: >-
    Official Python client for the EverOS Cloud Memory API. Add, search,
    retrieve, and manage long-term memory for your AI applications over a typed
    interface (pydantic v2, with full type hints). Install and usage guides:
    https://github.com/EverMind-AI/everos-cloud-sdk-python
servers:
  - url: https://api.evermind.ai
    description: Production
security:
  - BearerAuth: []
paths:
  /api/v2/knowledge_bases/{kb_id}/categories/{category_id}:
    patch:
      tags:
        - Knowledge
      summary: Update a category
      description: >-
        Rename a category or edit its description. Documents filed under it are
        not re-classified; they keep pointing at the same category id.
        Tenant-global preset categories are read-only.
      operationId: updateCategory
      parameters:
        - name: kb_id
          in: path
          required: true
          schema:
            type: string
            title: Kb Id
        - name: category_id
          in: path
          required: true
          schema:
            type: string
            title: Category Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CategoryPatchBody'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuccessEnvelope_CategoryData_'
        '401':
          description: Missing or invalid bearer token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayError'
        '403':
          description: >-
            Authenticated but not permitted — either rejected by the auth
            service, or the account's memory API version does not match the
            interface version implied by the path (a v1 account calling an
            /api/v2 route).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayError'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '429':
          description: Rate limit or quota exceeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayError'
        '503':
          description: >-
            The gateway could not reach the authentication service. Transient —
            retry with backoff.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayError'
components:
  schemas:
    CategoryPatchBody:
      properties:
        name:
          anyOf:
            - type: string
              maxLength: 50
              minLength: 1
            - type: 'null'
          title: Name
          description: New category name, 1–50 characters. Omit to leave it unchanged.
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: >-
            New category description. This is what the classifier matches
            documents against, so it is worth keeping accurate. Omit to leave it
            unchanged.
      additionalProperties: false
      type: object
      title: CategoryPatchBody
    SuccessEnvelope_CategoryData_:
      properties:
        request_id:
          type: string
          title: Request Id
          description: Request trace id (peer to data)
        data:
          $ref: '#/components/schemas/CategoryData'
          description: Endpoint-defined business result
      type: object
      required:
        - request_id
        - data
      title: SuccessEnvelope[CategoryData]
    GatewayError:
      type: object
      additionalProperties: true
      description: >-
        Gateway error body. NOTE: shape is not yet uniform across auth/quota/
        rate-limit paths — treat fields as best-effort. Commonly includes a
        `code`/`message` (flat) or an `error` object/string with a `message`.
      title: GatewayError
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
          description: One entry per field that failed validation.
      type: object
      title: HTTPValidationError
    CategoryData:
      properties:
        id:
          type: string
          title: Id
          description: Category id (system-generated, stable)
        name:
          type: string
          title: Name
          description: The category's display name.
        description:
          type: string
          title: Description
          default: ''
          description: >-
            What belongs in this category. The classifier matches documents
            against this text, so it is functional, not decorative.
        document_count:
          type: integer
          title: Document Count
          default: 0
          description: How many documents are filed under it.
        scope:
          type: string
          title: Scope
          description: '''kb'' = user-created in this kb; ''tenant'' = global preset (read-only)'
          default: kb
        editable:
          type: boolean
          title: Editable
          description: False for tenant-global preset categories (read-only)
          default: true
      type: object
      required:
        - id
        - name
      title: CategoryData
      description: >-
        A category as returned to clients. ``id`` is the system-generated stable
        key.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
          description: Path to the offending field, from the body root.
        msg:
          type: string
          title: Message
          description: What is wrong with it.
        type:
          type: string
          title: Error Type
          description: Machine-readable validation-error kind.
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: 'API key issued by EverOS, sent as `Authorization: Bearer <api_key>`.'

````