Update a forwarding rule

Updates an inbound email forwarding rule and returns its current summary. Use this endpoint to update a forwarding rule through the Samva email API.

PATCH
/v1/email/forwarding/{id}

Updates an inbound email forwarding rule and returns its current summary.

Authorization

apiKey
headerx-api-key<token>

Path Parameters

id*string
Match^fwd_[0-9a-hjkmnp-tv-z]{16,24}$

Request Body

application/json
  1. body
name?string|null
description?string|null
domainId?|null
sourcePattern?string|null
forwardTo?array<string>|null
preserveHeaders?boolean|null
appendNote?string|null
conditions?|null|null
priority?|null
isActive?boolean|null
metadata?|null|null

Response Body

Success

application/json
  1. response
id*EmailForwardingRuleId
Match^fwd_[0-9a-hjkmnp-tv-z]{16,24}$
name*string
forwardTo*array<string>
priority*integer
Range0 <= value <= 2147483647
isActive*boolean
updatedAt*string
Example Request
import { createClient } from "samva";const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });const result = await samva.email.updateForwardingRule({  "id": "example"});
Example Response
{  "id": "string",  "name": "string",  "forwardTo": [    "string"  ],  "priority": 0,  "isActive": true,  "updatedAt": "string"}

Related documentation