Chat Messages

Stop Chat Message Generation

Available for: Chatflow, Agent, Chatbot, Legacy Agent apps.

Stops a chat message generation task. Only supported in streaming mode, or after a blocking call returns with a Chatflow run paused.

post/chat-messages/{task_id}/stop

Request

  • Base URL
    https://api.dify.ai/v1
  • URL
    https://api.dify.ai/v1/chat-messages/{task_id}/stop
  • Auth
    HTTP bearer

Path parameters

task_idstring required

Task ID, from the streaming events of Send Chat Message, or from the blocking response of a Chatflow run that paused.

Request body

userstring required

End-user identifier, defined by your app and unique within it. Must match the user sent with the original message; if it differs, the stop silently does nothing and still returns success. See End User Identity.

Response

Operation successful.

resultstring

Operation result. Always success.

Changes

No recorded changes to this operation across all 17 revisions of this API.