# List Automations

> GET /automations — list your automations, newest first.

`GET /automations`

Lists your automations, newest first. The list returns automation objects **without** `steps`, `connections`, or `enrollments` — [retrieve a single automation](https://www.mailblastr.com/docs/api/automations-get) for the full object. See [Pagination](https://www.mailblastr.com/docs/api/pagination) for navigating with `limit`, `after`, and `before`.

**Query parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `limit` | number | No | Number of automations to retrieve per page. Default `20`, maximum `100`, minimum `1`. |
| `after` | string | No | The automation `id` **after** which more automations are retrieved (the next page). Cannot be combined with `before`. |
| `before` | string | No | The automation `id` **before** which more automations are retrieved (the previous page). Cannot be combined with `after`. |

**Node.js**

```js
import { MailBlastr } from 'mailblastr';

const mb = new MailBlastr('mb_xxxxxxxxx');

const { data, error } = await mb.automations.list({ limit: 20 });
console.log({ data, error });
```

**Ruby**

```ruby
require "mailblastr"

Mailblastr.api_key = "mb_xxxxxxxxx"

Mailblastr::Automations.list({
  "limit": 20
})
```

**PHP**

```php
$mailblastr = Mailblastr::client('mb_xxxxxxxxx');

$mailblastr->automations->list([
  'limit' => 20
]);
```

**Python**

```python
import mailblastr

mailblastr.api_key = "mb_xxxxxxxxx"

mailblastr.Automations.list({
  "limit": 20
})
```

**Go**

```go
package main

import (
    "fmt"
    "io"
    "net/http"
)

func main() {
    req, _ := http.NewRequest("GET", "https://api.mailblastr.com/automations?limit=20", nil)
    req.Header.Set("Authorization", "Bearer mb_xxxxxxxxx")
    res, _ := http.DefaultClient.Do(req)
    defer res.Body.Close()
    out, _ := io.ReadAll(res.Body)
    fmt.Println(string(out))
}
```

**Rust**

```rust
use reqwest::Client;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let res = Client::new()
        .get("https://api.mailblastr.com/automations?limit=20")
        .header("Authorization", "Bearer mb_xxxxxxxxx")
        .send()
        .await?;
    println!("{}", res.text().await?);
    Ok(())
}
```

**Java**

```java
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

var client = HttpClient.newHttpClient();
var request = HttpRequest.newBuilder()
    .uri(URI.create("https://api.mailblastr.com/automations?limit=20"))
    .header("Authorization", "Bearer mb_xxxxxxxxx")
    .method("GET", HttpRequest.BodyPublishers.noBody())
    .build();
var response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
```

**.NET**

```csharp
using System.Net.Http;
using System.Text;

var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://api.mailblastr.com/automations?limit=20");
request.Headers.Add("Authorization", "Bearer mb_xxxxxxxxx");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());
```

**cURL**

```bash
curl -X GET 'https://api.mailblastr.com/automations?limit=20' \
  -H 'Authorization: Bearer mb_xxxxxxxxx'
```

**CLI**

```bash
mailblastr automations list \
  --limit 20
```

### Response

```json
{
  "object": "list",
  "has_more": false,
  "data": [
    {
      "object": "automation",
      "id": "c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd",
      "audience_id": "aud_3b1c...",
      "domain": "yourdomain.com",
      "name": "Welcome series",
      "trigger": "user.created",
      "status": "enabled",
      "created_at": "2026-06-23T10:00:00.000Z",
      "updated_at": "2026-06-23T10:00:00.000Z"
    }
  ]
}
```

Returns `validation_error` if `limit` is outside 1–100, if a cursor is malformed, or if both `before` and `after` are supplied. See [Errors](https://www.mailblastr.com/docs/api/errors).
