HomeDocsSupport
OverviewWhat is AliasFleet?Creating an AliasEmails Not ArrivingContact Support

Getting Started

Getting Started
  • What is AliasFleet?
  • Your First Alias
  • Understanding Forwarding
  • Your Dashboard at a Glance

Account & Billing

Account & Billing
  • Your Plan and Usage Limits
  • Upgrading to Pro
  • Managing Your Subscription
  • Downloading Invoices
  • Support Ticket Limits
  • Membership Tier
  • Billing Cycle and Renewal
  • API Rate Limits by Plan

Billing Support

Account & Billing
  • Cancelling Your Subscription
  • Downgrading Your AliasFleet Plan
  • Understanding Proration and Plan Changes
  • Updating Your Payment Method
  • Handling Failed Payments and Account Suspension
  • AliasFleet Refund Policy

Email Aliases

Email Aliases
  • Creating and Managing Aliases
  • Activating and Deactivating an Alias
  • Deleting an Alias
  • Sorting, Filtering and Searching Aliases
  • Grid View vs List View
  • Grouping Aliases
  • Alias Categories
  • Copying an Alias Address
  • Per-Alias Email Banner Settings
  • Alias Permission Mode
  • Sending Outbound Emails (Quick Send)

Custom Domains

Custom Domains
  • Adding a Custom Domain
  • DNS Verification
  • Domain Status and Health Indicators
  • Subdomains
  • Removing a Domain
  • Using Your Domain on Aliases

Destinations

Destinations
  • What Is a Destination?
  • Adding a Destination
  • Verifying a Destination
  • Setting a Default Destination
  • Reply from Aliases
  • Send New Emails from Aliases
  • Understanding Email Threading & Replies
  • One-Click Enable from Bounce Email
  • Removing a Destination
  • PGP Encryption for Destinations
  • WKD Auto-Encryption for Replies & Sends

Security & Privacy

Security & Privacy
  • Security Best Practices
  • Two-Factor Authentication (2FA)
  • Active Sessions
  • Changing Your Password
  • What Data AliasFleet Stores
  • Reporting a Security Issue
  • Browser Extension Sessions
  • How to Use Vault Lock in the Extension

Rate Limiting

Security & Privacy
  • Rate Limiting & Account Protection

Settings

Settings
  • General Settings
  • Profile Settings
  • Alias Settings
  • Destinations in Settings
  • Notification Settings
  • Security Settings
  • Deleting Your Account

Analytics

Analytics
  • Analytics Overview
  • Alias Performance
  • Top Senders
  • Trends
  • Bounces
  • Bandwidth Usage
  • Category Breakdown
  • Exporting Analytics Data
  • Understanding Your Alias Statistics
  • How Monthly Trends Work

Sender Rules

Sender Rules
  • Using Sender Rules
  • Blacklist vs Deactivating an Alias
  • Using Sender Rules to Allow Senders (Whitelist)
  • Blocked Emails Explained

Troubleshooting

Troubleshooting
  • Emails Not Arriving
  • Can't Verify a Destination
  • DNS Not Verifying
  • Can't Log In
  • Replies Not Going Through Alias
  • Alias Not Forwarding
  • Payment Failed
  • Browser Extension Issues
  • Too Many Requests Error
  • Page Not Loading or Showing an Error

Developers

Developer API
  • Identity & Token Introspection API
  • Aliases API
  • Alias Destinations & Batch Operations API
  • Domains API
  • Destinations API
  • Quick-Send API
  • Sender Rules API
  • Activity & Audit Logs API
  • Fleet Analytics API
  • Rules Engine API
  • Security & Threat Intelligence API
  • Webhooks API
PrivacyTermsCookies
Article Navigation
OverviewWhat is AliasFleet?Creating an AliasEmails Not ArrivingContact Support

Getting Started

Getting Started
  • What is AliasFleet?
  • Your First Alias
  • Understanding Forwarding
  • Your Dashboard at a Glance

Account & Billing

Account & Billing
  • Your Plan and Usage Limits
  • Upgrading to Pro
  • Managing Your Subscription
  • Downloading Invoices
  • Support Ticket Limits
  • Membership Tier
  • Billing Cycle and Renewal
  • API Rate Limits by Plan

Billing Support

Account & Billing
  • Cancelling Your Subscription
  • Downgrading Your AliasFleet Plan
  • Understanding Proration and Plan Changes
  • Updating Your Payment Method
  • Handling Failed Payments and Account Suspension
  • AliasFleet Refund Policy

