RecoupGet a Free AuditFree Audit

API REFERENCE

Stop Chat

On this page
POST/api/chat/{chatId}/stop

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.

Authentication

x-api-key in header

Request

cURL
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.

Parameters

Path parameters

chatIdstringrequired

UUID of the chat to stop.

Responses

200Stop request processed

application/json

successbooleanrequired

Always true when the request was processed.

stoppedbooleanrequired

True when an in-progress response was cancelled; false when nothing was running.

400chatId is not a valid UUID

application/json

statusstring · enumrequired

Status of the request

Values: "error"

errorstringrequired

Error message describing what went wrong

403The chat belongs to a different account

application/json

statusstring · enumrequired

Status of the request

Values: "error"

errorstringrequired

Error message describing what went wrong

404Chat not found

application/json

statusstring · enumrequired

Status of the request

Values: "error"

errorstringrequired

Error message describing what went wrong

Full specification

Download the OpenAPI file for complete schemas, constraints, and examples.

Download research.json
View operation source
json
{
  "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"
          }
        }
      }
    }
  }
}