# Stop Automation

> POST /automations/:id/stop — stop an automation from creating new runs.

`POST /automations/:id/stop`

Stops an automation by setting its status to `disabled`. This prevents new [runs](https://www.senddart.com/docs/automations/runs) from being created; existing in-progress runs continue to completion.

**Path parameters**

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

**Node.js**

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

const mb = new SendDart('mb_xxxxxxxxx');

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

**Ruby**

```ruby
require "senddart"

SendDart.api_key = "mb_xxxxxxxxx"

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

**PHP**

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

use SendDart\SendDart;

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

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

**Python**

```python
import senddart

senddart.api_key = "mb_xxxxxxxxx"

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

**Go**

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

client := senddart.NewClient("mb_xxxxxxxxx")

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

**Rust**

```rust
use senddart::SendDart;

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

let _automation = mb.automations.stop("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().stop("c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd");
```

**.NET**

```csharp
using SendDart;

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

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

**cURL**

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

**CLI**

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

### Response

Returns the updated automation object with `status` set to `disabled`.

```json
{
  "object": "automation",
  "id": "c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd",
  "audience_id": "78261eea-8f8b-4381-83c6-79fa7120f1cf",
  "domain": "yourdomain.com",
  "name": "Welcome series",
  "trigger": "user.created",
  "status": "disabled",
  "trigger_config": null,
  "trigger_key": "start",
  "created_at": "2026-06-23T10:00:00.000Z",
  "updated_at": "2026-06-23T10:02:00.000Z"
}
```

> **Note:** Stopping an automation prevents new runs from being created. Existing in-progress runs continue to completion.
