Update catch-all configuration

Updates a domain's catch-all webhook endpoint or unknown-address mailbox without disabling catch-all.

PATCH
/v1/email/catch-all/config

Updates a domain's catch-all webhook endpoint or unknown-address mailbox without disabling catch-all. The mailbox must be active, in the same organization, and have an email address on the domain. Omitted fields stay unchanged. endpointId: null removes the webhook endpoint, so unknown addresses reach the configured unknown-address mailbox or are dropped without a bounce when none is set. A webhook endpoint takes precedence over the unknown-address setting.

Authorization

apiKey
headerx-api-key<token>

Request Body

application/json
  1. body
domainId*EmailDomainId
Match^dom_[0-9a-hjkmnp-tv-z]{16,24}$
endpointId?||

The catch-all webhook endpoint. Null removes it without disabling catch-all: unknown addresses reach the unknown-recipient mailbox when configured, otherwise they are dropped without a bounce. Omission leaves the endpoint unchanged.

unknownRecipientMailboxId?||

An active mailbox in this organization with an email address on this domain. Receives unknown addresses only when catch-all has no webhook endpoint. Null drops unknown addresses without a bounce; omission leaves the setting unchanged.

Response Body

Success

application/json
  1. response
success*true
Value intrue
Example Request
import { createClient } from "samva";const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });const result = await samva.email.updateCatchAllConfig({  "domainId": "example"});
Example Response
{  "success": true}

Related documentation