List forwarding rules

List forwarding rules. View request and response details for this Samva email API endpoint.

GET
/v1/email/forwarding

Returns every inbound email forwarding rule in the order inbound mail is matched against them: highest priority first, then an exact address before a wildcard pattern at equal priority, then oldest first. The first rule that matches is the one that forwards. Filtering by domain returns that domain's rules and the rules that apply to every domain (domainId null). An organization holds at most 100, so the list is never paged.

Authorization

apiKey
headerx-api-key<token>

Query Parameters

domainId?string
Match^dom_[0-9a-hjkmnp-tv-z]{16,24}$
isActive?boolean|null

Response Body

ForwardingRuleList

application/json
  1. response
items*array<>
Itemsitems <= 100
Example Request
import { createClient } from "samva";const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });const result = await samva.email.listForwardingRules({});
Example Response
{  "items": [    {      "id": "string",      "name": "string",      "description": "string",      "domainId": "string",      "sourcePattern": "string",      "forwardTo": [        "string"      ],      "preserveHeaders": true,      "priority": 0,      "isActive": true,      "forwardCount": 0,      "failureCount": 0,      "lastForwardedAt": "string",      "createdAt": "string"    }  ]}

Related documentation