Email Aliases

Email Aliases
  • Creating and Managing Aliases
  • Activating and Deactivating an Alias
  • Deleting an Alias
  • Sorting, Filtering and Searching Aliases
  • Grid View vs List View
  • Grouping Aliases
  • Alias Categories
  • Copying an Alias Address
  • Per-Alias Email Banner Settings
  • Alias Permission Mode
  • Sending Outbound Emails (Quick Send)

Custom Domains

Custom Domains
  • Adding a Custom Domain
  • DNS Verification
  • Domain Status and Health Indicators
  • Subdomains
  • Removing a Domain
  • Using Your Domain on Aliases

Destinations

Destinations
  • What Is a Destination?
  • Adding a Destination
  • Verifying a Destination
  • Setting a Default Destination
  • Reply from Aliases
  • Send New Emails from Aliases
  • Understanding Email Threading & Replies
  • One-Click Enable from Bounce Email
  • Removing a Destination
  • PGP Encryption for Destinations
  • WKD Auto-Encryption for Replies & Sends

Security & Privacy

Security & Privacy
  • Security Best Practices
  • Two-Factor Authentication (2FA)
  • Active Sessions
  • Changing Your Password
  • What Data AliasFleet Stores
  • Reporting a Security Issue
  • Browser Extension Sessions
  • How to Use Vault Lock in the Extension

Rate Limiting

Security & Privacy
  • Rate Limiting & Account Protection

Settings

Settings
  • General Settings
  • Profile Settings
  • Alias Settings
  • Destinations in Settings
  • Notification Settings
  • Security Settings
  • Deleting Your Account

Analytics

Analytics
  • Analytics Overview
  • Alias Performance
  • Top Senders
  • Trends
  • Bounces
  • Bandwidth Usage
  • Category Breakdown
  • Exporting Analytics Data
  • Understanding Your Alias Statistics
  • How Monthly Trends Work

Sender Rules

Sender Rules
  • Using Sender Rules
  • Blacklist vs Deactivating an Alias
  • Using Sender Rules to Allow Senders (Whitelist)
  • Blocked Emails Explained

Troubleshooting

Troubleshooting
  • Emails Not Arriving
  • Can't Verify a Destination
  • DNS Not Verifying
  • Can't Log In
  • Replies Not Going Through Alias
  • Alias Not Forwarding
  • Payment Failed
  • Browser Extension Issues
  • Too Many Requests Error
  • Page Not Loading or Showing an Error

Developers

Developer API
  • Identity & Token Introspection API
  • Aliases API
  • Alias Destinations & Batch Operations API
  • Domains API
  • Destinations API
  • Quick-Send API
  • Sender Rules API
  • Activity & Audit Logs API
  • Fleet Analytics API
  • Rules Engine API
  • Security & Threat Intelligence API
  • Webhooks API
PrivacyTermsCookies
Developer API
Docs
Developer API
Rules Engine API

Rules Engine API

Build priority-ordered conditional routing rules, evaluate message headers and spam metrics, and trigger automated forwarding, dropping, or webhook dispatching.

9 min read
Updated September 4, 2026

Build priority-ordered conditional routing rules, evaluate message metadata and spam metrics, and trigger automated forwarding, dropping, or webhook dispatching.


Quick Reference

EndpointMethodScopePurpose
/v1/rulesGETrules:readList all configured routing rules ordered by priority
/v1/rulesPOSTrules:writeCreate a new conditional routing rule
/v1/rules/:idGETrules:readRetrieve configuration and conditions for a specific rule
/v1/rules/:idPATCHrules:writeUpdate rule criteria, priority, active state, or actions
/v1/rules/:idDELETErules:writePermanently delete a routing rule
/v1/rules/reorderPOSTrules:writeAtomically reorder rule evaluation priority sequence

Rule Evaluation Model

The Rules Engine intercepts inbound transactions immediately after address resolution and evaluates messages against your workspace's rule chain:

  1. Priority Pipeline: Rules run in sequence starting from priority: 1.
  2. Compound Logic: Each rule specifies match_type: "ALL" (logical AND) or match_type: "ANY" (logical OR) across up to 20 conditions.
  3. Execution Halting (stop_processing): When set to true, a matched rule terminates the pipeline immediately. Lower-priority rules will not run for that message.
  4. Action Composition: A single rule can execute up to 10 combined actions simultaneously (e.g. inject custom headers, strip tracking beacons, and dispatch a webhook).

