---
title: "Update agent conversation title"
method: PATCH
path: "/agents/{agentKey}/conversations/{conversationId}/title"
tags: ["Agents"]
---

# Update agent conversation title

`PATCH /agents/{agentKey}/conversations/{conversationId}/title`

Updates the display title for an agent conversation owned by the caller.

The controller looks up the conversation by `_id`, `orgId`, `userId`,
`agentKey`, and `isDeleted: false`.

The request body uses the shared title validator (`1..200` chars), and
the controller trims the incoming title before saving it. A whitespace-only
title can therefore still return HTTP 400 even if the raw string is
non-empty.

## Path parameters

- `agentKey` string, required
- `conversationId` string, objectId, required

## Request body

- ConversationTitleUpdateRequest
  - `title` string, required — New title for the conversation

## Response `200`

Title updated successfully

- AgentConversationTitleUpdateResponse
  - `conversation` StoredAgentConversation, required — Stored agent conversation document returned by non-list endpoints.
    - `_id` string, objectId
    - `agentKey` string
    - `userId` string, objectId
    - `orgId` string, objectId
    - `title` string
    - `initiator` string, objectId
    - `messages` Message[]
      - `_id` string, objectId — Unique message identifier
      - `messageType` 'user_query' | 'bot_response' | 'error' | 'feedback' | 'system' — Type of message: - `user_query` - User's question or input - `bot_response` - AI-generated response - `error` - Error message from the system - `feedback` - User feedback on a response - `system` - System notification or status
      - `content` string — The message text content
      - `contentFormat` 'MARKDOWN' | 'JSON' | 'HTML' — Format of the content for rendering
      - `citations` CitationReference[] — References to source documents used in the response
        - `citationId` string, objectId — ID of the citation record
        - `relevanceScore` number — How relevant this citation is to the query (0-1)
        - `excerpt` string — Relevant excerpt from the source document
        - `context` string — Additional context around the citation
      - `confidence` string, nullable — AI confidence in the answer. Present only on `bot_response` messages, and only when the model emitted a trailing confidence block. This field is now optional and nullable; it was previously always present and non-nullable. Treat a missing or `null` value as "no confidence reported" and guard before using it. Change effective in SDK v1.3.0 (v1.2.0 and earlier always populated it).
      - `followUpQuestions` FollowUpQuestion[] — Suggested follow-up questions
        - `question` string — The suggested question text
        - `confidence` string — Confidence level for this suggestion
        - `reasoning` string — Why this question might be relevant
      - `feedback` MessageFeedback[] — User feedback on this message
        - `isHelpful` boolean — Overall helpfulness rating
        - `ratings` object
          - `accuracy` integer — How accurate was the information (1-5)
          - `relevance` integer — How relevant was the response (1-5)
          - `completeness` integer — How complete was the answer (1-5)
          - `clarity` integer — How clear was the explanation (1-5)
        - `categories` string[] — Categories of issues or positive attributes identified
        - `comments` object
          - `positive` string — What was good about the response
          - `negative` string — What could be improved
          - `suggestions` string — Specific suggestions for improvement
        - `citationFeedback` object[] — Feedback on individual citations
          - `_id` string, objectId — Auto-generated sub-document identifier
          - `citationId` string, objectId
          - `isRelevant` boolean
          - `relevanceScore` integer
          - `comment` string
        - `followUpQuestionsHelpful` boolean — Were the suggested follow-up questions helpful
        - `unusedFollowUpQuestions` string[] — Follow-up questions that were suggested but not used by the user
        - `source` 'user' | 'system' | 'admin' | 'auto' — Origin of the feedback. Always present in responses (server applies the default `user`).
        - `feedbackProvider` string, objectId — User who submitted the feedback
        - `timestamp` integer — Time the feedback was created, stored as a Number (epoch milliseconds) with a server-side default of `Date.now`, so always present in responses. Not an ISO 8601 datetime.
        - `revisions` object[] — Audit trail of edits to this feedback entry
          - `_id` string, objectId — Auto-generated sub-document identifier
          - `updatedFields` string[] — Names of feedback fields modified in this revision
          - `previousValues` object — Map of previously-set values for the fields named in `updatedFields`, keyed by field name. Stored as a Mongoose Map of Mixed values.
          - `updatedBy` string, objectId
          - `updatedAt` integer — Time the revision was recorded, as epoch milliseconds.
        - `metrics` object — Optional telemetry captured alongside the feedback
          - `timeToFeedback` number — Time from response delivery to feedback submission
          - `userInteractionTime` number — Total time the user spent reviewing the response
          - `feedbackSessionId` string
          - `userAgent` string
          - `platform` string
      - `metadata` object
        - `processingTimeMs` number — Time taken to generate response in milliseconds
        - `modelVersion` string — Version of the AI model used
        - `aiTransactionId` string — Transaction ID for tracking in AI backend
        - `reason` string — Additional context or reasoning
      - `modelInfo` ConversationModelInfo — AI model configuration recorded against a conversation or message.
        - `modelKey` string — Stable identifier of the configured model record
        - `modelName` string — Provider-facing model name (e.g. `gpt-4o-mini`)
        - `modelProvider` string — Provider key (e.g. `openai`, `anthropic`)
        - `modelFriendlyName` string — Human-readable display name
        - `chatMode` string — Chat mode used for this turn (e.g. `quick`, `internal_search`)
      - `appliedFilters` AppliedFilters — Rich filter state selected by the user, used for display and persistence only. This mirrors the active selection shown in the UI and is distinct from the machine-readable `filters` field used for retrieval scoping.
        - `apps` AppliedFilterNode[] — Applied app/connector filter nodes
          - `id` string — Unique identifier of the filter node
          - `name` string — Display name of the filter node
          - `nodeType` string — Type of the node (e.g. app, recordGroup, folder, record)
          - `connector` string — Connector identifier associated with this node
        - `kb` AppliedFilterNode[] — Applied knowledge-base filter nodes
          - `id` string — Unique identifier of the filter node
          - `name` string — Display name of the filter node
          - `nodeType` string — Type of the node (e.g. app, recordGroup, folder, record)
          - `connector` string — Connector identifier associated with this node
      - `referenceData` object[] — Reference identifiers extracted from tool responses, used to scope follow-up queries (for example Jira project keys or record IDs).
        - `name` string — Display name shown to the user.
        - `id` string — Technical identifier (numeric ID, UUID, etc.).
        - `type` string — Item type (e.g. `project`, `issue`, `file`, `notebook`, `page`).
        - `app` string — Source application (e.g. `jira`, `confluence`, `sharepoint`, `slack`, `drive`, `gmail`).
        - `webUrl` string — URL to open the item in a browser.
        - `metadata` object — App-specific fields keyed by name (e.g. `key` for a Jira project, `siteId` for a SharePoint document).
      - `attachments` ChatAttachmentRef[] — Files uploaded for this message turn (see `POST /conversations/attachments/upload`).
        - `recordId` string, required — Attachment record id returned from the upload endpoint.
        - `recordName` string — Original display name of the file when known.
        - `mimeType` string — MIME type of the uploaded file.
        - `extension` string — File extension (e.g. `pdf`).
        - `virtualRecordId` string — Optional synthetic record id used by the graph layer.
      - `tools` object[] — Tool call results invoked during this message turn.
        - `toolName` string
        - `toolResult` unknown
      - `createdAt` string, date-time
      - `updatedAt` string, date-time
    - `status` 'None' | 'Inprogress' | 'Complete' | 'Failed'
    - `failReason` string
    - `modelInfo` ConversationModelInfo — AI model configuration recorded against a conversation or message.
      - `modelKey` string — Stable identifier of the configured model record
      - `modelName` string — Provider-facing model name (e.g. `gpt-4o-mini`)
      - `modelProvider` string — Provider key (e.g. `openai`, `anthropic`)
      - `modelFriendlyName` string — Human-readable display name
      - `chatMode` string — Chat mode used for this turn (e.g. `quick`, `internal_search`)
    - `isShared` boolean
    - `shareLink` string
    - `sharedWith` object[]
      - `userId` string, objectId
      - `accessLevel` 'read' | 'write'
    - `isArchived` boolean
    - `archivedBy` string, objectId, nullable
    - `isDeleted` boolean
    - `deletedBy` string, objectId, nullable
    - `conversationErrors` object[]
      - `_id` string, objectId
      - `message` string
      - `errorType` string
      - `timestamp` string, date-time
      - `messageId` string, objectId
      - `stack` string
      - `metadata` object
    - `conversationSource` 'agent_chat'
    - `lastActivityAt` integer
    - `createdAt` string, date-time
    - `updatedAt` string, date-time
    - `__v` integer
  - `meta` RequestMeta, required — Basic request metadata returned by the API.
    - `requestId` string
    - `timestamp` string, date-time, required
    - `duration` integer, required

## Other responses

- `400` — Invalid path or body input. This includes Zod validation failures for malformed `conversationId` or invalid `title` payloads, plus controller-level bad requests such as titles that become empty after trimming.
- `401` — Unauthorized
- `404` — Agent conversation not found for the authenticated user, organization, and agent scope, or the conversation is soft-deleted.

---

[API](https://skmtc.net/pipeshub-ai/apis/pipeshub-api.md) · [All operations](https://skmtc.net/pipeshub-ai/apis/pipeshub-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/pipeshub-ai/pipeshub-api/versions/abd27cfefc73/schema)
