Skip to main content

Set domain email forwarding

Set the forwarding email address for an existing domain. All emails sent to mailboxes under the domain will be automatically forwarded to the selected address. You can set it only after the domain is ready to use, meaning that get domain endpoint returns is_ready as true.

Request

Endpoint

PATCH https://api.woodpecker.co/rest/v2/domains/{domain_name}/set_email_forwarding

Headers

x-api-key: {YOUR_API_KEY}
Content-Type: application/json

For details on how to authenticate your requests, please see the authentication guide.

Parameters

ParameterRequiredTypeDescription
domain_nameYesstringDomain name

Body

{
"email_forward_address": "forward@piedpiper.com"
}

Body schema

FieldTypeRequiredDescription
email_forward_addressstringYesForwarding email address. Use an empty string to remove the existing forwarding address. A non-empty value must be a valid email address

Request samples

Set email forwarding

curl --request PATCH \
--url "https://api.woodpecker.co/rest/v2/domains/piedpiper.com/set_email_forwarding" \
--header "x-api-key: {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--data '{
"email_forward_address": "forward@piedpiper.com"
}'

Response

Response examples

The email forwarding update has been accepted