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

# Update Extraction Category API

> Rename an extraction category or change its model via PATCH /extraction-categories/{category_id}; renames propagate to the category labels on all its dispositions.

<Note>
  Send `name`, `model`, or both — an empty body is rejected. Renaming a category rewrites the `category` label on all of its dispositions in the same transaction. Changing `model` switches the LLM used for the category's extraction pass on subsequent calls.
</Note>


## OpenAPI

````yaml PATCH /extraction-categories/{category_id}
openapi: 3.1.0
info:
  title: Bolna API
  description: >-
    Use and leverage Bolna Voice AI using APIs through HTTP requests from any
    language in your applications and workflows.
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.bolna.ai
    description: Production server
security:
  - bearerAuth: []
paths:
  /extraction-categories/{category_id}:
    patch:
      description: >
        Update an extraction category. Both fields are individually optional,
        but at least one of `name` or `model` must be present — an empty body is
        rejected.


        Renaming a category rewrites the `category` label on all of its
        dispositions in the same transaction, so extraction results and
        disposition responses stay consistent. Changing `model` switches the LLM
        used for the category's extraction pass on subsequent calls.
      parameters:
        - in: path
          name: category_id
          schema:
            type: string
            format: uuid
          required: true
          description: The category to update.
      requestBody:
        description: Fields to update on the category.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExtractionCategoryUpdate'
        required: true
      responses:
        '200':
          description: Category updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExtractionCategory'
        '400':
          description: A category with the new name is already attached to the agent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: >-
            Category not found — the id is unknown or its agent belongs to
            another account
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: >-
            Validation error — the body is empty, `model` is not one of the
            supported extraction models, or the body carries an unrecognised
            field
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    ExtractionCategoryUpdate:
      type: object
      description: >-
        Request body for updating an extraction category. Only included fields
        are changed, but at least one of `name` or `model` must be present — an
        empty body is rejected. Renaming a category rewrites the `category`
        label on all of its dispositions in the same transaction.
      anyOf:
        - required:
            - name
        - required:
            - model
      properties:
        name:
          type: string
          description: >-
            New category name. Must be unique among the agent's attached
            categories.
          example: Conversion Signals
        model:
          type: string
          description: New LLM model for the category's extraction pass.
          enum:
            - gpt-4.1-mini
            - gpt-4.1-nano
            - gpt-4o-mini
            - gpt-5-mini
            - gpt-5-nano
            - gpt-5.4-mini
            - gpt-5.6-luna
            - gemini-3.5-flash
            - gemini-3.5-flash-lite
          example: gpt-4.1-mini
    ExtractionCategory:
      type: object
      description: >-
        A named set of dispositions evaluated together in a single LLM pass. The
        category owns the model used for that pass.
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier for the category.
          example: 9b2e8f10-4c7d-4e2a-9f31-6a8d5c1b0e42
        name:
          type: string
          description: >-
            Category name. Unique among the categories attached to the same
            agent.
          example: Lead Quality
        model:
          type: string
          description: >-
            LLM model used for the category's extraction pass. Applies to every
            disposition in the category.
          example: gpt-4.1-mini
        agent_id:
          type: string
          format: uuid
          description: The agent this category is attached to.
          example: 123e4567-e89b-12d3-a456-426614174000
        created_at:
          type: string
          format: date-time
          description: ISO timestamp when the category was created.
          example: '2026-03-01T10:00:00Z'
        updated_at:
          type: string
          format: date-time
          description: ISO timestamp when the category was last updated.
          example: '2026-03-15T14:30:00Z'
    Error:
      required:
        - error
        - message
      type: object
      properties:
        error:
          type: integer
          format: int32
        message:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````