# Delete Automation

> DELETE /automations/:id — permanently delete an automation and everything attached to it.

`DELETE /automations/:id`

Permanently deletes an automation along with all of its steps, connections, enrollments, and runs. This action cannot be undone.

**Path parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | Yes | The ID of the automation to delete. |

**Node.js**

```js
import { SendDart } from 'senddart';

const mb = new SendDart('mb_xxxxxxxxx');

const { data, error } = await mb.automations.remove('c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd');
console.log({ data, error });
```

**Ruby**

```ruby
require "senddart"

SendDart.api_key = "mb_xxxxxxxxx"

SendDart::Automations.delete("c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd")
```

**PHP**

```php
<?php
require 'vendor/autoload.php';

use SendDart\SendDart;

$senddart = SendDart::client('mb_xxxxxxxxx');

$senddart->automations->remove('c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd');
```

**Python**

```python
import senddart

senddart.api_key = "mb_xxxxxxxxx"

senddart.Automations.remove("c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd")
```

**Go**

```go
import "github.com/shekhu10/senddart-sdks/senddart-go"

client := senddart.NewClient("mb_xxxxxxxxx")

removed, err := client.Automations.Remove("c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd")
```

**Rust**

```rust
use senddart::SendDart;

let mb = SendDart::new("mb_xxxxxxxxx");

let _removed = mb.automations.remove("c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd").await?;
```

**Java**

```java
import com.senddart.SendDart;
import com.senddart.SendDartResponse;

SendDart senddart = new SendDart("mb_xxxxxxxxx");

SendDartResponse response = senddart.automations().remove("c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd");
```

**.NET**

```csharp
using SendDart;

ISendDart senddart = SendDartClient.Create("mb_xxxxxxxxx");

var resp = await senddart.AutomationDeleteAsync("c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd");
```

**cURL**

```bash
curl -X DELETE 'https://www.senddart.com/api/automations/c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd' \
  -H 'Authorization: Bearer mb_xxxxxxxxx'
```

**CLI**

```bash
senddart automations delete c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd
```

### Response

```json
{
  "object": "automation",
  "id": "c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd",
  "deleted": true
}
```
