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

# Edit a suggestion before approving it

> Rewrite a pending suggestion — typically to fill in a `[COMPLETAR]` blank that blocks approval. Only suggestions can be edited here; ordinary content is edited through updateEntry.



## OpenAPI

````yaml /api-reference/specs/claudia/v1.json put /v1/knowledge-bases/{kbId}/improvements/{entryId}
openapi: 3.0.1
info:
  title: Claudia API
  version: 1.0.0
servers:
  - url: https://api.cloudhumans.com/claudia
    description: Production
  - url: https://api.cloudhumans.com/claudia/staging
    description: Staging
security:
  - bearerAuth: []
tags:
  - name: MCP Servers
    description: >-
      The MCP servers your agents can call tools on. Registering one here is
      what makes its tools selectable in an agent; the credentials it needs are
      stored encrypted and never read back.
  - name: Knowledge Base Content
    description: Read, search and edit the content that answers your customers.
  - name: Content Quality
    description: Rewrites proposed for content that is answering your customers badly.
  - name: Playground
    description: >-
      Talk to one of your agents as if you were a customer, without touching a
      real conversation.
  - name: Project Settings
    description: >-
      Read and change how a ClaudIA project behaves — the settings screens of
      the ClaudIA app, as an API.
  - name: Content Improvements
    description: Answers Claudia proposes for questions your content does not cover yet.
  - name: Knowledge Bases
    description: The knowledge bases your account can manage.
  - name: Content Sources
    description: The sites Claudia crawls to keep a knowledge base in sync.
paths:
  /v1/knowledge-bases/{kbId}/improvements/{entryId}:
    put:
      tags:
        - Content Improvements
      summary: Edit a suggestion before approving it
      description: >-
        Rewrite a pending suggestion — typically to fill in a `[COMPLETAR]`
        blank that blocks approval. Only suggestions can be edited here;
        ordinary content is edited through updateEntry.
      operationId: updateImprovement
      parameters:
        - name: kbId
          in: path
          description: Knowledge base to operate on. Get the ids from listMyKnowledgeBases.
          required: true
          schema:
            type: string
        - name: entryId
          in: path
          description: Suggestion to edit, as returned by listImprovements.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ImprovementEdit'
        required: true
      responses:
        '200':
          description: The suggestion as stored.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Improvement'
        '400':
          description: The request could not be answered as written.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Missing, expired or invalid credentials.
        '403':
          description: The credentials hold no account allowed to manage this content.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: >-
            No such resource, or none these credentials can reach — the two are
            deliberately indistinguishable.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit applied by the API gateway. Back off and retry.
components:
  schemas:
    ImprovementEdit:
      required:
        - response
        - title
        - type
      type: object
      properties:
        title:
          type: string
          description: The question this content answers.
        response:
          type: string
          description: >-
            The answer to publish once approved. Fill in any `[COMPLETAR]` blank
            here.
        type:
          type: string
          description: Support level this content answers at. INTERACTIVE is rejected.
          enum:
            - N1
            - N2
            - INTERACTIVE
        label:
          type: string
          description: Tag to apply. Omit to leave the content untagged.
        topic:
          type: string
          description: Topic to group this content under.
      description: New text for a suggestion, before approving it.
    Improvement:
      required:
        - createdAt
        - disabled
        - hasPlaceholder
        - updatedAt
      type: object
      properties:
        id:
          type: string
          description: Use this id to edit, approve or reject the suggestion.
          example: 6683f1c2a4b19e0012ab34cd
        title:
          type: string
          description: The question customers asked that nothing answered.
          example: Vocês entregam no interior?
        response:
          type: string
          description: >-
            The answer being suggested. Edit it before approving if it needs
            work.
        label:
          type: string
          description: Tag suggested for this content.
          example: logistica
        topic:
          type: string
          description: Topic this content would be grouped under.
          example: Entregas
        type:
          type: string
          description: Support level the suggestion would answer at.
          example: N1
          enum:
            - N1
            - N2
            - INTERACTIVE
        disabled:
          type: boolean
          description: >-
            Always true while pending — a suggestion only starts answering once
            approved.
          example: true
        gapStatus:
          type: string
          description: >-
            How the gap compares to what you already have: NEW, SIMILAR to
            existing content, or an answer that EXISTS but did not surface.
          enum:
            - NEW
            - SIMILAR
            - EXISTS
        rationale:
          type: string
          description: Why this gap was proposed.
        ticketCount:
          type: integer
          description: How many conversations in the analysed window hit this gap.
          format: int32
          example: 14
        sampleQuestions:
          type: array
          description: >-
            Real customer questions behind the gap, already stripped of personal
            data.
          items:
            $ref: '#/components/schemas/SampleQuestion'
        hasPlaceholder:
          type: boolean
          description: >-
            True when the suggested answer still carries a blank the pipeline
            could not fill (e.g. `[COMPLETAR: prazo]`). Approving it is refused
            until you edit it.
          example: false
        createdAt:
          type: string
          description: When it was suggested (ISO-8601).
          example: '2026-08-10T14:32:05'
        updatedAt:
          type: string
          description: When it last changed (ISO-8601).
          example: '2026-08-10T18:20:41'
      description: >-
        An answer Claudia suggests for a question your content does not cover
        yet.
    Error:
      required:
        - error
      type: object
      properties:
        error:
          type: string
          description: What went wrong.
          example: 'Forbidden: token holds no claim for the requested account'
      description: Something the caller needs to fix.
    SampleQuestion:
      required:
        - conversationId
        - text
      type: object
      properties:
        conversationId:
          type: string
          description: >-
            Conversation the question came from, so you can read it in
            CloudChat.
        text:
          type: string
          description: What the customer asked, stripped of personal data.
      description: A customer question behind a suggestion.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````