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

# Eliminar task

> Eliminar una tarea permanentemente.

## Endpoint

```
DELETE /api/tasks/{id}
```

## Headers

<ParamField header="Authorization" type="string" required>
  Bearer token con tu API key. Formato: `Bearer sk_live_xxx`
</ParamField>

## Path Parameters

<ParamField path="id" type="string" required>
  ID de la tarea a eliminar
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X DELETE "https://app.horneross.com/api/tasks/trigger_abc123" \
    -H "Authorization: Bearer sk_live_xxx"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    'https://app.horneross.com/api/tasks/trigger_abc123',
    {
      method: 'DELETE',
      headers: {
        'Authorization': 'Bearer sk_live_xxx',
      },
    }
  );

  if (response.ok) {
    console.log('Task eliminada');
  }
  ```

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

  response = requests.delete(
      'https://app.horneross.com/api/tasks/trigger_abc123',
      headers={'Authorization': 'Bearer sk_live_xxx'}
  )

  if response.status_code == 200:
      print('Task eliminada')
  ```
</RequestExample>

## Response

<ResponseField name="success" type="boolean" required>
  `true` si la eliminación fue exitosa
</ResponseField>

<ResponseExample>
  ```json 200 - Success theme={null}
  {
    "success": true
  }
  ```

  ```json 404 - Not Found theme={null}
  {
    "error": "Task not found"
  }
  ```
</ResponseExample>

<Warning>
  Esta acción es irreversible. Se eliminará también el schedule programado (para tareas tipo `schedule`) y el trigger de Composio (para tareas tipo `integration_event`).
</Warning>
