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

# Delete Agent

> Permanently delete an AI phone agent

Permanently deletes an agent from your organization. This action cannot be undone. Any ongoing calls using this agent will not be affected, but no new calls can be made with the deleted agent.

## Headers

<ParamField header="x-api-key" type="string" required>
  Your API key for authentication. Found in your dashboard under API settings.
</ParamField>

## Path Parameters

<ParamField path="agentId" type="string" required>
  The UUID of the agent to delete.
</ParamField>

## Response

Returns `true` on successful deletion.

## Error Codes

* `401 Unauthorized` — Invalid or missing API key
* `404 Not Found` — Agent not found
* `500 Internal Server Error` — Server-side error

## Code Examples

<RequestExample>
  ```bash cURL theme={null}
  curl -X DELETE "https://api.contactship.ai/v1/agents/agent-a1b2c3d4-e5f6-7890-abcd-ef1234567890" \
    -H "x-api-key: your-api-key"
  ```

  ```javascript JavaScript theme={null}
  const agentId = 'agent-a1b2c3d4-e5f6-7890-abcd-ef1234567890';
  const response = await fetch(
    `https://api.contactship.ai/v1/agents/${agentId}`,
    {
      method: 'DELETE',
      headers: { 'x-api-key': 'your-api-key' },
    }
  );
  const success = await response.json(); // true
  ```

  ```python Python theme={null}
  import requests

  agent_id = 'agent-a1b2c3d4-e5f6-7890-abcd-ef1234567890'
  response = requests.delete(
      f'https://api.contactship.ai/v1/agents/{agent_id}',
      headers={'x-api-key': 'your-api-key'},
  )
  print(response.json())  # True
  ```
</RequestExample>

<ResponseExample>
  ```json Example Response theme={null}
  true
  ```
</ResponseExample>
