Skip to main content
GET
/
automation-rules
List automation rules
curl --request GET \
  --url https://api.fernhq.com/automation-rules \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.fernhq.com/automation-rules"

headers = {"Authorization": "Bearer <token>"}

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

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.fernhq.com/automation-rules', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.fernhq.com/automation-rules",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

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

func main() {

url := "https://api.fernhq.com/automation-rules"

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

req.Header.Add("Authorization", "Bearer <token>")

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

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

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.fernhq.com/automation-rules")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.fernhq.com/automation-rules")

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

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{
  "automationRules": [
    {
      "id": "rule_ghi789",
      "name": "Sweep when over 5000 USDC",
      "customerId": "da1f853f-b083-40f3-b729-30c99826e4ed",
      "transactionTemplate": {
        "source": {
          "sourcePaymentAccountId": "072a8b7b-38c7-429a-a6cf-35dae7f2fb77",
          "sourcePaymentMethod": "ACH",
          "sourceCurrency": {
            "label": "USDC",
            "chain": "ETHEREUM",
            "contractAddress": "0x123456789abcd123456789abcd123456789abcd",
            "currencyDecimals": 18
          }
        },
        "destination": {
          "destinationPaymentAccountId": "072a8b7b-38c7-429a-a6cf-35dae7f2fb77",
          "destinationPaymentMethod": "ETHEREUM",
          "destinationCurrency": {
            "label": "USDC",
            "chain": "ETHEREUM",
            "contractAddress": "0x123456789abcd123456789abcd123456789abcd",
            "currencyDecimals": 18
          }
        },
        "amount": {
          "value": "<string>"
        },
        "developerFee": {
          "developerFeeAmount": "5.45"
        }
      },
      "trigger": {
        "cronSchedule": "* * * * *",
        "thresholdAmount": "5000"
      },
      "createdAt": "2025-09-12T12:00:00Z"
    }
  ]
}

Authorizations

Authorization
string
header
required

To authenticate server-side requests

Query Parameters

customerId
string<uuid>

ID of the customer whose automation rules to list

sourcePaymentAccountId
string

Filter by source payment account ID

Response

200 - application/json

Response schema for listing automation rules

Response schema for listing automation rules

automationRules
Automation Rule Schema · object[]

Retrieved automation rules