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

# Update a dictionary

> Updates any subset of `name`, `description`, or `terms`. Passing `terms` replaces the whole list -- there is no incremental add/remove. If the dictionary is attached to any agent and the new `char_count` would push that agent over 10,000 combined characters, the request fails with `DICTIONARY_CHAR_LIMIT_EXCEEDED`.



## OpenAPI

````yaml /openapi.json patch /dictionaries/{id}
openapi: 3.1.0
info:
  title: Vocobase Partner API
  version: '2.0'
  description: >-
    API for managing voice AI agents, documents, and calls on the Vocobase
    platform.
servers:
  - url: https://api.vocobase.com/api/v2
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Config
    description: >-
      Read and update partner configuration, webhook settings, and telephony
      credentials.
  - name: Agents
    description: Create, read, update, and delete voice AI agents.
  - name: Voices
    description: >-
      List voice tiers, available voices, and stream preview audio for agent
      configuration.
  - name: Documents
    description: Upload, manage, and delete knowledge base documents.
  - name: Agent Documents
    description: Link and unlink documents to agents for knowledge base integration.
  - name: Calls
    description: Initiate outbound calls and view call history.
  - name: Phone Numbers
    description: >-
      Import DIDs, assign agents for inbound routing, and re-sync carrier
      Application bindings.
  - name: Inbound Routing Policies
    description: >-
      Define pre-answer routing decisions for inbound calls before AI sessions
      are created.
  - name: Telephony Connections
    description: Create, list, rename, and disconnect named V2 telephony connections.
  - name: VoiceLink Management
    description: Manage VoiceLink reseller clients, DID mapping, and readiness sync.
  - name: Projects
    description: Organize agents into projects. Every agent belongs to exactly one project.
  - name: Dictionaries
    description: Speech-recognition dictionary CRUD and agent attachment.
  - name: Sessions
    description: Browser-initiated WebRTC voice sessions for in-app voice agents.
paths:
  /dictionaries/{id}:
    patch:
      tags:
        - Dictionaries
      summary: Update a dictionary
      description: >-
        Updates any subset of `name`, `description`, or `terms`. Passing `terms`
        replaces the whole list -- there is no incremental add/remove. If the
        dictionary is attached to any agent and the new `char_count` would push
        that agent over 10,000 combined characters, the request fails with
        `DICTIONARY_CHAR_LIMIT_EXCEEDED`.
      operationId: updateDictionary
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: Dictionary ID.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 100
                description:
                  type:
                    - string
                    - 'null'
                  maxLength: 500
                terms:
                  type: array
                  items:
                    type: string
            example:
              terms:
                - Vocobase
                - SKU-4471
                - SKU-4472
                - Pro Annual Plan
      responses:
        '200':
          description: Dictionary updated.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    const: true
                  data:
                    $ref: '#/components/schemas/Dictionary'
        '400':
          description: Validation error or character limit exceeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                validation:
                  summary: Validation error
                  value:
                    success: false
                    error:
                      code: VALIDATION_ERROR
                      message: name must be between 1 and 100 characters
                charLimit:
                  summary: Agent char limit exceeded
                  value:
                    success: false
                    error:
                      code: DICTIONARY_CHAR_LIMIT_EXCEEDED
                      message: >-
                        This update would push agent
                        a1b2c3d4-e5f6-7890-abcd-ef1234567890 over the
                        10,000-character limit.
                      details:
                        agent_id: a1b2c3d4-e5f6-7890-abcd-ef1234567890
                        current_chars: 10820
                        limit_chars: 10000
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          description: Dictionary not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                success: false
                error:
                  code: DICTIONARY_NOT_FOUND
                  message: Dictionary not found
        '409':
          description: Dictionary name already taken by this partner.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                success: false
                error:
                  code: DICTIONARY_NAME_TAKEN
                  message: A dictionary with this name already exists.
        '500':
          $ref: '#/components/responses/InternalError'
components:
  schemas:
    Dictionary:
      allOf:
        - $ref: '#/components/schemas/DictionarySummary'
        - type: object
          properties:
            terms:
              type: array
              items:
                type: string
              description: >-
                Normalized list of terms (whitespace-trimmed, case-insensitively
                deduped, non-string entries dropped).
    ErrorResponse:
      type: object
      properties:
        success:
          type: boolean
          const: false
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
          required:
            - code
            - message
      required:
        - success
        - error
    DictionarySummary:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        description:
          type:
            - string
            - 'null'
        term_count:
          type: integer
          description: Number of unique terms after normalization.
        char_count:
          type: integer
          description: Total characters across all terms.
        attached_agent_count:
          type: integer
          description: Number of agents this dictionary is currently attached to.
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
  responses:
    Unauthorized:
      description: Missing or invalid API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            success: false
            error:
              code: UNAUTHORIZED
              message: Invalid or missing API key
    InternalError:
      description: Unexpected server error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            success: false
            error:
              code: INTERNAL_ERROR
              message: An unexpected error occurred
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key in format: `rg_live_xxxx`. Pass as a Bearer token in the
        Authorization header.

````