v13

latestOpenAPI 3.1.02026-08-07150119167.6 KB
SDK API

Patch Chat

Patches a chat.

This endpoint allows users to update specific fields of a chat identified by its chat_id.

  • chat_id: The unique identifier of the chat to be patched. This field cannot be updated.
  • request: A ChatModel object containing the fields to be updated. Only fields that are provided will be updated. The ID of the user who owns the chat and the chat's ID cannot be updated.

Responses:

  • 200: Returns the updated ChatModel.
  • 404: If the chat is not found.
  • 500: If there is an internal server error.
patch/v1/agents/{chat_id}

Path parameters

chat_idstring required

Request body

idstring uuid nullable
user_idstring nullable
original_chat_idstring uuid nullable
titlestring nullable
historyobject[] nullable
varsobject nullable
promptstring nullable
publicboolean nullable
system_promptstring nullable
modelstring nullable

Model name must start with one of ['@openai/', '@anthropic/', '@groq/', '@google/', '@togetherai/', '@openrouter/'].

mcp_serversstring[] nullable
toolsstring[] nullable

List of tool slugs available to the agent

slugstring nullable
price_in_centsinteger nullable
trial_period_in_daysinteger nullable
agent_builder_run_idstring uuid nullable

Response

Agent successfully patched

idstring uuid required
promptstring nullable
varsobject nullable
original_chat_idstring uuid nullable
titlestring nullable
historyobject[] nullable
publicboolean nullable
system_promptstring nullable
modelstring nullable
mcp_serversstring[] nullable
toolsstring[] nullable

List of tool slugs available to the agent

slugstring nullable
price_in_centsinteger nullable
trial_period_in_daysinteger nullable
agent_builder_run_idstring uuid nullable
count_runsinteger nullable
user_idstring required
created_atstring date-time nullable
updated_atstring date-time nullable
last_ran_atstring date-time nullable
user_feedback'approved' | 'rejected' | 'pending'