Skip to main content
GET
/
automation-rules
/
{ruleId}
Get automation rule by ID
curl --request GET \
  --url https://api.fernhq.com/automation-rules/{ruleId} \
  --header 'Authorization: Bearer <token>'
{
  "id": "rule_ghi789",
  "name": "Sweep when over 5000 USDC",
  "customerId": "da1f853f-b083-40f3-b729-30c99826e4ed",
  "transactionTemplate": {
    "source": {
      "sourcePaymentAccountId": "072a8b7b-38c7-429a-a6cf-35dae7f2fb77",
      "sourcePaymentMethod": "<any>",
      "sourceCurrency": {
        "label": "USDC",
        "chain": "ETHEREUM",
        "contractAddress": "0x123456789abcd123456789abcd123456789abcd",
        "currencyDecimals": 18
      }
    },
    "destination": {
      "destinationPaymentAccountId": "072a8b7b-38c7-429a-a6cf-35dae7f2fb77",
      "destinationPaymentMethod": "<any>",
      "destinationCurrency": {
        "label": "USDC",
        "chain": "ETHEREUM",
        "contractAddress": "0x123456789abcd123456789abcd123456789abcd",
        "currencyDecimals": 18
      }
    },
    "amount": {
      "type": "FLAT",
      "value": "<string>"
    },
    "developerFee": {
      "developerFeeType": "USD",
      "developerFeeAmount": "5.45"
    }
  },
  "trigger": {
    "type": "THRESHOLD_BASED",
    "cronSchedule": "* * * * *",
    "thresholdAmount": "5000"
  },
  "createdAt": "2025-09-12T12:00:00Z"
}

Authorizations

Authorization
string
header
required

To authenticate server-side requests

Path Parameters

ruleId
string
required

Response

200 - application/json

Configuration for automated transaction execution

id
string
required

Unique identifier for the automation rule

Example:

"rule_ghi789"

name
string
required

Human-readable name for the automation rule

Example:

"Sweep when over 5000 USDC"

customerId
string<uuid>
required

ID of the customer who owns this automation rule

Example:

"da1f853f-b083-40f3-b729-30c99826e4ed"

transactionTemplate
object
required

Template configuration for transactions created by automation rule

trigger
object
required
createdAt
string

ISO timestamp when this automation rule was created

Example:

"2025-09-12T12:00:00Z"