## Delete a sending subdomain `client.EmailSending.Subdomains.Delete(ctx, subdomainID, body) (*SubdomainDeleteResponse, error)` **delete** `/zones/{zone_id}/email/sending/subdomains/{subdomain_id}` Disables sending on a subdomain and removes its DNS records. If routing is still active on the subdomain, only sending is disabled. ### Parameters - `subdomainID string` Sending subdomain identifier. - `body SubdomainDeleteParams` - `ZoneID param.Field[string]` Identifier. ### Returns - `type SubdomainDeleteResponse struct{…}` - `Errors []SubdomainDeleteResponseError` - `Code int64` - `Message string` - `DocumentationURL string` - `Source SubdomainDeleteResponseErrorsSource` - `Pointer string` - `Messages []SubdomainDeleteResponseMessage` - `Code int64` - `Message string` - `DocumentationURL string` - `Source SubdomainDeleteResponseMessagesSource` - `Pointer string` - `Success SubdomainDeleteResponseSuccess` Whether the API call was successful. - `const SubdomainDeleteResponseSuccessTrue SubdomainDeleteResponseSuccess = true` ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/email_sending" "github.com/cloudflare/cloudflare-go/option" ) func main() { client := cloudflare.NewClient( option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), option.WithAPIEmail("user@example.com"), ) subdomain, err := client.EmailSending.Subdomains.Delete( context.TODO(), "aabbccdd11223344aabbccdd11223344", email_sending.SubdomainDeleteParams{ ZoneID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", subdomain.Errors) } ``` #### 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 } ```