# Retrieve Automation

> GET /automations/:id — retrieve one automation with its steps, connections, and enrollment counts.

`GET /automations/:id`

Retrieves a single automation. Unlike the [list](https://www.mailblastr.com/docs/api/automations-list), this returns the full object — `steps` (the trigger step first, then the executable steps), `connections`, and `enrollments` (an object with `active` and `completed` counts).

**Path parameters**

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

**Node.js**

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

const mb = new MailBlastr('mb_xxxxxxxxx');

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

**Ruby**

```ruby
require "mailblastr"

Mailblastr.api_key = "mb_xxxxxxxxx"

Mailblastr::Automations.get("c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd")
```

**PHP**

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

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

**Python**

```python
import mailblastr

mailblastr.api_key = "mb_xxxxxxxxx"

mailblastr.Automations.get("c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd")
```

**Go**

```go
package main

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

func main() {
    req, _ := http.NewRequest("GET", "https://api.mailblastr.com/automations/c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd", 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/c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd")
        .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/c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd"))
    .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/c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd");
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/c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd' \
  -H 'Authorization: Bearer mb_xxxxxxxxx'
```

**CLI**

```bash
mailblastr automations get c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd
```

### Response

```json
{
  "object": "automation",
  "id": "c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd",
  "audience_id": "aud_3b1c...",
  "domain": "yourdomain.com",
  "name": "Welcome series",
  "trigger": "user.created",
  "status": "enabled",
  "steps": [
    {
      "key": "start",
      "type": "trigger",
      "config": { "event_name": "user.created" }
    },
    {
      "id": "9a8b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d",
      "key": "welcome",
      "type": "send_email",
      "position": 0,
      "config": {
        "template": { "id": "34a080c9-b17d-4187-ad80-5af20266e535" }
      }
    }
  ],
  "connections": [
    { "from": "start", "to": "welcome", "type": "default" }
  ],
  "enrollments": { "active": 12, "completed": 48 },
  "created_at": "2026-06-23T10:00:00.000Z",
  "updated_at": "2026-06-23T10:00:00.000Z"
}
```

An unknown id returns `404 not_found`. See [Errors](https://www.mailblastr.com/docs/api/errors).
