---
title: Stop Message
description: Stops an in-flight message generation in a chat. Useful for cancelling a streaming response that is still being generated.
product: Platform API
type: reference
prerequisites:
  - /docs/api/platform/quickstart
---

# Stop Message



<EndpointDisplay method="post" path="/chats/{chatId}/messages/{messageId}/stop" />

## Usage [#usage]

<CustomCodeBlock languages="['TypeScript', 'cURL']" defaultLanguage="TypeScript">
  <CodeVariant
    language="TypeScript"
    title="TypeScript Example"
    code="`import { v0 } from 'v0-sdk'

const result = await v0.chats.stopMessage({
  chatId: 'chat_abc123',
  messageId: 'msg_xyz789',
})

console.log(result)`"
  />

  <CodeVariant
    language="cURL"
    title="cURL Example"
    code="`curl -X POST https://api.v0.dev/chats/{chatId}/messages/{messageId}/stop \
  -H &#x22;Authorization: Bearer $V0_API_KEY&#x22; \
  -H &#x22;Content-Type: application/json&#x22;`"
  />
</CustomCodeBlock>

## API Signature [#api-signature]

### Request [#request]

#### Path Parameters [#path-parameters]

<APISignature
  parameters="[
  {
    &#x22;name&#x22;: &#x22;chatId&#x22;,
    &#x22;type&#x22;: &#x22;string&#x22;,
    &#x22;required&#x22;: true,
    &#x22;description&#x22;: &#x22;The unique identifier of the chat containing the message to stop. Provided as a path parameter.&#x22;
  },
  {
    &#x22;name&#x22;: &#x22;messageId&#x22;,
    &#x22;type&#x22;: &#x22;string&#x22;,
    &#x22;required&#x22;: true,
    &#x22;description&#x22;: &#x22;The identifier of the specific message to stop. Provided as a path parameter.&#x22;
  }
]"
/>

### Response [#response]

<APISignature
  parameters="[
  {
    &#x22;name&#x22;: &#x22;success&#x22;,
    &#x22;type&#x22;: &#x22;true&#x22;,
    &#x22;required&#x22;: true,
    &#x22;description&#x22;: &#x22;Indicates that the stop signal was sent successfully.&#x22;,
    &#x22;deprecated&#x22;: false
  }
]"
/>
