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

# Apagar Agente

## Descrição

Este endpoint permite apagar um agente de IA existente, utilizando o `id` do agente e a chave de autenticação.

### Parâmetros

<ParamField path="id" type="string" required>
  ID do agente de IA que será apagado.
</ParamField>

<ParamField body="authkey" type="string" required>
  Chave de autenticação da conta.
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X DELETE https://chatbot.menuia.com/api/v2/ia/123 \
    -H "Content-Type: application/json" \
    -d '{
      "authkey": "SUA_AUTHKEY_AQUI"
    }'
  ```

  ```javascript Node.js theme={null}
  const response = await fetch('https://chatbot.menuia.com/api/v2/ia/123', {
    method: 'DELETE',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({
      authkey: 'SUA_AUTHKEY_AQUI'
    })
  });
  ```

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

  response = requests.delete(
      'https://chatbot.menuia.com/api/v2/ia/123',
      json={
          'authkey': 'SUA_AUTHKEY_AQUI'
      }
  )
  ```

  ```php PHP theme={null}
  $response = Http::delete('https://chatbot.menuia.com/api/v2/ia/123', [
      'authkey' => 'SUA_AUTHKEY_AQUI'
  ]);
  ```
</RequestExample>

<ResponseExample>
  ```json 200 - Sucesso theme={null}
  {
    "status": 200,
    "message": "Agente de IA apagado com sucesso."
  }
  ```

  ```json 401 - Erro de validação theme={null}
  {
    "status": 401,
    "message": "validation.required"
  }
  ```

  ```json 404 - Agente não encontrado theme={null}
  {
    "status": 404,
    "message": "Agente de IA não encontrado."
  }
  ```
</ResponseExample>
