---
title: "Removes the domain of a lambda"
method: DELETE
path: "/lambdas/{privateKey}/domain"
tags: ["Domain"]
---

# Removes the domain of a lambda

`DELETE /lambdas/{privateKey}/domain`

## Request

- Base URL: `https://genhttp.dev/api/v1`
- URL: `https://genhttp.dev/api/v1/lambdas/{privateKey}/domain`
- Auth: none declared

From the next request on it no longer answers at the domain, and its subdomain of the hosting domain answers again instead of sending visitors there. Any tier may remove a domain.

## Path parameters

- `privateKey` string, required

## Response `200`

The lambda, without a domain

- DomainResponse: The domain of a lambda, and whether it answers at it.
  - `Domain` string, nullable: The domain it is configured to answer at; absent without one
  - `Tier` string: The tier of the lambda, which decides whether it may have one
  - `Allowed` boolean: Whether the tier includes a domain of its own: only the premium tier does
  - `Served` boolean: Whether requests to the domain reach the lambda right now - it has one, and its tier includes it. A domain kept from a premium tier is not served.
  - `Dns` DnsResponse: What a domain resolves to, looked up by the server as the request was answered. Only the addresses - not whether they are this installation's, which is for whoever knows where it runs to compare.
    - `Addresses` string[]: Every address the domain resolved to, IPv4 and IPv6 alike
    - `Problem` string, nullable: Why nothing could be resolved, where nothing could: it does not resolve yet, or the name servers could not be asked

## Other responses

- `204`: A response containing no body
- `403`: The lambda is a demo, which anybody may read and nobody may change. Create a lambda of your own from it instead: `POST /lambdas` with the demo's id as `template`.
- `404`: No lambda has this editor key. A key that never existed and the key of a deleted lambda are answered alike.

---

[API](https://skmtc.dev/genhttp/apis/genhttp-lambda-api.md) · [All operations](https://skmtc.dev/genhttp/apis/genhttp-lambda-api/llms.txt) · [OpenAPI document](https://skmtc.dev/genhttp/apis/genhttp-lambda-api/revisions/8b36699e03df?raw)
