chats.interruptChat
POST
/v1/chats/{chatId}/interrupt
const url = 'https://example.com/v1/chats/example/interrupt';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"commandKey":"example","delegations":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/v1/chats/example/interrupt \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "commandKey": "example", "delegations": true }'Stops the running Turn. The work that the Chat gave to Bots goes on, unless delegations is true.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”chatId
required
string
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
commandKey
required
string
delegations
boolean
Example generated
{ "commandKey": "example", "delegations": true}Responses
Section titled “Responses”Success
Media typeapplication/json
object
executionId
required
string
commandKey
required
string
sequence
required
integer
Example generated
{ "executionId": "example", "commandKey": "example", "sequence": 1}ChatModelInvalid | OrganizationRequired
AuthenticationRequired
Media typeapplication/json
object
_tag
required
string
Example
{ "_tag": "AuthenticationRequired"}ExecutionForbidden | @nmnmcc/ability/Authorizer/Forbidden | MembershipRequired | ForbiddenOrigin
ChatNotFound | ExecutionNotFound
ChatConflict | ExecutionConflict | ExecutionKeyConflict | @nmnmcc/ability/Authorizer/Pending
RateLimited
Media typeapplication/json
object
_tag
required
string
retryAfterSeconds
required
integer
Example
{ "_tag": "RateLimited"}ChatStorageUnavailable | ExecutionUnavailable | AuthenticationUnavailable | RequestFailed