> ## Documentation Index
> Fetch the complete documentation index at: https://docs.talkover.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete Agent

> Delete a voice agent and all associated data

# Delete Agent

Permanently delete a voice agent and all its associated data including trainings, actions, and phone number associations. This action cannot be undone.

## Endpoint

```
DELETE /api/v1/agents/{agent_id}
```

## Path parameters

<ParamField path="agent" type="string" required>
  The unique identifier of the voice agent to delete.
</ParamField>

## Request headers

<ParamField header="Authorization" type="string" required>
  Bearer token for authentication. Format: `Bearer talq_your_environment_token_here`
</ParamField>

## Example requests

<RequestExample>
  ```bash theme={null}
  # Request 1: Delete a specific agent by ID
  curl -X DELETE "https://app.talkover.ai/api/v1/agents/550e8400-e29b-41d4-a716-446655440000" \
    -H "Authorization: Bearer talq_your_environment_token_here"
  ```

  ```javascript theme={null}
  // Request 1: Delete a specific agent by ID
  const response = await fetch('https://app.talkover.ai/api/v1/agents/550e8400-e29b-41d4-a716-446655440000', {
    method: 'DELETE',
    headers: {
      'Authorization': 'Bearer talq_your_environment_token_here'
    }
  });

  const result = await response.json();
  console.log(result);
  ```
</RequestExample>

## Response

### Success Response (200 OK)

<ResponseExample>
  ```json theme={null}
  {
    "success": true,
    "message": "Agent deleted successfully"
  }
  ```
</ResponseExample>

### Response fields

<ResponseField name="success" type="boolean" required>
  Indicates if the operation was successful.
</ResponseField>

<ResponseField name="message" type="string" required>
  Success message confirming the agent was deleted.
</ResponseField>

## Error responses

### 404 Not Found

<ResponseExample>
  ```json theme={null}
  {
    "success": false,
    "message": "Agent not found"
  }
  ```
</ResponseExample>

### 401 Unauthorized

<ResponseExample>
  ```json theme={null}
  {
    "success": false,
    "message": "Unauthenticated."
  }
  ```
</ResponseExample>

### 403 Forbidden

<ResponseExample>
  ```json theme={null}
  {
    "success": false,
    "message": "You are not authorized to perform this action."
  }
  ```
</ResponseExample>

### 409 Conflict

<ResponseExample>
  ```json theme={null}
  {
    "success": false,
    "message": "Cannot delete agent while it has active calls."
  }
  ```
</ResponseExample>

## Error codes

| Code                     | Description                                          | HTTP Status |
| ------------------------ | ---------------------------------------------------- | ----------- |
| `AGENT_NOT_FOUND`        | Specified agent does not exist                       | 404         |
| `INVALID_TOKEN`          | Authentication token is invalid or missing           | 401         |
| `UNAUTHORIZED`           | User does not have permission to delete this agent   | 403         |
| `AGENT_HAS_ACTIVE_CALLS` | Agent cannot be deleted while it has active calls    | 409         |
| `AGENT_IS_PUBLISHED`     | Published agents must be unpublished before deletion | 409         |

## Important notes

<Warning>
  **This action is irreversible.** Once an agent is deleted, all associated data including:

  * Agent configuration
  * Training data
  * Actions and webhooks
  * Phone number associations
  * Call history

  Will be permanently removed and cannot be recovered.
</Warning>

<Info>
  **Published agents must be unpublished first.** If the agent is currently published, you must unpublish it before deletion.
</Info>

## Related endpoints

* **List Agents**: `GET /api/v1/agents`
* **Get Agent**: `GET /api/v1/agents/{agent_id}`
* **Unpublish Agent**: `POST /api/v1/agents/{agent_id}/unpublish`
* **Create Agent**: `POST /api/v1/agents`
