API REFERENCE
Stop Chat
On this page
/api/chat/{chatId}/stopStop the response currently being generated for a chat, freeing it to accept a new message. Idempotent — returns stopped: false when nothing is in progress. The chat must belong to the authenticated account.
Authentication
x-api-key in header
Request
curl --request POST \
--url 'https://api.recoupable.dev/api/chat/YOUR_CHAT_ID/stop' \
--header 'x-api-key: YOUR_API_KEY'Replace the YOUR_ placeholders with your values. Required query parameters are included; optional parameters are listed below.
Try it
Fill in the fields, send the request from your browser, and read the live response. The curl below updates as you type.
Kept in this browser tab only and cleared when it closes.
curl --request POST \
--url 'https://recoup-api.vercel.app/api/chat/{chatId}/stop'Parameters
Path parameters
chatIdstringrequiredUUID of the chat to stop.
Responses
200Stop request processed+
application/json
successbooleanrequiredAlways true when the request was processed.
stoppedbooleanrequiredTrue when an in-progress response was cancelled; false when nothing was running.
400chatId is not a valid UUID+
application/json
statusstring · enumrequiredStatus of the request
Values: "error"
errorstringrequiredError message describing what went wrong
403The chat belongs to a different account+
application/json
statusstring · enumrequiredStatus of the request
Values: "error"
errorstringrequiredError message describing what went wrong
404Chat not found+
application/json
statusstring · enumrequiredStatus of the request
Values: "error"
errorstringrequiredError message describing what went wrong
Full specification
Download the OpenAPI file for complete schemas, constraints, and examples.
Download research.jsonView operation source
{
"description": "Stop the response currently being generated for a chat, freeing it to accept a new message. Idempotent — returns `stopped: false` when nothing is in progress. The chat must belong to the authenticated account.",
"security": [
{
"apiKeyAuth": []
}
],
"parameters": [
{
"name": "chatId",
"in": "path",
"required": true,
"description": "UUID of the chat to stop.",
"schema": {
"type": "string",
"format": "uuid"
}
}
],
"responses": {
"200": {
"description": "Stop request processed",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/StopChatResponse"
}
}
}
},
"400": {
"description": "chatId is not a valid UUID",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/StopChatErrorResponse"
}
}
}
},
"403": {
"description": "The chat belongs to a different account",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/StopChatErrorResponse"
}
}
}
},
"404": {
"description": "Chat not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/StopChatErrorResponse"
}
}
}
}
}
}