---
title: Interrupt the agent
description: Interrupt an agent while speaking or thinking.
sidebar_position: 8
platform: android
exported_from: https://docs.agora.io/en/conversational-ai/rest-api/agent/interrupt
exported_on: '2026-06-05T05:02:50.231710Z'
exported_file: interrupt.md
---

> For a complete site index fetch https://docs.agora.io/llms.txt. For all pages in this product fetch https://docs.agora.io/en/conversational-ai/overview/product-overview.md

[HTML Version](https://docs.agora.io/en/conversational-ai/rest-api/agent/interrupt)

# Interrupt the agent


**Method:** POST
**Endpoint:** `https://api.agora.io/api/conversational-ai-agent/v2/projects/{appid}/agents/{agentId}/interrupt`

Use this endpoint to interrupt the specified agent while speaking or thinking.

## Request

### Path parameters

- **appid** (string, required): The App ID of the project.
- **agentId** (string, required): The agent instance ID you obtained after successfully calling `join` to [Start a conversational AI agent](https://docs-md.agora.io/en/conversational-ai/rest-api/agent/join.md).
### Request body

APPLICATION/JSON
The request body is empty.

## Response

- If the returned status code is `200`, the request was successful. The response body contains agent information and the agent stops talking and thinking immediately.

- If the returned status code is not `200`, the request failed. The response body includes the error code and description. Refer to [status codes](https://docs-md.agora.io/en/conversational-ai/rest-api/reference.md) to understand the possible reasons for failure.

## Authorization

This endpoint requires [authentication](https://docs-md.agora.io/en/conversational-ai/rest-api/restful-authentication.md).

## Request example

**curl**
```bash
      curl --request post \
        --url https://api.agora.io/api/conversational-ai-agent/v2/projects/:appid/agents/:agentId/interrupt \
        --header 'Authorization: Basic' \
        --data '{}'
```

**Python**
```python
    import requests

    url = "https://api.agora.io/api/conversational-ai-agent/v2/projects/:appid/agents/:agentId/interrupt"

    payload = {}
    headers = {"Authorization": "Basic"}

    response = requests.request("post", url, json=payload, headers=headers)

    print(response.text)
```

**Node.js**
```js
    const url = 'https://api.agora.io/api/conversational-ai-agent/v2/projects/:appid/agents/:agentId/interrupt';
    const options = {
      method: 'post',
      headers: {Authorization: 'Basic'},
      body: JSON.stringify({})
    };

    fetch(url, options)
      .then(res => res.json())
      .then(json => console.log(json))
      .catch(err => console.error(err));
```