Rules

Create a rule

POST/v1/rules

The rule's addresses are added to the watched addresses when needed (counted in the plan limit). Rules are created active.

Authentication
API key (Authorization: Bearer)
Required scope
write
  • Safe to retry with the Idempotency-Key header: see Idempotency.

Headers#

  • Idempotency-Keystring

    Makes the POST safe to retry for 24 hours.

    1 to 255 characters

Request body#

  • namestringrequired
    1 to 120 characters
  • kindstringrequired
    • large_transfer: a transfer at or above threshold.
    • new_counterparty: an outflow to an address never seen before.
    • burst: at least count outflows within window_minutes.
    Values large_transfer new_counterparty burst
  • chain_idintegerrequired
  • addressesarray of stringrequired
    1 to 20 items
  • assetstring

    native, any (threshold in raw units) or a token contract address known to Aicscan.

    Default "native"
  • thresholdstring

    large_transfer: decimal amount in token units, e.g. 50000 or 0.5.

  • directionstring
    Values outgoing incoming both
    Default "both"
  • countinteger

    burst only.

    2 to 1000
  • window_minutesinteger

    burst only.

    1 to 1440
  • severitystringrequired
    Values critical warning info
  • channel_idsarray of string · uuidrequired
    at least 1 items
  • immediate_alertbooleannullable

    true requires a plan with immediate alerts (403 plan_feature_unavailable).

Responses#

201Created.

Response headers

  • Locationstring
  • Idempotent-Replayedstring

    true when the response is a replay of a previous request with the same Idempotency-Key.

    Values true
Object fields
  • idstring · uuid
  • namestring
  • kindstring

    Rules created through the API are large_transfer, new_counterparty or burst; the other kinds are created from the dashboard and are returned read-only.

    Values large_transfer new_counterparty burst admin_change contract_upgrade low_balance balance_drop
  • chain_idsarray of integer
  • paramsobject

    Normalised rule parameters (amounts in raw units).

  • severitystring
    Values critical warning info
  • statestring
    Values active paused
  • immediate_alertbooleannullable

    Alert before confirmations. null = default by severity (yes for critical).

  • channel_idsarray of string · uuid
  • pending_changeobjectnullable

    Deferred pause or deletion of a critical rule, effective at effective_at.

    Object fields
    • idstring · uuid
    • actionstring
      Values pause delete
    • requested_atstring · date-time
    • effective_atstring · date-time
  • created_atstring · date-time
4xx · 5xxError.

Standard error format: see Errors.