Cancel all active worker runs for a conversation
Learn more about cancel all active worker runs for a conversation.
Use the Cancel all active worker runs for a conversation to cancel all active worker runs for a conversation. This lets you stop all active work for a conversation in one call.
HTTP method and endpoint
Use the following HTTP method and endpoint path to cancel all active worker runs for a conversation.
POST {TenantURL}/ai/agentflow/api/v202605/{tenant_id}/lrt/jobs/cancel-by-conversation/{conversation_id}
The following table describes the endpoint path parameters.
| Parameter | Type | Required | Description |
|---|---|---|---|
TenantURL | String | Yes | The base URL for your tenant. |
conversation_id | String | Yes | The unique identifier of the conversation associated with the job. |
tenant_id | String | Yes | The tenant identifier. |
Request headers
The following request headers must be included.
| Header | Value | Required |
|---|---|---|
Authorization | <access_token> | Yes |
Request body
This operation does not require a request body.
Example request
Use the following example to see how a complete request is structured, with headers.
POST {TenantURL}/ai/agentflow/api/v202605/tenant-xyz/lrt/jobs/cancel-by-conversation/example-id
Authorization: <access_token>
Response body
The following table describes the fields returned in the response body.
| Parameter | Type | Description |
|---|---|---|
conversation_id | String | The unique identifier of the conversation. |
job_id | String | The unique identifier of the job, if active runs were found. |
status | String | The status of the cancellation request. |
message | String | A status message describing the result. |
Example response
The following example shows a response with successful response.
{
"conversation_id": "<string>",
"job_id": "<string>",
"status": "cancelling",
"message": "<string>"
}
Error codes and recommended actions
The following table lists the possible error responses returned by this API.
| HTTP status | Description | Recommended action |
|---|---|---|
422 Unprocessable Entity | Validation Error | Review the request parameters or body, correct the invalid values, and resend the request. |