# 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 { SendPing } from 'sendping';

const mb = new SendPing('mb_xxxxxxxxx');

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

**Ruby**

```ruby
require "sendping"

SendPing.api_key = "mb_xxxxxxxxx"

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

**PHP**

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

use SendPing\SendPing;

$sendping = SendPing::client('mb_xxxxxxxxx');

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

**Python**

```python
import sendping

sendping.api_key = "mb_xxxxxxxxx"

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

**Go**

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

client := sendping.NewClient("mb_xxxxxxxxx")

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

**Rust**

```rust
use sendping::SendPing;

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

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

**Java**

```java
import co.sendping.SendPing;
import co.sendping.SendPingResponse;

SendPing sendping = new SendPing("mb_xxxxxxxxx");

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

**.NET**

```csharp
using SendPing;

ISendPing sendping = SendPingClient.Create("mb_xxxxxxxxx");

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

**cURL**

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

**CLI**

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

### Response

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