Supported Condition Fields & Operators

Evaluated Fields

FieldDescriptionExample Target
from_addressFull envelope sender emailbilling@vendor.com
from_domainSender domain partvendor.com
from_nameFriendly display nameAcme Billing Team
reply_toReply-To header addresssupport@reply.vendor.com
alias_addressReceiving alias addressorders@acme-corp.com
alias_domainReceiving alias domainacme-corp.com
subjectMessage subject lineInvoice #1042
headerArbitrary email header (requires header_name)X-Custom-Campaign
email_size_kbMessage payload size in kilobytes1024
has_attachmentsPresence of file attachmentstrue or false
attachment_nameFilename of an attached documentreport.xlsx
attachment_mimeMIME type of an attachmentapplication/pdf
spf_statusSPF verification verdictpass, fail, softfail
dkim_statusDKIM cryptographic verdictpass, fail, none
dmarc_statusDMARC policy verdictpass, fail
spam_scoreHeuristic spam rating5.0

Comparison Operators

is · is_not · contains · does_not_contain · starts_with · ends_with · matches_regex · exists · not_exists · greater_than · less_than


Supported Action Types

Action TypeParametersBehavior
drop_silently—Discards message silently without forwarding or bouncing.
quarantine—Isolates message for administrative review.
reroute_todestination_idOverrides default alias routing and forwards to specified destination.
add_subject_prefixprefixPrepends string to email subject (e.g. [INTERNAL]).
add_subject_suffixsuffixAppends string to email subject (e.g. (Reviewed)).
strip_tracking_pixels—Neutralizes spy beacons and tracking pixels from HTML bodies.
strip_attachmentsextensions (optional)Strips all or specific file attachments from forwarded message.
add_custom_headerheader_name, header_valueInjects an RFC header into the forwarded message.
deactivate_alias—Automatically pauses the receiving alias upon match.
send_to_webhookwebhook_endpoint_idDispatches real-time JSON payload to registered webhook URL.

GET /v1/rules — List Routing Rules

Scope: rules:read · Rate Limit: 60/min · Idempotent: Yes

Returns all routing rules configured for your workspace ordered by evaluation priority.

Example Request

curl -X GET "https://api.aliasfleet.com/v1/rules" \
  -H "Authorization: Bearer afp_4a8f9c1b2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e" \
  -H "Accept: application/json"

Response (200 OK)

{
  "rules": [
    {
      "id": "7b8c9d0e-1f2a-3b4c-5d6e-7f8a9b0c1d2e",
      "name": "Quarantine High Spam Inbound",
      "description": "Quarantine messages failing SPF or carrying high spam scores",
      "is_active": true,
      "priority": 1,
      "match_type": "ANY",
      "stop_processing": true,
      "conditions": [
        {
          "field": "spf_status",
          "operator": "is",
          "value": "fail"
        },
        {
          "field": "spam_score",
          "operator": "greater_than",
          "value": "6.5"
        }
      ],
      "actions": [
        {
          "action_type": "quarantine"
        }
      ],
      "created_at": "2026-08-28T14:00:00.000Z",
      "updated_at": "2026-08-28T14:00:00.000Z"
    }
  ]
}

POST /v1/rules — Create Routing Rule

Scope: rules:write · Rate Limit: 30/min · Idempotent: No

Creates a new conditional routing rule and positions it within the evaluation pipeline.

Request Body Parameters

ParameterTypeRequiredConstraintsDescription
namestringYes1–120 charsHuman-readable rule title.
descriptionstringOptionalMax 500 charsOperational notes or rationale.
is_activebooleanOptionalBooleanRule active state. Defaults to true.
priorityintegerOptionalMin 1Evaluation position. Defaults to next available priority.
match_typestringOptionalALL or ANYCondition logic: ALL (AND) or ANY (OR). Defaults to ALL.
stop_processingbooleanOptionalBooleanHalt rule chain evaluation if matched. Defaults to false.
conditionsarrayYes1–20 conditionsArray of condition descriptor objects.
actionsarrayYes1–10 actionsArray of action descriptor objects.

Example Request

