Stop a running turn, as the Stop button in the app does. Chat keeps what it wrote, its
searches stop, and the turn ends cancelled, charged for the work done. A finished turn is
returned as it is. latest stops whatever the chat is working on.
Why a finished turn ended: done; needs_input (Chat asked questions and waits for the answers, see reply.questions); stopped (cancelled); error. Null while running.
message: a message or answers started the turn. schedule: one of the chat's scheduled tasks ran, and nobody sent a message (only a chat started in the app has scheduled tasks).
When Chat last made progress on the turn (a reply, a search starting or finishing). A running turn with no progress for several minutes is stuck or slow and can be cancelled.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Happenstance","description":"Happenstance API Documentation","colors":{"primary":"#16a34a","light":"#16a34a","dark":"#16a34a"},"logo":{"light":"https://mintcdn.com/happenstance/YSbudQ8_lua9CNAo/logo/happenstance.png?fit=max\u0026auto=format\u0026n=YSbudQ8_lua9CNAo\u0026q=85\u0026s=a2c2c708eb248e6bea6607330505d0f9","dark":"https://mintcdn.com/happenstance/YSbudQ8_lua9CNAo/logo/happenstance.png?fit=max\u0026auto=format\u0026n=YSbudQ8_lua9CNAo\u0026q=85\u0026s=a2c2c708eb248e6bea6607330505d0f9"},"favicon":"https://mintcdn.com/happenstance/YSbudQ8_lua9CNAo/favicon.ico?fit=max\u0026auto=format\u0026n=YSbudQ8_lua9CNAo\u0026q=85\u0026s=473cc44090dbce2ce1585f7bf108bc4b","api":{"playground":{"display":"interactive"},"examples":{"languages":["curl","python","javascript"]}},"background":{"color":{"dark":"#191a1a"}},"navbar":{"links":[{"href":"https://discord.gg/4YV5Sxd534","label":"Community"},{"href":"https://github.com/happenstance-ai/cookbook","label":"Cookbook"}],"primary":{"type":"button","label":"Home","href":"https://happenstance.ai"}},"errors":{"404":{"redirect":false,"title":"Not Found"}},"contextual":{"options":["copy","view","chatgpt","claude"],"display":"header"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"happenstance","hasAudioNarration":false,"actualSubdomain":"happenstance","customDomains":["developer.happenstance.ai"],"gitSource":{"type":"github","owner":"happenstance-ai","repo":"developer-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6adb99c08b194079f4a33b08","collectionId":"0f7ec737-09d5-4e48-a55d-2c29b564802c","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6adb99c08b194079f4a33b08"},"entitlements":{},"buildId":"6adb99c08b194079f4a33b08","clientVersion":"0.0.3965","searchFilterCounts":[{"language":"default","tag":"Connect","count":26},{"language":"default","tag":"API","count":20},{"language":"default","tag":"API Reference","count":17}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-v7-file-tree","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"pause-universal-search-reconcile","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"per-site-search-delta","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-private-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-nav-generations","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-agent-model-picker","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"isAtlas":false,"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/cancel-chat-turn","slug":"/api-reference/cancel-chat-turn","pageMetadata":{"title":"Cancel Chat Turn","description":"Stop a running turn, as the Stop button in the app does. Chat keeps what it wrote, its\nsearches stop, and the turn ends cancelled, charged for the work done. A finished turn is\nreturned as it is. `latest` stops whatever the chat is working on.","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/chat/{chat_id}/turns/{turn_id}/cancel","href":"/api-reference/cancel-chat-turn","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_components.p, {\n children: [\"Stop a running turn, as the Stop button in the app does. Chat keeps what it wrote, its\\nsearches stop, and the turn ends cancelled, charged for the work done. A finished turn is\\nreturned as it is. \", _jsx(_components.code, {\n children: \"latest\"\n }), \" stops whatever the chat is working on.\"]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Cancel Chat Turn","description":"Stop a running turn, as the Stop button in the app does. Chat keeps what it wrote, its\nsearches stop, and the turn ends cancelled, charged for the work done. A finished turn is\nreturned as it is. `latest` stops whatever the chat is working on.","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/chat/{chat_id}/turns/{turn_id}/cancel","href":"/api-reference/cancel-chat-turn","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"summary":"Cancel Chat Turn","description":"Stop a running turn, as the Stop button in the app does. Chat keeps what it wrote, its\nsearches stop, and the turn ends cancelled, charged for the work done. A finished turn is\nreturned as it is. `latest` stops whatever the chat is working on.","operationId":"cancel_chat_turn_v1_chat__chat_id__turns__turn_id__cancel_post","security":["f7405168-55a0-4054-9f93-9b8b79193133"],"parameters":["48bdf212-041c-4f80-b80a-6e238b736c31","78c515e0-7c91-4616-89ec-11c05b94e400"],"responses":{"200":"f9f8c40e-f6ce-49d1-9d59-d5805aee3c72","400":"2c54014e-2945-4220-9c9d-f6835e2c471f","401":"27251d1e-c97b-4d22-9edb-f81a1437b15c","402":"7e49dbf5-1e93-418a-af47-fe69644815aa","403":"99f62c0a-147c-4af1-9a24-d8f028abb801","404":"55276e24-defe-4cf1-8cf7-7bfe1893c0ec","410":"6ec946e7-4cca-4c1b-ab80-34dcb1897397","422":"156d80a8-0c52-4963-b6f4-12ad8bce6626","500":"5ebc2856-f40f-411c-b782-d77f3f91032c","503":"ea18e188-cd82-4111-8928-07ec20aa347f"},"method":"post","type":"path","servers":["3928d332-2975-4017-a644-c4e0c2212c48"],"path":"/v1/chat/{chat_id}/turns/{turn_id}/cancel","baseUrlOptions":["https://api.happenstance.ai"],"title":"Cancel Chat Turn","codeSamples":[],"requestExampleLanguages":["bash","python","javascript"],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"48bdf212-041c-4f80-b80a-6e238b736c31":{"name":"chat_id","in":"path","required":true,"schema":{"type":"string","title":"Chat Id","isRequired":true,"uniqueKey":"","typeLabel":"string"}},"78c515e0-7c91-4616-89ec-11c05b94e400":{"name":"turn_id","in":"path","required":true,"schema":{"type":"string","description":"A turn ID from POST /v1/chat or /messages, or `latest` for the chat's newest turn","title":"Turn Id","isRequired":true,"uniqueKey":"","typeLabel":"string"},"description":"A turn ID from POST /v1/chat or /messages, or `latest` for the chat's newest turn"}},"responses":{"f9f8c40e-f6ce-49d1-9d59-d5805aee3c72":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"id":{"type":"string","title":"Id","description":"The turn's id","isRequired":true,"uniqueKey":"id","typeLabel":"string"},"chat_id":{"type":"string","title":"Chat Id","description":"The chat's id","isRequired":true,"uniqueKey":"chat_id","typeLabel":"string"},"status":{"type":"string","enum":["queued","running","completed","failed","cancelled"],"title":"Status","description":"queued (not started), running, completed, failed (not charged) or cancelled","isRequired":true,"uniqueKey":"status","typeLabel":"enum\u003cstring>"},"message":{"type":"string","title":"Message","description":"The message that started the turn, or for a scheduled run the task's instruction","isRequired":true,"uniqueKey":"message","typeLabel":"string"},"messages":{"items":{"type":"string","uniqueKey":"messages.items.[INDEX]","typeLabel":"string"},"type":"array","title":"Messages","description":"Every message in the turn: the first started it, any later one was sent while it ran and joined it. A scheduled run's turn has none.","isRequired":true,"uniqueKey":"messages","typeLabel":"string[]"},"reply":{"properties":{"markdown":{"type":"string","title":"Markdown","description":"Chat's reply, as markdown with absolute links: its latest message, and every message with people or drafts. People appear as list items and drafts as quoted blocks; read them as data with /people and /drafts. Grows while the turn runs.","isRequired":true,"uniqueKey":"reply.markdown","typeLabel":"string"},"people_count":{"type":"integer","title":"People Count","description":"People shown in this turn","isRequired":true,"uniqueKey":"reply.people_count","typeLabel":"integer"},"people_new_count":{"type":"integer","title":"People New Count","description":"People shown in this turn who weren't shown in an earlier one","isRequired":true,"uniqueKey":"reply.people_new_count","typeLabel":"integer"},"drafts_count":{"type":"integer","title":"Drafts Count","description":"Message drafts written in this turn","isRequired":true,"uniqueKey":"reply.drafts_count","typeLabel":"integer"},"updates":{"items":{"type":"string","uniqueKey":"reply.updates.items.[INDEX]","typeLabel":"string"},"type":"array","title":"Updates","description":"Chat's earlier notes in this turn that hold no people or drafts, such as 'searching now' or a reply to a message that joined the turn. Not part of the answer.","uniqueKey":"reply.updates","typeLabel":"string[]"},"searches":{"items":{"properties":{"search_id":{"type":"string","title":"Search Id","description":"The search's id, for GET /v1/search/{search_id}","isRequired":true,"uniqueKey":"reply.searches.items.[INDEX].search_id","typeLabel":"string"},"status":{"type":"string","enum":["running","completed","failed","stopped"],"title":"Status","description":"The search's status","isRequired":true,"uniqueKey":"reply.searches.items.[INDEX].status","typeLabel":"enum\u003cstring>"},"page_id":{"oneOf":[{"type":"string","title":"Page Id","description":"The find-more page of that search, when this was one","uniqueKey":"reply.searches.items.[INDEX].page_id.oneOf.0","typeLabel":"string"},{"type":"null","title":"Page Id","description":"The find-more page of that search, when this was one","uniqueKey":"reply.searches.items.[INDEX].page_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"reply.searches.items.[INDEX].page_id","typeLabel":"string | null"},"turn_id":{"oneOf":[{"type":"string","title":"Turn Id","description":"The turn that ran it","uniqueKey":"reply.searches.items.[INDEX].turn_id.oneOf.0","typeLabel":"string"},{"type":"null","title":"Turn Id","description":"The turn that ran it","uniqueKey":"reply.searches.items.[INDEX].turn_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"reply.searches.items.[INDEX].turn_id","typeLabel":"string | null"},"query":{"oneOf":[{"type":"string","title":"Query","description":"What Chat searched for","uniqueKey":"reply.searches.items.[INDEX].query.oneOf.0","typeLabel":"string"},{"type":"null","title":"Query","description":"What Chat searched for","uniqueKey":"reply.searches.items.[INDEX].query.oneOf.1","typeLabel":"null"}],"uniqueKey":"reply.searches.items.[INDEX].query","typeLabel":"string | null"},"results_count":{"oneOf":[{"type":"integer","title":"Results Count","description":"How many people the search returned, once completed","uniqueKey":"reply.searches.items.[INDEX].results_count.oneOf.0","typeLabel":"integer"},{"type":"null","title":"Results Count","description":"How many people the search returned, once completed","uniqueKey":"reply.searches.items.[INDEX].results_count.oneOf.1","typeLabel":"null"}],"uniqueKey":"reply.searches.items.[INDEX].results_count","typeLabel":"integer | null"}},"additionalProperties":false,"type":"object","required":["search_id","status"],"title":"ChatSearchV1","description":"A people search Chat ran. Read all its results with GET /v1/search/{search_id} (with\npage_id for a find-more page).","uniqueKey":"reply.searches.items.[INDEX]","typeLabel":"ChatSearchV1 · object"},"type":"array","title":"Searches","description":"People searches run in this turn","uniqueKey":"reply.searches","typeLabel":"ChatSearchV1 · object[]"},"suggested_followup":{"oneOf":[{"type":"string","title":"Suggested Followup","description":"A next message Chat suggests, in the user's voice, when it offers one","uniqueKey":"reply.suggested_followup.oneOf.0","typeLabel":"string"},{"type":"null","title":"Suggested Followup","description":"A next message Chat suggests, in the user's voice, when it offers one","uniqueKey":"reply.suggested_followup.oneOf.1","typeLabel":"null"}],"uniqueKey":"reply.suggested_followup","typeLabel":"string | null"},"questions":{"items":{"properties":{"index":{"type":"integer","title":"Index","description":"Its index, as answers[].question_index takes it","isRequired":true,"uniqueKey":"reply.questions.items.[INDEX].index","typeLabel":"integer"},"header":{"type":"string","title":"Header","description":"A one to three word label","isRequired":true,"uniqueKey":"reply.questions.items.[INDEX].header","typeLabel":"string"},"question":{"type":"string","title":"Question","isRequired":true,"uniqueKey":"reply.questions.items.[INDEX].question","typeLabel":"string"},"options":{"items":{"properties":{"label":{"type":"string","title":"Label","description":"The option, as answers[].selected takes it","isRequired":true,"uniqueKey":"reply.questions.items.[INDEX].options.items.[INDEX].label","typeLabel":"string"},"description":{"type":"string","title":"Description","description":"What choosing it means","isRequired":true,"uniqueKey":"reply.questions.items.[INDEX].options.items.[INDEX].description","typeLabel":"string"}},"additionalProperties":false,"type":"object","required":["label","description"],"title":"ChatQuestionOptionV1","uniqueKey":"reply.questions.items.[INDEX].options.items.[INDEX]","typeLabel":"ChatQuestionOptionV1 · object"},"type":"array","title":"Options","isRequired":true,"uniqueKey":"reply.questions.items.[INDEX].options","typeLabel":"ChatQuestionOptionV1 · object[]"},"multi_select":{"type":"boolean","title":"Multi Select","description":"Whether more than one option may be chosen","isRequired":true,"uniqueKey":"reply.questions.items.[INDEX].multi_select","typeLabel":"boolean"}},"additionalProperties":false,"type":"object","required":["index","header","question","options","multi_select"],"title":"ChatQuestionV1","description":"A question Chat asked the user, with options to choose from.","uniqueKey":"reply.questions.items.[INDEX]","typeLabel":"ChatQuestionV1 · object"},"type":"array","title":"Questions","description":"The last questions Chat asked the user in this turn. When the turn ends with stop_reason needs_input, Chat waits for their answers: send them with POST /v1/chat/{chat_id}/messages (answers, or a message). Answer from what you know of the user's goal; ask the user when you don't know.","uniqueKey":"reply.questions","typeLabel":"ChatQuestionV1 · object[]"}},"additionalProperties":false,"type":"object","required":["markdown","people_count","people_new_count","drafts_count"],"title":"ChatReplyV1","isRequired":true,"uniqueKey":"reply","typeLabel":"ChatReplyV1 · object"},"usage":{"properties":{"searches":{"type":"integer","title":"Searches","description":"People searches Chat ran","isRequired":true,"uniqueKey":"usage.searches","typeLabel":"integer"},"web_searches":{"type":"integer","title":"Web Searches","description":"Web searches and page reads Chat ran","isRequired":true,"uniqueKey":"usage.web_searches","typeLabel":"integer"},"model_calls":{"type":"integer","title":"Model Calls","description":"Model calls Chat made","isRequired":true,"uniqueKey":"usage.model_calls","typeLabel":"integer"},"people_reviewed":{"type":"integer","title":"People Reviewed","description":"People the searches returned for Chat to review","isRequired":true,"uniqueKey":"usage.people_reviewed","typeLabel":"integer"},"credits_charged":{"oneOf":[{"type":"number","title":"Credits Charged","description":"Credits charged for the turn, to two decimal places. Null while the turn runs, for a few seconds after it finishes until billing records the charge, and for chats started in the Happenstance app.","uniqueKey":"usage.credits_charged.oneOf.0","typeLabel":"number"},{"type":"null","title":"Credits Charged","description":"Credits charged for the turn, to two decimal places. Null while the turn runs, for a few seconds after it finishes until billing records the charge, and for chats started in the Happenstance app.","uniqueKey":"usage.credits_charged.oneOf.1","typeLabel":"null"}],"uniqueKey":"usage.credits_charged","typeLabel":"number | null"},"scope":{"oneOf":[{"type":"object","title":"ChatScopeV1","description":"Whose networks were searched; null when nothing was","required":["my_connections","friends_connections","all_groups"],"properties":{"my_connections":{"type":"boolean","title":"My Connections","description":"The user's own connections","isRequired":true,"uniqueKey":"usage.scope.oneOf.0.my_connections","typeLabel":"boolean"},"friends_connections":{"type":"boolean","title":"Friends Connections","description":"The user's friends' connections","isRequired":true,"uniqueKey":"usage.scope.oneOf.0.friends_connections","typeLabel":"boolean"},"all_groups":{"type":"boolean","title":"All Groups","description":"Every group the user is in","isRequired":true,"uniqueKey":"usage.scope.oneOf.0.all_groups","typeLabel":"boolean"},"group_ids":{"items":{"type":"string","uniqueKey":"usage.scope.oneOf.0.group_ids.items.[INDEX]","typeLabel":"string"},"type":"array","title":"Group Ids","description":"Specific groups searched, when not all","uniqueKey":"usage.scope.oneOf.0.group_ids","typeLabel":"string[]"}},"additionalProperties":false,"uniqueKey":"usage.scope.oneOf.0","typeLabel":"ChatScopeV1 · object"},{"type":"null","description":"Whose networks were searched; null when nothing was","uniqueKey":"usage.scope.oneOf.1","typeLabel":"null"}],"uniqueKey":"usage.scope","typeLabel":"ChatScopeV1 · object | null"}},"additionalProperties":false,"type":"object","required":["searches","web_searches","model_calls","people_reviewed"],"title":"ChatTurnUsageV1","isRequired":true,"uniqueKey":"usage","typeLabel":"ChatTurnUsageV1 · object"},"created_at":{"type":"string","title":"Created At","description":"When the turn started (ISO 8601)","isRequired":true,"uniqueKey":"created_at","typeLabel":"string"},"elapsed_seconds":{"type":"integer","title":"Elapsed Seconds","description":"Seconds since the turn started, or how long it took once finished","isRequired":true,"uniqueKey":"elapsed_seconds","typeLabel":"integer"},"stop_reason":{"oneOf":[{"type":"string","title":"Stop Reason","description":"Why a finished turn ended: done; needs_input (Chat asked questions and waits for the answers, see reply.questions); stopped (cancelled); error. Null while running.","enum":["done","needs_input","stopped","error"],"uniqueKey":"stop_reason.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","title":"Stop Reason","description":"Why a finished turn ended: done; needs_input (Chat asked questions and waits for the answers, see reply.questions); stopped (cancelled); error. Null while running.","uniqueKey":"stop_reason.oneOf.1","typeLabel":"null"}],"uniqueKey":"stop_reason","typeLabel":"enum\u003cstring> | null"},"started_by":{"type":"string","enum":["message","schedule"],"title":"Started By","description":"message: a message or answers started the turn. schedule: one of the chat's scheduled tasks ran, and nobody sent a message (only a chat started in the app has scheduled tasks).","default":"message","uniqueKey":"started_by","typeLabel":"enum\u003cstring>"},"completed_at":{"oneOf":[{"type":"string","title":"Completed At","description":"When the turn finished (ISO 8601)","uniqueKey":"completed_at.oneOf.0","typeLabel":"string"},{"type":"null","title":"Completed At","description":"When the turn finished (ISO 8601)","uniqueKey":"completed_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"completed_at","typeLabel":"string | null"},"last_activity_at":{"oneOf":[{"type":"string","title":"Last Activity At","description":"When Chat last made progress on the turn (a reply, a search starting or finishing). A running turn with no progress for several minutes is stuck or slow and can be cancelled.","uniqueKey":"last_activity_at.oneOf.0","typeLabel":"string"},{"type":"null","title":"Last Activity At","description":"When Chat last made progress on the turn (a reply, a search starting or finishing). A running turn with no progress for several minutes is stuck or slow and can be cancelled.","uniqueKey":"last_activity_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"last_activity_at","typeLabel":"string | null"},"next_turn_id":{"oneOf":[{"type":"string","title":"Next Turn Id","description":"The chat's next turn, once one was started","uniqueKey":"next_turn_id.oneOf.0","typeLabel":"string"},{"type":"null","title":"Next Turn Id","description":"The chat's next turn, once one was started","uniqueKey":"next_turn_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"next_turn_id","typeLabel":"string | null"}},"additionalProperties":false,"type":"object","required":["id","chat_id","status","message","messages","reply","usage","created_at","elapsed_seconds"],"title":"ChatTurnV1","description":"Response from GET /v1/chat/{chat_id}/turns/{turn_id}: a message and Chat's work on it.","uniqueKey":"","typeLabel":"ChatTurnV1 · object"},"examples":{"Example":{"title":"Example","value":{"id":"\u003cstring>","chat_id":"\u003cstring>","status":"queued","message":"\u003cstring>","messages":["\u003cstring>"],"reply":{"markdown":"\u003cstring>","people_count":123,"people_new_count":123,"drafts_count":123,"updates":["\u003cstring>"],"searches":[{"search_id":"\u003cstring>","status":"running","page_id":"\u003cstring>","turn_id":"\u003cstring>","query":"\u003cstring>","results_count":123}],"suggested_followup":"\u003cstring>","questions":[{"index":123,"header":"\u003cstring>","question":"\u003cstring>","options":[{"label":"\u003cstring>","description":"\u003cstring>"}],"multi_select":true}]},"usage":{"searches":123,"web_searches":123,"model_calls":123,"people_reviewed":123,"credits_charged":123,"scope":{"my_connections":true,"friends_connections":true,"all_groups":true,"group_ids":["\u003cstring>"]}},"created_at":"\u003cstring>","elapsed_seconds":123,"stop_reason":"done","started_by":"message","completed_at":"\u003cstring>","last_activity_at":"\u003cstring>","next_turn_id":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"2c54014e-2945-4220-9c9d-f6835e2c471f":{"description":"Bad Request","content":{"application/json":{"schema":{"properties":{"title":{"type":"string","title":"Title","description":"A short, human-readable summary of the problem","isRequired":true,"uniqueKey":"title","typeLabel":"string"},"status":{"type":"integer","title":"Status","description":"The HTTP status code","isRequired":true,"uniqueKey":"status","typeLabel":"integer"},"type":{"type":"string","title":"Type","description":"A URI reference that identifies the problem type","default":"https://developer.happenstance.ai/api-reference/introduction#error-response-format","uniqueKey":"type","typeLabel":"string"},"detail":{"oneOf":[{"type":"string","title":"Detail","description":"A human-readable explanation specific to this occurrence","uniqueKey":"detail.oneOf.0","typeLabel":"string"},{"type":"null","title":"Detail","description":"A human-readable explanation specific to this occurrence","uniqueKey":"detail.oneOf.1","typeLabel":"null"}],"uniqueKey":"detail","typeLabel":"string | null"},"instance":{"oneOf":[{"type":"string","title":"Instance","description":"A URI reference that identifies the specific occurrence of the problem","uniqueKey":"instance.oneOf.0","typeLabel":"string"},{"type":"null","title":"Instance","description":"A URI reference that identifies the specific occurrence of the problem","uniqueKey":"instance.oneOf.1","typeLabel":"null"}],"uniqueKey":"instance","typeLabel":"string | null"}},"additionalProperties":false,"type":"object","required":["title","status"],"title":"ProblemDetailV1","description":"RFC 7807 Problem Details for HTTP APIs","uniqueKey":"","typeLabel":"ProblemDetailV1 · object"},"examples":{"Example":{"title":"Example","value":{"title":"\u003cstring>","status":123,"type":"https://developer.happenstance.ai/api-reference/introduction#error-response-format","detail":"\u003cstring>","instance":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"27251d1e-c97b-4d22-9edb-f81a1437b15c":{"description":"Unauthorized","content":{"application/json":{"schema":{"properties":{"title":{"type":"string","title":"Title","description":"A short, human-readable summary of the problem","isRequired":true,"uniqueKey":"title","typeLabel":"string"},"status":{"type":"integer","title":"Status","description":"The HTTP status code","isRequired":true,"uniqueKey":"status","typeLabel":"integer"},"type":{"type":"string","title":"Type","description":"A URI reference that identifies the problem type","default":"https://developer.happenstance.ai/api-reference/introduction#error-response-format","uniqueKey":"type","typeLabel":"string"},"detail":{"oneOf":[{"type":"string","title":"Detail","description":"A human-readable explanation specific to this occurrence","uniqueKey":"detail.oneOf.0","typeLabel":"string"},{"type":"null","title":"Detail","description":"A human-readable explanation specific to this occurrence","uniqueKey":"detail.oneOf.1","typeLabel":"null"}],"uniqueKey":"detail","typeLabel":"string | null"},"instance":{"oneOf":[{"type":"string","title":"Instance","description":"A URI reference that identifies the specific occurrence of the problem","uniqueKey":"instance.oneOf.0","typeLabel":"string"},{"type":"null","title":"Instance","description":"A URI reference that identifies the specific occurrence of the problem","uniqueKey":"instance.oneOf.1","typeLabel":"null"}],"uniqueKey":"instance","typeLabel":"string | null"}},"additionalProperties":false,"type":"object","required":["title","status"],"title":"ProblemDetailV1","description":"RFC 7807 Problem Details for HTTP APIs","uniqueKey":"","typeLabel":"ProblemDetailV1 · object"},"examples":{"Example":{"title":"Example","value":{"title":"\u003cstring>","status":123,"type":"https://developer.happenstance.ai/api-reference/introduction#error-response-format","detail":"\u003cstring>","instance":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"7e49dbf5-1e93-418a-af47-fe69644815aa":{"description":"Payment Required","content":{"application/json":{"schema":{"properties":{"title":{"type":"string","title":"Title","description":"A short, human-readable summary of the problem","isRequired":true,"uniqueKey":"title","typeLabel":"string"},"status":{"type":"integer","title":"Status","description":"The HTTP status code","isRequired":true,"uniqueKey":"status","typeLabel":"integer"},"type":{"type":"string","title":"Type","description":"A URI reference that identifies the problem type","default":"https://developer.happenstance.ai/api-reference/introduction#error-response-format","uniqueKey":"type","typeLabel":"string"},"detail":{"oneOf":[{"type":"string","title":"Detail","description":"A human-readable explanation specific to this occurrence","uniqueKey":"detail.oneOf.0","typeLabel":"string"},{"type":"null","title":"Detail","description":"A human-readable explanation specific to this occurrence","uniqueKey":"detail.oneOf.1","typeLabel":"null"}],"uniqueKey":"detail","typeLabel":"string | null"},"instance":{"oneOf":[{"type":"string","title":"Instance","description":"A URI reference that identifies the specific occurrence of the problem","uniqueKey":"instance.oneOf.0","typeLabel":"string"},{"type":"null","title":"Instance","description":"A URI reference that identifies the specific occurrence of the problem","uniqueKey":"instance.oneOf.1","typeLabel":"null"}],"uniqueKey":"instance","typeLabel":"string | null"}},"additionalProperties":false,"type":"object","required":["title","status"],"title":"ProblemDetailV1","description":"RFC 7807 Problem Details for HTTP APIs","uniqueKey":"","typeLabel":"ProblemDetailV1 · object"},"examples":{"Example":{"title":"Example","value":{"title":"\u003cstring>","status":123,"type":"https://developer.happenstance.ai/api-reference/introduction#error-response-format","detail":"\u003cstring>","instance":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"99f62c0a-147c-4af1-9a24-d8f028abb801":{"description":"Forbidden","content":{"application/json":{"schema":{"properties":{"title":{"type":"string","title":"Title","description":"A short, human-readable summary of the problem","isRequired":true,"uniqueKey":"title","typeLabel":"string"},"status":{"type":"integer","title":"Status","description":"The HTTP status code","isRequired":true,"uniqueKey":"status","typeLabel":"integer"},"type":{"type":"string","title":"Type","description":"A URI reference that identifies the problem type","default":"https://developer.happenstance.ai/api-reference/introduction#error-response-format","uniqueKey":"type","typeLabel":"string"},"detail":{"oneOf":[{"type":"string","title":"Detail","description":"A human-readable explanation specific to this occurrence","uniqueKey":"detail.oneOf.0","typeLabel":"string"},{"type":"null","title":"Detail","description":"A human-readable explanation specific to this occurrence","uniqueKey":"detail.oneOf.1","typeLabel":"null"}],"uniqueKey":"detail","typeLabel":"string | null"},"instance":{"oneOf":[{"type":"string","title":"Instance","description":"A URI reference that identifies the specific occurrence of the problem","uniqueKey":"instance.oneOf.0","typeLabel":"string"},{"type":"null","title":"Instance","description":"A URI reference that identifies the specific occurrence of the problem","uniqueKey":"instance.oneOf.1","typeLabel":"null"}],"uniqueKey":"instance","typeLabel":"string | null"}},"additionalProperties":false,"type":"object","required":["title","status"],"title":"ProblemDetailV1","description":"RFC 7807 Problem Details for HTTP APIs","uniqueKey":"","typeLabel":"ProblemDetailV1 · object"},"examples":{"Example":{"title":"Example","value":{"title":"\u003cstring>","status":123,"type":"https://developer.happenstance.ai/api-reference/introduction#error-response-format","detail":"\u003cstring>","instance":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"55276e24-defe-4cf1-8cf7-7bfe1893c0ec":{"description":"Not Found","content":{"application/json":{"schema":{"properties":{"title":{"type":"string","title":"Title","description":"A short, human-readable summary of the problem","isRequired":true,"uniqueKey":"title","typeLabel":"string"},"status":{"type":"integer","title":"Status","description":"The HTTP status code","isRequired":true,"uniqueKey":"status","typeLabel":"integer"},"type":{"type":"string","title":"Type","description":"A URI reference that identifies the problem type","default":"https://developer.happenstance.ai/api-reference/introduction#error-response-format","uniqueKey":"type","typeLabel":"string"},"detail":{"oneOf":[{"type":"string","title":"Detail","description":"A human-readable explanation specific to this occurrence","uniqueKey":"detail.oneOf.0","typeLabel":"string"},{"type":"null","title":"Detail","description":"A human-readable explanation specific to this occurrence","uniqueKey":"detail.oneOf.1","typeLabel":"null"}],"uniqueKey":"detail","typeLabel":"string | null"},"instance":{"oneOf":[{"type":"string","title":"Instance","description":"A URI reference that identifies the specific occurrence of the problem","uniqueKey":"instance.oneOf.0","typeLabel":"string"},{"type":"null","title":"Instance","description":"A URI reference that identifies the specific occurrence of the problem","uniqueKey":"instance.oneOf.1","typeLabel":"null"}],"uniqueKey":"instance","typeLabel":"string | null"}},"additionalProperties":false,"type":"object","required":["title","status"],"title":"ProblemDetailV1","description":"RFC 7807 Problem Details for HTTP APIs","uniqueKey":"","typeLabel":"ProblemDetailV1 · object"},"examples":{"Example":{"title":"Example","value":{"title":"\u003cstring>","status":123,"type":"https://developer.happenstance.ai/api-reference/introduction#error-response-format","detail":"\u003cstring>","instance":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"6ec946e7-4cca-4c1b-ab80-34dcb1897397":{"description":"Gone","content":{"application/json":{"schema":{"properties":{"title":{"type":"string","title":"Title","description":"A short, human-readable summary of the problem","isRequired":true,"uniqueKey":"title","typeLabel":"string"},"status":{"type":"integer","title":"Status","description":"The HTTP status code","isRequired":true,"uniqueKey":"status","typeLabel":"integer"},"type":{"type":"string","title":"Type","description":"A URI reference that identifies the problem type","default":"https://developer.happenstance.ai/api-reference/introduction#error-response-format","uniqueKey":"type","typeLabel":"string"},"detail":{"oneOf":[{"type":"string","title":"Detail","description":"A human-readable explanation specific to this occurrence","uniqueKey":"detail.oneOf.0","typeLabel":"string"},{"type":"null","title":"Detail","description":"A human-readable explanation specific to this occurrence","uniqueKey":"detail.oneOf.1","typeLabel":"null"}],"uniqueKey":"detail","typeLabel":"string | null"},"instance":{"oneOf":[{"type":"string","title":"Instance","description":"A URI reference that identifies the specific occurrence of the problem","uniqueKey":"instance.oneOf.0","typeLabel":"string"},{"type":"null","title":"Instance","description":"A URI reference that identifies the specific occurrence of the problem","uniqueKey":"instance.oneOf.1","typeLabel":"null"}],"uniqueKey":"instance","typeLabel":"string | null"}},"additionalProperties":false,"type":"object","required":["title","status"],"title":"ProblemDetailV1","description":"RFC 7807 Problem Details for HTTP APIs","uniqueKey":"","typeLabel":"ProblemDetailV1 · object"},"examples":{"Example":{"title":"Example","value":{"title":"\u003cstring>","status":123,"type":"https://developer.happenstance.ai/api-reference/introduction#error-response-format","detail":"\u003cstring>","instance":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"156d80a8-0c52-4963-b6f4-12ad8bce6626":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"title":{"type":"string","title":"Title","description":"A short, human-readable summary of the problem","isRequired":true,"uniqueKey":"title","typeLabel":"string"},"status":{"type":"integer","title":"Status","description":"The HTTP status code","isRequired":true,"uniqueKey":"status","typeLabel":"integer"},"type":{"type":"string","title":"Type","description":"A URI reference that identifies the problem type","default":"https://developer.happenstance.ai/api-reference/introduction#error-response-format","uniqueKey":"type","typeLabel":"string"},"detail":{"oneOf":[{"type":"string","title":"Detail","description":"A human-readable explanation specific to this occurrence","uniqueKey":"detail.oneOf.0","typeLabel":"string"},{"type":"null","title":"Detail","description":"A human-readable explanation specific to this occurrence","uniqueKey":"detail.oneOf.1","typeLabel":"null"}],"uniqueKey":"detail","typeLabel":"string | null"},"instance":{"oneOf":[{"type":"string","title":"Instance","description":"A URI reference that identifies the specific occurrence of the problem","uniqueKey":"instance.oneOf.0","typeLabel":"string"},{"type":"null","title":"Instance","description":"A URI reference that identifies the specific occurrence of the problem","uniqueKey":"instance.oneOf.1","typeLabel":"null"}],"uniqueKey":"instance","typeLabel":"string | null"}},"additionalProperties":false,"type":"object","required":["title","status"],"title":"ProblemDetailV1","description":"RFC 7807 Problem Details for HTTP APIs","uniqueKey":"","typeLabel":"ProblemDetailV1 · object"},"examples":{"Example":{"title":"Example","value":{"title":"\u003cstring>","status":123,"type":"https://developer.happenstance.ai/api-reference/introduction#error-response-format","detail":"\u003cstring>","instance":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"5ebc2856-f40f-411c-b782-d77f3f91032c":{"description":"Internal Server Error","content":{"application/json":{"schema":{"properties":{"title":{"type":"string","title":"Title","description":"A short, human-readable summary of the problem","isRequired":true,"uniqueKey":"title","typeLabel":"string"},"status":{"type":"integer","title":"Status","description":"The HTTP status code","isRequired":true,"uniqueKey":"status","typeLabel":"integer"},"type":{"type":"string","title":"Type","description":"A URI reference that identifies the problem type","default":"https://developer.happenstance.ai/api-reference/introduction#error-response-format","uniqueKey":"type","typeLabel":"string"},"detail":{"oneOf":[{"type":"string","title":"Detail","description":"A human-readable explanation specific to this occurrence","uniqueKey":"detail.oneOf.0","typeLabel":"string"},{"type":"null","title":"Detail","description":"A human-readable explanation specific to this occurrence","uniqueKey":"detail.oneOf.1","typeLabel":"null"}],"uniqueKey":"detail","typeLabel":"string | null"},"instance":{"oneOf":[{"type":"string","title":"Instance","description":"A URI reference that identifies the specific occurrence of the problem","uniqueKey":"instance.oneOf.0","typeLabel":"string"},{"type":"null","title":"Instance","description":"A URI reference that identifies the specific occurrence of the problem","uniqueKey":"instance.oneOf.1","typeLabel":"null"}],"uniqueKey":"instance","typeLabel":"string | null"}},"additionalProperties":false,"type":"object","required":["title","status"],"title":"ProblemDetailV1","description":"RFC 7807 Problem Details for HTTP APIs","uniqueKey":"","typeLabel":"ProblemDetailV1 · object"},"examples":{"Example":{"title":"Example","value":{"title":"\u003cstring>","status":123,"type":"https://developer.happenstance.ai/api-reference/introduction#error-response-format","detail":"\u003cstring>","instance":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"ea18e188-cd82-4111-8928-07ec20aa347f":{"description":"Service Unavailable","content":{"application/json":{"schema":{"properties":{"title":{"type":"string","title":"Title","description":"A short, human-readable summary of the problem","isRequired":true,"uniqueKey":"title","typeLabel":"string"},"status":{"type":"integer","title":"Status","description":"The HTTP status code","isRequired":true,"uniqueKey":"status","typeLabel":"integer"},"type":{"type":"string","title":"Type","description":"A URI reference that identifies the problem type","default":"https://developer.happenstance.ai/api-reference/introduction#error-response-format","uniqueKey":"type","typeLabel":"string"},"detail":{"oneOf":[{"type":"string","title":"Detail","description":"A human-readable explanation specific to this occurrence","uniqueKey":"detail.oneOf.0","typeLabel":"string"},{"type":"null","title":"Detail","description":"A human-readable explanation specific to this occurrence","uniqueKey":"detail.oneOf.1","typeLabel":"null"}],"uniqueKey":"detail","typeLabel":"string | null"},"instance":{"oneOf":[{"type":"string","title":"Instance","description":"A URI reference that identifies the specific occurrence of the problem","uniqueKey":"instance.oneOf.0","typeLabel":"string"},{"type":"null","title":"Instance","description":"A URI reference that identifies the specific occurrence of the problem","uniqueKey":"instance.oneOf.1","typeLabel":"null"}],"uniqueKey":"instance","typeLabel":"string | null"}},"additionalProperties":false,"type":"object","required":["title","status"],"title":"ProblemDetailV1","description":"RFC 7807 Problem Details for HTTP APIs","uniqueKey":"","typeLabel":"ProblemDetailV1 · object"},"examples":{"Example":{"title":"Example","value":{"title":"\u003cstring>","status":123,"type":"https://developer.happenstance.ai/api-reference/introduction#error-response-format","detail":"\u003cstring>","instance":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"f7405168-55a0-4054-9f93-9b8b79193133":{"HTTPBearer":{"type":"http","scheme":"bearer","scopes":[],"schemeName":"HTTPBearer"}}},"servers":{"3928d332-2975-4017-a644-c4e0c2212c48":{"url":"https://api.happenstance.ai","description":"Production"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","scopes":[],"schemeName":"HTTPBearer"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Bearer authentication header of the form `Bearer \u003ctoken>`, where `\u003ctoken>` is your auth token.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"HTTPBearer","name":"Authorization"}],"title":"HTTPBearer"}]},"originalFileLocation":"openapi.json"},"subdomain":"happenstance","siteName":"Happenstance","title":"Cancel Chat Turn - Happenstance","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-23T17:26:20.047Z","originalFileLocation":"api-reference/cancel-chat-turn.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Stop a running turn, as the Stop button in the app does. Chat keeps what it wrote, its searches stop, and the turn ends cancelled, charged for the work done. A finished turn is returned as it is. latest stops whatever the chat is working on.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Happenstance\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/happenstance/lRTBz52T_gIZj_2l/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/happenstance/lRTBz52T_gIZj_2l/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/happenstance/lRTBz52T_gIZj_2l/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/happenstance/lRTBz52T_gIZj_2l/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/happenstance/lRTBz52T_gIZj_2l/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/happenstance/lRTBz52T_gIZj_2l/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/happenstance/lRTBz52T_gIZj_2l/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/happenstance/lRTBz52T_gIZj_2l/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/happenstance/lRTBz52T_gIZj_2l/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Cancel Chat Turn - Happenstance\">\u003cmeta data-mint-head property=\"og:description\" content=\"Stop a running turn, as the Stop button in the app does. Chat keeps what it wrote, its searches stop, and the turn ends cancelled, charged for the work done. A finished turn is returned as it is. latest stops whatever the chat is working on.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Happenstance\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://developer.happenstance.ai/api-reference/cancel-chat-turn\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://happenstance.mintlify.app/_mintlify/api/og/v2?division=API+Reference\u0026amp;title=Cancel+Chat+Turn\u0026amp;description=Stop+a+running+turn%2C+as+the+Stop+button+in+the+app+does.+Chat+keeps+what+it+wrote%2C+its%0Asearches+stop%2C+and+the+turn+ends+cancelled%2C+charged+for+the+work+done.+A+\u0026amp;theme=e9cbf0a039f894b97da272a2\u0026amp;signature=8351a5fca2024097d827e7f4220221d636212653e8bcc07105f6826bf51dccd0\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Cancel Chat Turn - Happenstance\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Stop a running turn, as the Stop button in the app does. Chat keeps what it wrote, its searches stop, and the turn ends cancelled, charged for the work done. A finished turn is returned as it is. latest stops whatever the chat is working on.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://happenstance.mintlify.app/_mintlify/api/og/v2?division=API+Reference\u0026amp;title=Cancel+Chat+Turn\u0026amp;description=Stop+a+running+turn%2C+as+the+Stop+button+in+the+app+does.+Chat+keeps+what+it+wrote%2C+its%0Asearches+stop%2C+and+the+turn+ends+cancelled%2C+charged+for+the+work+done.+A+\u0026amp;theme=e9cbf0a039f894b97da272a2\u0026amp;signature=8351a5fca2024097d827e7f4220221d636212653e8bcc07105f6826bf51dccd0\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/happenstance/lRTBz52T_gIZj_2l/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Happenstance\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#16a34a\">\u003clink data-mint-head rel=\"canonical\" href=\"https://developer.happenstance.ai/api-reference/cancel-chat-turn\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/cancel-chat-turn.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://developer.happenstance.ai/#organization\",\"name\":\"Happenstance\",\"url\":\"https://developer.happenstance.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/happenstance/YSbudQ8_lua9CNAo/logo/happenstance.png?fit=max\u0026auto=format\u0026n=YSbudQ8_lua9CNAo\u0026q=85\u0026s=a2c2c708eb248e6bea6607330505d0f9\"}},{\"@type\":\"WebSite\",\"@id\":\"https://developer.happenstance.ai#website\",\"name\":\"Happenstance\",\"url\":\"https://developer.happenstance.ai\",\"publisher\":{\"@id\":\"https://developer.happenstance.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://developer.happenstance.ai/api-reference/cancel-chat-turn#webpage\",\"url\":\"https://developer.happenstance.ai/api-reference/cancel-chat-turn\",\"name\":\"Cancel Chat Turn\",\"description\":\"Stop a running turn, as the Stop button in the app does. Chat keeps what it wrote, its searches stop, and the turn ends cancelled, charged for the work done. A finished turn is returned as it is. latest stops whatever the chat is working on.\",\"dateModified\":\"2026-10-23T17:26:20.047Z\",\"isPartOf\":{\"@id\":\"https://developer.happenstance.ai#website\"},\"breadcrumb\":{\"@id\":\"https://developer.happenstance.ai/api-reference/cancel-chat-turn#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://developer.happenstance.ai/api-reference/cancel-chat-turn#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Connect\",\"item\":\"https://developer.happenstance.ai/mcp/chatgpt\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"API\",\"item\":\"https://developer.happenstance.ai/quickstart\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"API Reference\",\"item\":\"https://developer.happenstance.ai/api-reference/create-search\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Cancel Chat Turn\",\"item\":\"https://developer.happenstance.ai/api-reference/cancel-chat-turn\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://developer.happenstance.ai/api-reference/cancel-chat-turn#apireference\",\"headline\":\"Cancel Chat Turn\",\"name\":\"Cancel Chat Turn\",\"description\":\"Stop a running turn, as the Stop button in the app does. Chat keeps what it wrote, its searches stop, and the turn ends cancelled, charged for the work done. A finished turn is returned as it is. latest stops whatever the chat is working on.\",\"url\":\"https://developer.happenstance.ai/api-reference/cancel-chat-turn\",\"mainEntityOfPage\":{\"@id\":\"https://developer.happenstance.ai/api-reference/cancel-chat-turn#webpage\"},\"dateModified\":\"2026-10-23T17:26:20.047Z\",\"publisher\":{\"@id\":\"https://developer.happenstance.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://developer.happenstance.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Happenstance\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Happenstance","nav":{"global":null,"groups":[{"group":"Connect","pages":[{"title":"ChatGPT","href":"/mcp/chatgpt"},{"title":"Claude","href":"/mcp/claude"},{"title":"Claude Code","href":"/mcp/claude-code"},{"title":"MCP","href":"/mcp/connect"},{"title":"CLI","href":"/cli/install"},{"title":"OpenClaw","href":"/mcp/openclaw"},{"group":"API","pages":[{"title":"Quickstart","href":"/quickstart"},{"title":"The Basics","href":"/api-reference/introduction"},{"title":"Changelog","href":"/changelog"},{"group":"API Reference","pages":[{"title":"Create Search","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/search","href":"/api-reference/create-search"},{"title":"Get Search","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/search/{search_id}","href":"/api-reference/get-search"},{"title":"Find More Search","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/search/{search_id}/find-more","href":"/api-reference/find-more-search"},{"title":"Create Research","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/research","href":"/api-reference/create-research"},{"title":"Get Research","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/research/{research_id}","href":"/api-reference/get-research"},{"title":"Get Current User Profile","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/users/me","href":"/api-reference/get-current-user-profile"},{"title":"Get Groups","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/groups","href":"/api-reference/get-groups"},{"title":"Get Group","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/groups/{group_id}","href":"/api-reference/get-group"},{"title":"Get Usage","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/usage","href":"/api-reference/get-usage"},{"title":"List Chats","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/chat","href":"/api-reference/list-chats"},{"title":"Create Chat","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/chat","href":"/api-reference/create-chat"},{"title":"Get Chat","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/chat/{chat_id}","href":"/api-reference/get-chat"},{"title":"Send Chat Message","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/chat/{chat_id}/messages","href":"/api-reference/send-chat-message"},{"title":"Get Chat Turn","description":"A turn: its status, Chat's reply so far (markdown), the searches it ran, and its usage\nand charge once finished. Poll every 5 seconds for the first minute, then every 10; turns\nwith searches usually take 1 to 3 minutes. Not rate limited. `latest` reads the chat's\nnewest turn; the response's `id` names it.","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/chat/{chat_id}/turns/{turn_id}","href":"/api-reference/get-chat-turn"},{"title":"Cancel Chat Turn","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/chat/{chat_id}/turns/{turn_id}/cancel","href":"/api-reference/cancel-chat-turn"},{"title":"Get Chat People","description":"Everyone Chat showed in the chat, one row per person with their cards merged: title,\ncompany, location, LinkedIn, how the user is connected (directly, and through which\nmutuals, with connection strength), and why Chat picked them. In order of first\nappearance; with turn_id, the people of that turn.","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/chat/{chat_id}/people","href":"/api-reference/get-chat-people"},{"title":"Get Chat Drafts","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/chat/{chat_id}/drafts","href":"/api-reference/get-chat-drafts"}]}]}]}]},"title":"Cancel Chat Turn - Happenstance","buildId":"dpl_849ArpqvBiCczQiT1Y1stNGpbqHT","deploymentId":"dpl_849ArpqvBiCczQiT1Y1stNGpbqHT","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-Bbp7I60D.js","utils-C3RIvJha.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-DqD-vLt8.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-B31Loprg.js","snippetPresets-DKpk-b8t.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-Cj65AhOR.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-BXtn5gcC.js","shallow-RY2b03Cp.js","getApiPlaygroundDisplay-B0jeiPk3.js","CodeSnippet-CYgBjjwn.js","CodeSnippets-DOngDrYB.js","Page-n7I5XbKb.js","getPastedJson-DRQbJx-T.js","icon-CQiQCicY.js","MethodPill-BKTLdNtu.js","DuplicateIcon-B9jpAdat.js","createIcon-DCddRrXv.js","DynamicMarkdown-a8hUKrw6.js","SectionHeading-eECVV2eH.js","axios-vUo_bRtp.js","Markdown--GF7ZIpf.js","clsx-DZLdJUrt.js","lib--scc4DXi.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-2LoAhjKH.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-Zwc0ZncM.js"]}