Skip to content

chats.interruptChat

POST
/v1/chats/{chatId}/interrupt
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.

chatId
required
string
>= 1 characters
Media typeapplication/json
object
commandKey
required
string
>= 1 characters <= 128 characters
delegations
boolean

Example generated

{
"commandKey": "example",
"delegations": true
}

Success

Media typeapplication/json
object
executionId
required
string
>= 1 characters <= 128 characters
commandKey
required
string
>= 1 characters <= 128 characters
sequence
required
integer
<= 9007199254740991

Example generated

{
"executionId": "example",
"commandKey": "example",
"sequence": 1
}

ChatModelInvalid | OrganizationRequired

Media typeapplication/json
Any of:
object
_tag
required
string
Allowed values: ChatModelInvalid
reason
required
string
Allowed values: provider-not-found model-not-found unsupported-option missing
message
required
string

Example

{
"_tag": "ChatModelInvalid",
"reason": "provider-not-found"
}

AuthenticationRequired

Media typeapplication/json
object
_tag
required
string
Allowed values: AuthenticationRequired

Example

{
"_tag": "AuthenticationRequired"
}

ExecutionForbidden | @nmnmcc/ability/Authorizer/Forbidden | MembershipRequired | ForbiddenOrigin

Media typeapplication/json
Any of:
object
_tag
required
string
Allowed values: ExecutionForbidden

Example

{
"_tag": "ExecutionForbidden"
}

ChatNotFound | ExecutionNotFound

Media typeapplication/json
Any of:
object
_tag
required
string
Allowed values: ChatNotFound
chat
required
string

Example

{
"_tag": "ChatNotFound"
}

ChatConflict | ExecutionConflict | ExecutionKeyConflict | @nmnmcc/ability/Authorizer/Pending

Media typeapplication/json
Any of:
object
_tag
required
string
Allowed values: ChatConflict
message
required
string

Example

{
"_tag": "ChatConflict"
}

RateLimited

Media typeapplication/json
object
_tag
required
string
Allowed values: RateLimited
retryAfterSeconds
required
integer
>= -9007199254740991 <= 9007199254740991

Example

{
"_tag": "RateLimited"
}

ChatStorageUnavailable | ExecutionUnavailable | AuthenticationUnavailable | RequestFailed

Media typeapplication/json
Any of:
object
_tag
required
string
Allowed values: ChatStorageUnavailable

Example

{
"_tag": "ChatStorageUnavailable"
}