curl -X POST "https://api.aliasfleet.com/v1/rules" \
  -H "Authorization: Bearer afp_4a8f9c1b2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "VIP Billing Forwarder",
    "description": "Reroute financial correspondence to finance inbox with subject tag",
    "priority": 2,
    "match_type": "ALL",
    "stop_processing": false,
    "conditions": [
      {
        "field": "subject",
        "operator": "contains",
        "value": "Invoice"
      },
      {
        "field": "from_domain",
        "operator": "is",
        "value": "accounting-partner.com"
      }
    ],
    "actions": [
      {
        "action_type": "reroute_to",
        "destination_id": "dest_adn6UTmkzn6OWpGq"
      },
      {
        "action_type": "add_subject_prefix",
        "prefix": "[FINANCE]"
      }
    ]
  }'

Response (201 Created)

{
  "message": "Rule created successfully",
  "rule": {
    "id": "3e4f5a6b-7c8d-9e0f-1a2b-3c4d5e6f7a8b",
    "name": "VIP Billing Forwarder",
    "description": "Reroute financial correspondence to finance inbox with subject tag",
    "is_active": true,
    "priority": 2,
    "match_type": "ALL",
    "stop_processing": false,
    "conditions": [
      {
        "field": "subject",
        "operator": "contains",
        "value": "Invoice"
      },
      {
        "field": "from_domain",
        "operator": "is",
        "value": "accounting-partner.com"
      }
    ],
    "actions": [
      {
        "action_type": "reroute_to",
        "destination_id": "dest_adn6UTmkzn6OWpGq"
      },
      {
        "action_type": "add_subject_prefix",
        "prefix": "[FINANCE]"
      }
    ],
    "created_at": "2026-09-04T12:00:00.000Z",
    "updated_at": "2026-09-04T12:00:00.000Z"
  }
}

Errors

StatusCodeCause & Resolution
400 Bad RequestDESTINATION_NOT_FOUNDdestination_id specified in reroute_to does not exist on your account.
400 Bad RequestDESTINATION_NOT_VERIFIEDTarget destination has not passed 6-digit OTP verification. Verify it first under /v1/destinations.
400 Bad RequestWEBHOOK_ENDPOINT_NOT_FOUNDwebhook_endpoint_id specified in send_to_webhook does not exist on your account.
403 ForbiddenLIMIT_REACHEDMaximum rule count reached for your subscription tier. Upgrade plan to expand limit.

GET /v1/rules/:id — Inspect Routing Rule

Scope: rules:read · Rate Limit: 60/min · Idempotent: Yes

Retrieves the complete configuration, conditions, and actions for a single routing rule.

Path Parameters

ParameterTypeRequiredDescription
idstringYesRule UUID identifier.

Example Request

curl -X GET "https://api.aliasfleet.com/v1/rules/3e4f5a6b-7c8d-9e0f-1a2b-3c4d5e6f7a8b" \
  -H "Authorization: Bearer afp_4a8f9c1b2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e" \
  -H "Accept: application/json"

Response (200 OK)

{
  "rule": {
    "id": "3e4f5a6b-7c8d-9e0f-1a2b-3c4d5e6f7a8b",
    "name": "VIP Billing Forwarder",
    "is_active": true,
    "priority": 2,
    "match_type": "ALL",
    "stop_processing": false,
    "conditions": [
      {
        "field": "subject",
        "operator": "contains",
        "value": "Invoice"
      }
    ],
    "actions": [
      {
        "action_type": "reroute_to",
        "destination_id": "dest_adn6UTmkzn6OWpGq"
      }
    ]
  }
}

Errors

StatusCodeCause & Resolution
404 Not FoundNOT_FOUNDRule ID does not exist or access denied.

PATCH /v1/rules/:id — Update Routing Rule

Scope: rules:write · Rate Limit: 60/min · Idempotent: Yes

Modifies an existing routing rule. Unspecified fields remain unchanged.

Request Body Parameters

ParameterTypeRequiredDescription
namestringOptionalUpdated rule title (1–120 chars).
descriptionstringOptionalUpdated description notes.
is_activebooleanOptionalToggle rule enforcement without deletion.
priorityintegerOptionalUpdate rule pipeline position.
match_typestringOptionalALL or ANY.
stop_processingbooleanOptionalUpdate execution halting behavior.
conditionsarrayOptionalReplacement conditions array.
actionsarrayOptionalReplacement actions array.

Example Request

curl -X PATCH "https://api.aliasfleet.com/v1/rules/3e4f5a6b-7c8d-9e0f-1a2b-3c4d5e6f7a8b" \
  -H "Authorization: Bearer afp_4a8f9c1b2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e" \
  -H "Content-Type: application/json" \
  -d '{
    "is_active": false
  }'

Response (200 OK)

