> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developers.beehiiv.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developers.beehiiv.com/_mcp/server.

# List automations <Badge intent="info" minimal outlined>OAuth Scope: automations:read</Badge>

GET https://api.beehiiv.com/v2/publications/{publicationId}/automations

Retrieve automations for a publication.

Reference: https://developers.beehiiv.com/api-reference/automations/index

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `publicationId` (string, required) — The prefixed ID of the publication object

### Query parameters

- `expand[]` (enum, optional) — Optional list of expandable objects.
  - Allowed values: `stats`
- `limit` (integer, optional) — A limit on the number of objects to be returned. The limit can range between 1 and 100, and the default is 10.
- `page` (integer, optional) — Pagination returns the results in pages. Each page contains the number of results specified by the `limit` (default: 10).If not specified, results 1-10 from page 1 will be returned.

## Response

### 200

OK

- `data` (list of Automation, optional)
- `limit` (integer, optional) — The limit placed on the results. If no limit was specified in the request,this defaults to 10.
- `page` (integer, optional, default: 1) — The page number the results are from. If no page was specified in the request, this defaults to page 1.
- `total_results` (integer, optional) — The total number of results from all pages.
- `total_pages` (integer, optional) — The total number of pages.

## Errors

### 400 Bad Request Error

Bad Request

- `status` (integer, required)
- `statusText` (string, required)
- `errors` (list of ErrorDetail, required)

### 401 Unauthorized Error

Unauthorized. The API key or OAuth access token is missing, invalid, or expired.

- `status` (integer, required)
- `statusText` (string, required)
- `errors` (list of ErrorDetail, required)

### 404 Not Found Error

Resource Not Found

- `status` (integer, required)
- `statusText` (string, required)
- `errors` (list of ErrorDetail, required)

### 429 Too Many Requests Error

Rate Limit Exceeded

- `status` (integer, required)
- `statusText` (string, required)
- `errors` (list of ErrorDetail, required)

### 500 Internal Server Error

Internal Server Error

- `status` (integer, required)
- `statusText` (string, required)
- `errors` (list of ErrorDetail, required)

## Types

### Automation

- `id` (string, required) — A unique prefixed id of the automation
- `status` (enum, required)
  - Allowed values: `running`, `finishing`, `inactive`, `live`, `draft`
- `name` (string, required)
- `trigger_events` (list of enum, required) — The types of events that can trigger the automation.
  - Allowed values: `api`, `community_join`, `downgrade`, `email_submission`, `form_submission`, `link_click`, `manual`, `newsletter_list_subscribed`, `podcast_episode_published`, `poll_submission`, `purchased_product`, `referral_action`, `segment_action`, `shopify_sale`, `signup`, `unengaged`, `upgrade`
- `description` (string, optional)
- `stats` (AutomationStats, optional) — Optional statistics for an automation. Retrievable by including `expand: [stats]` in the automation request.

### ErrorDetail

- `message` (string, required)
- `code` (string, required)

### AutomationStats

Optional statistics for an automation. Retrievable by including `expand: [stats]` in the automation request.

- `journeys` (AutomationStatsJourneys, optional) — Journey counts for the automation
- `email` (AutomationStatsEmail, optional) — Aggregate email engagement statistics

### AutomationStatsJourneys

Journey counts for an automation.

- `running` (integer, optional, default: 0) — Number of journeys currently in progress
- `completed` (integer, optional, default: 0) — Number of completed journeys
- `total` (integer, optional, default: 0) — Total number of journeys

### AutomationStatsEmail

Aggregate email engagement statistics for an automation.

- `recipients` (integer, optional, default: 0) — Total number of email recipients across all emails
- `delivered` (integer, optional, default: 0) — Total number of emails delivered
- `opens` (integer, optional, default: 0) — Total number of email opens
- `unique_opens` (integer, optional, default: 0) — Total number of unique email opens
- `open_rate` (double, optional) — The percentage of emails that have been opened
- `clicks` (integer, optional, default: 0) — Total number of email clicks
- `unique_clicks` (integer, optional, default: 0) — Unique number of email clicks
- `click_rate` (double, optional) — The percentage of emails that have been clicked
- `unsubscribes` (integer, optional, default: 0) — Total number of email unsubscribes
- `spam_reports` (integer, optional, default: 0) — The number of subscribers that reported emails as spam

## Examples

**Request**

```json
{}
```

**Response**

```json
{
  "data": [
    {
      "id": "aut_a3f1c2d4-e5b6-7890-abcd-ef1234567890",
      "status": "running",
      "name": "Welcome Email Series",
      "trigger_events": [
        "api"
      ],
      "description": "Sends 2 days after signing up"
    }
  ],
  "limit": 10,
  "page": 1,
  "total_results": 1,
  "total_pages": 1
}
```

**SDK Code**

```typescript
import { BeehiivClient } from "beehiiv";

const client = new BeehiivClient({ token: "YOUR_TOKEN" });
await client.automations.list("pub_00000000-0000-0000-0000-000000000000");

```

```python
import requests

url = "https://api.beehiiv.com/v2/publications/pub_00000000-0000-0000-0000-000000000000/automations"

payload = {}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.get(url, json=payload, headers=headers)

print(response.json())
```

```go
package main

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

func main() {

	url := "https://api.beehiiv.com/v2/publications/pub_00000000-0000-0000-0000-000000000000/automations"

	payload := strings.NewReader("{}")

	req, _ := http.NewRequest("GET", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.beehiiv.com/v2/publications/pub_00000000-0000-0000-0000-000000000000/automations")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.beehiiv.com/v2/publications/pub_00000000-0000-0000-0000-000000000000/automations")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.beehiiv.com/v2/publications/pub_00000000-0000-0000-0000-000000000000/automations', [
  'body' => '{}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.beehiiv.com/v2/publications/pub_00000000-0000-0000-0000-000000000000/automations");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.beehiiv.com/v2/publications/pub_00000000-0000-0000-0000-000000000000/automations")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```