Delete a conversation only when the user asks to remove the thread, so that it and its messages are no longer accessible; the deletion cannot be undone through the API and needs the admin relation.
Arguments
idID!requiredConversation to soft-delete; the record is kept and returned.
Responses
mutation DeleteConversation($id: ID!) { deleteConversation(id: $id) { id projectId respondingAgentId type title summary status currentNode messageCount lastMessageAt metadata createdBy archivedAt createdAt updatedAt participants { id conversationId participantId participantType userId agentId displayName agentKind avatarUrl role lastReadMessageId notificationPreference joinedAt } activeAgentRun { runId conversationId messageId projectId requestedByUserId triggerPrincipalType triggerPrincipalId agentId status implementationKind workerKey sourceTargetKind sourceTargetEnvironmentId sourceTargetBranchId sourceTargetReleaseVersion runtimeTargetKind runtimeTargetEnvironmentId runtimeTargetBranchId parentConversationId parentRunId spawnedFromMessageId spawnedFromToolCallId inputAnchorMessageId handoffMessageId resolvedDeploymentId latestEventId latestExternalEventSequence waitingToolCallId waitingToolName terminalErrorCode terminalErrorMessage createdAt startedAt finishedAt runSnapshot } initialMessageId }}{ "data": { "deleteConversation": { "id": "string", "projectId": "string", "respondingAgentId": "string", "type": "string", "title": "string", "summary": "string", "status": "string", "currentNode": "string", "messageCount": 0, "lastMessageAt": "string", "metadata": {}, "createdBy": "string", "archivedAt": "string", "createdAt": "string", "updatedAt": "string", "participants": [ { "id": "string", "conversationId": "string", "participantId": "string", "participantType": "string", "userId": "string", "agentId": "string", "displayName": "string", "agentKind": "string", "avatarUrl": "https://example.com", "role": "string", "lastReadMessageId": "string", "notificationPreference": "string", "joinedAt": "string" } ], "activeAgentRun": { "runId": "string", "conversationId": "string", "messageId": "string", "projectId": "string", "requestedByUserId": "string", "triggerPrincipalType": "string", "triggerPrincipalId": "string", "agentId": "string", "status": "string", "implementationKind": "string", "workerKey": "string", "sourceTargetKind": "string", "sourceTargetEnvironmentId": "string", "sourceTargetBranchId": "string", "sourceTargetReleaseVersion": "string", "runtimeTargetKind": "string", "runtimeTargetEnvironmentId": "string", "runtimeTargetBranchId": "string", "parentConversationId": "string", "parentRunId": "string", "spawnedFromMessageId": "string", "spawnedFromToolCallId": "string", "inputAnchorMessageId": "string", "handoffMessageId": "string", "resolvedDeploymentId": "string", "latestEventId": 0, "latestExternalEventSequence": 0, "waitingToolCallId": "string", "waitingToolName": "string", "terminalErrorCode": "string", "terminalErrorMessage": "string", "createdAt": "string", "startedAt": "string", "finishedAt": "string", "runSnapshot": {} }, "initialMessageId": "string" } }}The Conversation in data.deleteConversation.