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

# Update lead category

> Base model view set providing standardized CRUD operations and error handling.

This view set enforces consistent response formats, error handling patterns,
and logging across all API endpoints. Subclasses must override the class
variables below.



## OpenAPI

````yaml /openapi/commercial.yaml put /api/v1/lead-categories/{id}
openapi: 3.0.3
info:
  title: Commercial Service API
  version: 1.0.0
  description: |2-

        **Commercial Service API** - Lead management and campaign workflow system.

        ## Versioning
        The API uses URL path versioning (e.g., `/api/v1/`, `/api/v2/`).
        Current version: **v1**
        
servers:
  - url: https://api.capedigital.co.ke/commercial
    description: Production
  - url: http://localhost:8000
    description: Local
security: []
paths:
  /api/v1/lead-categories/{id}:
    put:
      tags:
        - Lead Categories
      summary: Update lead category
      description: >-
        Base model view set providing standardized CRUD operations and error
        handling.


        This view set enforces consistent response formats, error handling
        patterns,

        and logging across all API endpoints. Subclasses must override the class

        variables below.
      operationId: lead_categories_update
      parameters:
        - in: path
          name: id
          schema:
            type: string
            format: uuid
          description: A UUID string identifying this Lead Category.
          required: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LeadCategoryRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/LeadCategoryRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/LeadCategoryRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LeadCategory'
          description: ''
      security:
        - bearerAuth: []
components:
  schemas:
    LeadCategoryRequest:
      type: object
      description: >-
        Lead Category Serializer — creation is locked to the four business
        categories.
      properties:
        name:
          type: string
          minLength: 1
          description: Lead category name
          maxLength: 100
        description:
          type: string
          minLength: 1
          description: Lead category description
      required:
        - description
        - name
    LeadCategory:
      type: object
      description: >-
        Lead Category Serializer — creation is locked to the four business
        categories.
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        name:
          type: string
          description: Lead category name
          maxLength: 100
        description:
          type: string
          description: Lead category description
      required:
        - description
        - id
        - name
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: 'Enter your JWT token in the format: Bearer <token>'

````