Update a conversation

Authentication

AuthorizationBearer
API key or Clerk session token

Path parameters

idstringRequired

Request

This endpoint expects an object.
agentIdstring or nullOptional1-255 characters

Null clears metadata.agentId; omit to leave it unchanged.

messageslist of objectsOptional

Full-fidelity transcript. A tool message must carry toolResults answering an assistant toolCalls entry issued earlier in the array; ids and createdAt are minted when omitted.

messagesModeenumOptionalDefaults to replace

How to apply messages. replace (the default) swaps the whole transcript. append adds them to the end, skipping any message whose id is already stored, so a chunked import can retry a chunk safely; the combined transcript is validated and must satisfy the same tool-pairing discipline.

Allowed values:
metadatamap from strings to anyOptional
modelIdstringOptional<=255 characters
ownerIdstring or nullOptional1-255 characters

Reassigns the owner (indexed owner_id column, filterable via ?ownerId=). Overrides a nested metadata.ownerId. Null clears the owner; omit to leave it unchanged.

sourceobjectOptional
Import provenance, stored as metadata.importSource.
systemPromptstringOptional
titlestringOptional<=500 characters

Response

Conversation updated
createdAtstring
idstring
messageslist of objects
metadatamap from strings to any
modelIdstring or null
ownerIdstring or null
sourceenum
systemPromptstring or null
titlestring
updatedAtstring
importedbooleanOptional

Set by POST /v1/conversations only. True when this call created the conversation (201); false when a conversation with the same source.system and source.externalId already existed and is returned unchanged (200).

schemaWarningslist of objectsOptional

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
409
Conflict Error
422
Unprocessable Entity Error
500
Internal Server Error