updateConversation
Requires an authenticated session.
Changes a conversation's title. The caller must have access to the conversation. Needs a signed-in user.
Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.
Example:
- GraphQL
- cURL
mutation UpdateConversation($id: String!, $input: UpdateConversationInput!) {
updateConversation(id: $id, input: $input) {
id
title
type
createdAt
channelId
isGroup
messages {
id
createdAt
content
conversationId
metadata
role
}
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation UpdateConversation($id: String!, $input: UpdateConversationInput!) {\n updateConversation(id: $id, input: $input) {\n id\n title\n type\n createdAt\n channelId\n isGroup\n messages {\n id\n createdAt\n content\n conversationId\n metadata\n role\n }\n }\n}",
"variables": {
"id": "string",
"input": {
"title": "string"
}
}
}
EOF
Variables:
{
"id": "string",
"input": {
"title": "string"
}
}
Response:
{
"data": {
"updateConversation": {
"id": "id",
"title": "string",
"type": "string",
"createdAt": "2025-01-15T00:00:00Z",
"channelId": "string",
"isGroup": true,
"messages": [
{
"id": "id",
"createdAt": "2025-01-15T00:00:00Z",
"content": "string",
"conversationId": "string",
"metadata": {},
"role": "string"
}
]
}
}
}
updateConversation(
id: String!
input: UpdateConversationInput!
): ChatConversation!
Arguments
updateConversation.id ● String! non-null scalar
The ID of the conversation.
updateConversation.input ● UpdateConversationInput! non-null input
The new title.
Type
ChatConversation object
A chat conversation: a direct chat, a group or a channel.