## Detach Domain `client.workers.domains.delete(stringdomainId, DomainDeleteParamsparams, RequestOptionsoptions?): DomainDeleteResponse` **delete** `/accounts/{account_id}/workers/domains/{domain_id}` Detaches a domain from a Worker. Both the Worker and all of its previews are no longer routable using this domain. ### Parameters - `domainId: string` ID of the domain. - `params: DomainDeleteParams` - `account_id: string` Identifier. ### Returns - `DomainDeleteResponse` - `errors: Array` - `code: number` - `message: string` - `documentation_url?: string` - `source?: Source` - `pointer?: string` - `messages: Array` - `code: number` - `message: string` - `documentation_url?: string` - `source?: Source` - `pointer?: string` - `success: true` Whether the API call was successful. - `true` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const domain = await client.workers.domains.delete('dbe10b4bc17c295377eabd600e1787fd', { account_id: '023e105f4ecef8ad9ca31a8372d0c353', }); console.log(domain.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 } ```