{
  "message": "Rule updated successfully",
  "rule": {
    "id": "3e4f5a6b-7c8d-9e0f-1a2b-3c4d5e6f7a8b",
    "name": "VIP Billing Forwarder",
    "is_active": false,
    "priority": 2
  }
}

DELETE /v1/rules/:id — Delete Routing Rule

Scope: rules:write · Rate Limit: 60/min · Idempotent: Yes

Permanently deletes a routing rule and releases its quota allocation.

Path Parameters

ParameterTypeRequiredDescription
idstringYesRule UUID identifier.

Example Request

curl -X DELETE "https://api.aliasfleet.com/v1/rules/3e4f5a6b-7c8d-9e0f-1a2b-3c4d5e6f7a8b" \
  -H "Authorization: Bearer afp_4a8f9c1b2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e"

Response (200 OK)

{
  "message": "Rule deleted successfully"
}

POST /v1/rules/reorder — Reorder Rule Priority Chain

Scope: rules:write · Rate Limit: 30/min · Idempotent: Yes

Atomically reorganizes the priority sequence of all routing rules in your workspace. The index of each ID in the provided array defines its new priority value (index 0 becomes priority 1).

Request Body Parameters

ParameterTypeRequiredConstraintsDescription
rule_idsstring[]YesValid rule UUIDsOrdered array of rule IDs reflecting the desired evaluation hierarchy.

Example Request

curl -X POST "https://api.aliasfleet.com/v1/rules/reorder" \
  -H "Authorization: Bearer afp_4a8f9c1b2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e" \
  -H "Content-Type: application/json" \
  -d '{
    "rule_ids": [
      "7b8c9d0e-1f2a-3b4c-5d6e-7f8a9b0c1d2e",
      "3e4f5a6b-7c8d-9e0f-1a2b-3c4d5e6f7a8b"
    ]
  }'

Response (200 OK)

{
  "message": "Rules reordered successfully",
  "count": 2
}

Errors

StatusCodeCause & Resolution
400 Bad RequestVALIDATION_ERRORrule_ids array contains invalid IDs or does not match workspace rules.

Frequently Asked Questions

How does rule priority evaluation work?

Rules are evaluated in ascending priority order (1, 2, 3...). The first rule matching the incoming message runs its actions. If stop_processing is true, no subsequent rules are evaluated.

Can a rule reroute emails to unverified destinations?

No. When configuring the reroute_to action, the destination_id must correspond to a verified destination under your account. Unverified targets are rejected with HTTP 400 DESTINATION_NOT_VERIFIED.

Can I trigger webhook notifications directly from a rule?

Yes. The send_to_webhook action streams matched message metadata directly to a registered webhook endpoint in real time.

What is the difference between match_type ALL and ANY?

ALL requires every condition in the rule to be true (logical AND). ANY executes the actions if at least one condition matches (logical OR).

Was this article helpful?

Related articles

Identity & Token Introspection API

Verify token validity, inspect active permission scopes, and retrieve account metadata using the Identity API.

Aliases API

Create, list, inspect, update, and soft-delete email aliases programmatically using the AliasFleet REST API.

Alias Destinations & Batch Operations API

Configure multi-destination forwarding fanout, execute atomic batch updates across up to 100 aliases, and fine-tune per-alias privacy settings.

Domains API

Query shared platform domains, register custom brand domains, verify DNS records, and inspect catch-all forwarding rules.

Destinations API

Register destination inboxes, execute 6-digit OTP verification challenges, configure per-channel sender identities, and manage routing fallbacks.

Content

Quick ReferenceRule Evaluation ModelSupported Condition Fields & OperatorsEvaluated FieldsComparison OperatorsSupported Action TypesGET /v1/rules — List Routing RulesExample RequestResponse (`200 OK`)POST /v1/rules — Create Routing RuleRequest Body ParametersExample RequestResponse (`201 Created`)ErrorsGET /v1/rules/:id — Inspect Routing RulePath ParametersExample RequestResponse (`200 OK`)ErrorsPATCH /v1/rules/:id — Update Routing RuleRequest Body ParametersExample RequestResponse (`200 OK`)DELETE /v1/rules/:id — Delete Routing RulePath ParametersExample RequestResponse (`200 OK`)POST /v1/rules/reorder — Reorder Rule Priority ChainRequest Body ParametersExample RequestResponse (`200 OK`)Errors

Still need help?

Can't find the answer you're looking for? Our support team is here to help.

Create Support Ticket