Send a message to a chat started through the API. Returns at once with the turn to poll. A
message sent while a turn is still working joins that turn (joined: true): Chat takes it
into the work in progress, and the turn’s reply and charge cover both messages.
When a turn ends with stop_reason needs_input, Chat waits on the questions in its
reply.questions: send answers (by question index and option label), a message that answers
them in words, or both. The answer starts the next turn (answered: true).
Returns 402 when the balance is below 3 credits for this message and for each turn still
running, 409 for a chat started in the app.
{"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":""},"entitlements":{},"buildId":"6aea1f6eb0a155cbec31a326","clientVersion":"0.0.4087","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},"basePath":"","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":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","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":"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":"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":"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":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","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":"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":"workos-sso-scim","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},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"comment-mode","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/send-chat-message","slug":"/api-reference/send-chat-message","pageMetadata":{"title":"Send Chat Message","description":"Send a message to a chat started through the API. Returns at once with the turn to poll. A\nmessage sent while a turn is still working joins that turn (joined: true): Chat takes it\ninto the work in progress, and the turn's reply and charge cover both messages.\n\nWhen a turn ends with stop_reason needs_input, Chat waits on the questions in its\nreply.questions: send answers (by question index and option label), a message that answers\nthem in words, or both. The answer starts the next turn (answered: true).\n\nReturns 402 when the balance is below 3 credits for this message and for each turn still\nrunning, 409 for a chat started in the app.","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/chat/{chat_id}/messages","href":"/api-reference/send-chat-message","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsx(_components.p, {\n children: \"Send a message to a chat started through the API. Returns at once with the turn to poll. A\\nmessage sent while a turn is still working joins that turn (joined: true): Chat takes it\\ninto the work in progress, and the turn’s reply and charge cover both messages.\"\n }), \"\\n\", _jsx(_components.p, {\n children: \"When a turn ends with stop_reason needs_input, Chat waits on the questions in its\\nreply.questions: send answers (by question index and option label), a message that answers\\nthem in words, or both. The answer starts the next turn (answered: true).\"\n }), \"\\n\", _jsx(_components.p, {\n children: \"Returns 402 when the balance is below 3 credits for this message and for each turn still\\nrunning, 409 for a chat started in the app.\"\n })]\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":"Send Chat Message","description":"Send a message to a chat started through the API. Returns at once with the turn to poll. A\nmessage sent while a turn is still working joins that turn (joined: true): Chat takes it\ninto the work in progress, and the turn's reply and charge cover both messages.\n\nWhen a turn ends with stop_reason needs_input, Chat waits on the questions in its\nreply.questions: send answers (by question index and option label), a message that answers\nthem in words, or both. The answer starts the next turn (answered: true).\n\nReturns 402 when the balance is below 3 credits for this message and for each turn still\nrunning, 409 for a chat started in the app.","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/chat/{chat_id}/messages","href":"/api-reference/send-chat-message","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"summary":"Send Chat Message","description":"Send a message to a chat started through the API. Returns at once with the turn to poll. A\nmessage sent while a turn is still working joins that turn (joined: true): Chat takes it\ninto the work in progress, and the turn's reply and charge cover both messages.\n\nWhen a turn ends with stop_reason needs_input, Chat waits on the questions in its\nreply.questions: send answers (by question index and option label), a message that answers\nthem in words, or both. The answer starts the next turn (answered: true).\n\nReturns 402 when the balance is below 3 credits for this message and for each turn still\nrunning, 409 for a chat started in the app.","operationId":"send_chat_message_v1_chat__chat_id__messages_post","security":["9b37c2f2-29be-45a7-a207-378ba4c4ff6a"],"parameters":["081b8721-2f86-4133-a34c-c25101329d18"],"requestBody":"6f0a8e0d-fe37-475f-9005-4546d1378222","responses":{"200":"d1384159-1ec2-472d-b01f-21ac4f55b9e9","400":"a0380f8e-eed9-4b04-b67b-13d031f41fc4","401":"ae7661d1-6963-4d76-9d9b-7cc002a84138","402":"0bf5dddc-ad00-4f3f-b2da-2579a4173f38","403":"825b3886-5ea3-4ea0-af25-beb38cf8104c","404":"7c550e35-36fd-4ac0-9fe1-48af309840f9","410":"36161911-011d-4f9b-a9ef-ea0bca1fa365","422":"bb7cbaaf-5293-473a-97b4-3e12e1478a59","500":"e1f1c079-6d7f-4066-b905-756b1c159ab5","503":"1879c3a8-8613-4b76-b4a2-bf3097761f34"},"x-pricing":{"credit_based":true,"description":"Each message is charged when its turn finishes, for the turn's cost in credits, to two decimal places. Chat turns have variable cost depending on how much work is done, often 1–3 credits."},"method":"post","type":"path","servers":["3928d332-2975-4017-a644-c4e0c2212c48"],"path":"/v1/chat/{chat_id}/messages","baseUrlOptions":["https://api.happenstance.ai"],"title":"Send Chat Message","codeSamples":[],"requestExampleLanguages":["bash","python","javascript"],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"081b8721-2f86-4133-a34c-c25101329d18":{"name":"chat_id","in":"path","required":true,"schema":{"type":"string","title":"Chat Id","isRequired":true,"uniqueKey":"","typeLabel":"string"}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"message":{"oneOf":[{"type":"string","title":"Message","description":"The message to send, in plain text. While Chat waits on its questions (a turn with stop_reason needs_input), a message answers them in words.","uniqueKey":"message.oneOf.0","typeLabel":"string"},{"type":"null","title":"Message","description":"The message to send, in plain text. While Chat waits on its questions (a turn with stop_reason needs_input), a message answers them in words.","uniqueKey":"message.oneOf.1","typeLabel":"null"}],"uniqueKey":"message","typeLabel":"string | null"},"answers":{"oneOf":[{"type":"array","items":{"properties":{"question_index":{"type":"integer","minimum":0,"title":"Question Index","description":"The question's index, from 0","isRequired":true,"uniqueKey":"answers.oneOf.0.items.[INDEX].question_index","typeLabel":"integer"},"selected":{"items":{"type":"string","uniqueKey":"answers.oneOf.0.items.[INDEX].selected.items.[INDEX]","typeLabel":"string"},"type":"array","maxItems":4,"title":"Selected","description":"The chosen option labels, exactly as given (several only for a multi_select question)","uniqueKey":"answers.oneOf.0.items.[INDEX].selected","typeLabel":"string[]"},"other":{"oneOf":[{"type":"string","title":"Other","description":"A free-text answer instead of or beside the options","maxLength":32000,"uniqueKey":"answers.oneOf.0.items.[INDEX].other.oneOf.0","typeLabel":"string"},{"type":"null","title":"Other","description":"A free-text answer instead of or beside the options","uniqueKey":"answers.oneOf.0.items.[INDEX].other.oneOf.1","typeLabel":"null"}],"uniqueKey":"answers.oneOf.0.items.[INDEX].other","typeLabel":"string | null"}},"additionalProperties":false,"type":"object","required":["question_index"],"title":"ChatAnswerV1","description":"An answer to one of Chat's questions (reply.questions of a needs_input turn).","uniqueKey":"answers.oneOf.0.items.[INDEX]","typeLabel":"ChatAnswerV1 · object"},"title":"Answers","description":"Answers to Chat's open questions, one per question you answer. Send answers, a message, or both (the message then adds to the answers).","uniqueKey":"answers.oneOf.0","typeLabel":"ChatAnswerV1 · object[]"},{"type":"null","title":"Answers","description":"Answers to Chat's open questions, one per question you answer. Send answers, a message, or both (the message then adds to the answers).","uniqueKey":"answers.oneOf.1","typeLabel":"null"}],"uniqueKey":"answers","typeLabel":"ChatAnswerV1 · object[] | null"}},"additionalProperties":false,"type":"object","title":"SendChatMessageRequestV1","uniqueKey":"","typeLabel":"SendChatMessageRequestV1 · object"},"examples":{"Example":{"title":"Example","value":{"message":"\u003cstring>","answers":[{"question_index":1,"selected":["\u003cstring>"],"other":"\u003cstring>"}]}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"d1384159-1ec2-472d-b01f-21ac4f55b9e9":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"chat_id":{"type":"string","title":"Chat Id","description":"The chat's id","isRequired":true,"uniqueKey":"chat_id","typeLabel":"string"},"url":{"type":"string","title":"Url","description":"The chat in the Happenstance app","isRequired":true,"uniqueKey":"url","typeLabel":"string"},"turn_id":{"type":"string","title":"Turn Id","description":"The turn to poll: the one this message started, or the running turn it joined","isRequired":true,"uniqueKey":"turn_id","typeLabel":"string"},"status":{"type":"string","enum":["queued","running","completed","failed","cancelled"],"title":"Status","description":"The turn's status","isRequired":true,"uniqueKey":"status","typeLabel":"enum\u003cstring>"},"joined":{"type":"boolean","title":"Joined","description":"True when the message joined the turn that was still running: Chat takes it into that turn's work, and the turn's reply and charge cover both messages","default":false,"uniqueKey":"joined","typeLabel":"boolean"},"answered":{"type":"boolean","title":"Answered","description":"True when the message or answers answered Chat's open questions","default":false,"uniqueKey":"answered","typeLabel":"boolean"},"warning":{"oneOf":[{"type":"string","title":"Warning","description":"Warning message when credit balance is low","uniqueKey":"warning.oneOf.0","typeLabel":"string"},{"type":"null","title":"Warning","description":"Warning message when credit balance is low","uniqueKey":"warning.oneOf.1","typeLabel":"null"}],"uniqueKey":"warning","typeLabel":"string | null"}},"additionalProperties":false,"type":"object","required":["chat_id","url","turn_id","status"],"title":"SendChatMessageResponseV1","description":"Response from POST /v1/chat/{chat_id}/messages.","uniqueKey":"","typeLabel":"SendChatMessageResponseV1 · object"},"examples":{"Example":{"title":"Example","value":{"chat_id":"\u003cstring>","url":"\u003cstring>","turn_id":"\u003cstring>","status":"queued","joined":false,"answered":false,"warning":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"a0380f8e-eed9-4b04-b67b-13d031f41fc4":{"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"},"ae7661d1-6963-4d76-9d9b-7cc002a84138":{"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"},"0bf5dddc-ad00-4f3f-b2da-2579a4173f38":{"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"},"825b3886-5ea3-4ea0-af25-beb38cf8104c":{"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"},"7c550e35-36fd-4ac0-9fe1-48af309840f9":{"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"},"36161911-011d-4f9b-a9ef-ea0bca1fa365":{"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"},"bb7cbaaf-5293-473a-97b4-3e12e1478a59":{"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"},"e1f1c079-6d7f-4066-b905-756b1c159ab5":{"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"},"1879c3a8-8613-4b76-b4a2-bf3097761f34":{"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":{"9b37c2f2-29be-45a7-a207-378ba4c4ff6a":{"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":"Send Chat Message - Happenstance","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-23T17:26:20.018Z","originalFileLocation":"api-reference/send-chat-message.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=\"Send a message to a chat started through the API. Returns at once with the turn to poll. A message sent while a turn is still working joins that turn (joined: true): Chat takes it into the work in progress, and the turn\u0026#x27;s reply and charge cover both messages. When a turn ends with stop_reason needs_input, Chat waits on the questions in its reply.questions: send answers (by question index and option label), a message that answers them in words, or both. The answer starts the next turn (answered: true). Returns 402 when the balance is below 3 credits for this message and for each turn still running, 409 for a chat started in the app.\">\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=\"Send Chat Message - Happenstance\">\u003cmeta data-mint-head property=\"og:description\" content=\"Send a message to a chat started through the API. Returns at once with the turn to poll. A message sent while a turn is still working joins that turn (joined: true): Chat takes it into the work in progress, and the turn\u0026#x27;s reply and charge cover both messages. When a turn ends with stop_reason needs_input, Chat waits on the questions in its reply.questions: send answers (by question index and option label), a message that answers them in words, or both. The answer starts the next turn (answered: true). Returns 402 when the balance is below 3 credits for this message and for each turn still running, 409 for a chat started in the app.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Happenstance\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://developer.happenstance.ai/api-reference/send-chat-message\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://happenstance.mintlify.site/_mintlify/api/og/v2?division=API+Reference\u0026amp;title=Send+Chat+Message\u0026amp;description=Send+a+message+to+a+chat+started+through+the+API.+Returns+at+once+with+the+turn+to+poll.+A%0Amessage+sent+while+a+turn+is+still+working+joins+that+turn+%28joined%3A+t\u0026amp;theme=e9cbf0a039f894b97da272a2\u0026amp;signature=cf8cad105c54c87c1a78616a971821b98d5f7154131273614e0b6a08ccabb10d\">\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=\"Send Chat Message - Happenstance\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Send a message to a chat started through the API. Returns at once with the turn to poll. A message sent while a turn is still working joins that turn (joined: true): Chat takes it into the work in progress, and the turn\u0026#x27;s reply and charge cover both messages. When a turn ends with stop_reason needs_input, Chat waits on the questions in its reply.questions: send answers (by question index and option label), a message that answers them in words, or both. The answer starts the next turn (answered: true). Returns 402 when the balance is below 3 credits for this message and for each turn still running, 409 for a chat started in the app.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://happenstance.mintlify.site/_mintlify/api/og/v2?division=API+Reference\u0026amp;title=Send+Chat+Message\u0026amp;description=Send+a+message+to+a+chat+started+through+the+API.+Returns+at+once+with+the+turn+to+poll.+A%0Amessage+sent+while+a+turn+is+still+working+joins+that+turn+%28joined%3A+t\u0026amp;theme=e9cbf0a039f894b97da272a2\u0026amp;signature=cf8cad105c54c87c1a78616a971821b98d5f7154131273614e0b6a08ccabb10d\">\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/send-chat-message\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/send-chat-message.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/send-chat-message#webpage\",\"url\":\"https://developer.happenstance.ai/api-reference/send-chat-message\",\"name\":\"Send Chat Message\",\"description\":\"Send a message to a chat started through the API. Returns at once with the turn to poll. A message sent while a turn is still working joins that turn (joined: true): Chat takes it into the work in progress, and the turn's reply and charge cover both messages. When a turn ends with stop_reason needs_input, Chat waits on the questions in its reply.questions: send answers (by question index and option label), a message that answers them in words, or both. The answer starts the next turn (answered: true). Returns 402 when the balance is below 3 credits for this message and for each turn still running, 409 for a chat started in the app.\",\"dateModified\":\"2026-10-23T17:26:20.018Z\",\"isPartOf\":{\"@id\":\"https://developer.happenstance.ai#website\"},\"breadcrumb\":{\"@id\":\"https://developer.happenstance.ai/api-reference/send-chat-message#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://developer.happenstance.ai/api-reference/send-chat-message#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\":\"Send Chat Message\",\"item\":\"https://developer.happenstance.ai/api-reference/send-chat-message\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://developer.happenstance.ai/api-reference/send-chat-message#apireference\",\"headline\":\"Send Chat Message\",\"name\":\"Send Chat Message\",\"description\":\"Send a message to a chat started through the API. Returns at once with the turn to poll. A message sent while a turn is still working joins that turn (joined: true): Chat takes it into the work in progress, and the turn's reply and charge cover both messages. When a turn ends with stop_reason needs_input, Chat waits on the questions in its reply.questions: send answers (by question index and option label), a message that answers them in words, or both. The answer starts the next turn (answered: true). Returns 402 when the balance is below 3 credits for this message and for each turn still running, 409 for a chat started in the app.\",\"url\":\"https://developer.happenstance.ai/api-reference/send-chat-message\",\"mainEntityOfPage\":{\"@id\":\"https://developer.happenstance.ai/api-reference/send-chat-message#webpage\"},\"dateModified\":\"2026-10-23T17:26:20.018Z\",\"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","description":"The whole chat: its messages (Chat's as markdown), its turns, the searches it ran, and\nthe notes Chat keeps on the user's goal and preferences (memory) and on older turns.","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","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"}]}]}]}]},"basePath":"","title":"Send Chat Message - Happenstance","buildId":"dpl_FWZhTb2vab28gFGFH4ojka6qEznQ","deploymentId":"dpl_FWZhTb2vab28gFGFH4ojka6qEznQ","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-CBsVopKK.js","utils-DZAk68jJ.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-D32AYZrP.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-D_A5_cny.js","snippetPresets-xNRfS9th.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","ApiExamples-BIB25-tq.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-CydJ4w4j.js","shallow-CYPBeQSG.js","getApiPlaygroundDisplay-A5xJVBOu.js","CodeSnippet-BVRTgi3m.js","CodeSnippets-DjD6BSlt.js","Page-Dr40SSJq.js","getPastedJson-D4V4JyrR.js","icon-uhcnG22T.js","MethodPill-CM-ZQdGH.js","DuplicateIcon-B_WnOiNf.js","createIcon-CJsb8utt.js","DynamicMarkdown-D-2HDKEp.js","SectionHeading-KP5xmMgQ.js","axios-vUo_bRtp.js","Markdown-D_k0dg6k.js","clsx-DK3K4Z1S.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-DE3EVdvd.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-fN9H9n9g.js"]}