## Enable Email Routing `client.EmailRouting.Enable(ctx, params) (*Settings, error)` **post** `/zones/{zone_id}/email/routing/enable` Enable you Email Routing zone. Add and lock the necessary MX and SPF records. ### Parameters - `params EmailRoutingEnableParams` - `ZoneID param.Field[string]` Path param: Identifier. - `Body param.Field[unknown]` Body param ### Returns - `type Settings struct{…}` - `ID string` Email Routing settings identifier. - `Enabled SettingsEnabled` State of the zone settings for Email Routing. - `const SettingsEnabledTrue SettingsEnabled = true` - `const SettingsEnabledFalse SettingsEnabled = false` - `Name string` Domain of your zone. - `Created Time` The date and time the settings have been created. - `Modified Time` The date and time the settings have been modified. - `SkipWizard SettingsSkipWizard` Flag to check if the user skipped the configuration wizard. - `const SettingsSkipWizardTrue SettingsSkipWizard = true` - `const SettingsSkipWizardFalse SettingsSkipWizard = false` - `Status SettingsStatus` Show the state of your account, and the type or configuration error. - `const SettingsStatusReady SettingsStatus = "ready"` - `const SettingsStatusUnconfigured SettingsStatus = "unconfigured"` - `const SettingsStatusMisconfigured SettingsStatus = "misconfigured"` - `const SettingsStatusMisconfiguredLocked SettingsStatus = "misconfigured/locked"` - `const SettingsStatusUnlocked SettingsStatus = "unlocked"` - `Tag string` Email Routing settings tag. (Deprecated, replaced by Email Routing settings identifier) ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/email_routing" "github.com/cloudflare/cloudflare-go/option" ) func main() { client := cloudflare.NewClient( option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), option.WithAPIEmail("user@example.com"), ) settings, err := client.EmailRouting.Enable(context.TODO(), email_routing.EmailRoutingEnableParams{ ZoneID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), Body: map[string]interface{}{ }, }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", settings.ID) } ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": { "id": "75610dab9e69410a82cf7e400a09ecec", "enabled": true, "name": "example.net", "created": "2014-01-02T02:20:00Z", "modified": "2014-01-02T02:20:00Z", "skip_wizard": true, "status": "ready", "tag": "75610dab9e69410a82cf7e400a09ecec" } } ```