remove_custom_domain
Remove a custom domain from a website by providing the website ID.
Instructions
Remove a custom domain from a website.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| website_id | Yes | The website ID |
Implementation Reference
- server/index.js:413-424 (registration)Tool registration for 'remove_custom_domain' using server.tool() with name, description, schema, options, and handler.
server.tool( "remove_custom_domain", "Remove a custom domain from a website.", { website_id: z.string().describe("The website ID"), }, { title: "Remove Custom Domain", readOnlyHint: false, destructiveHint: true, openWorldHint: false }, async ({ website_id }) => { const data = await apiCall(`/v1/workspace/website/${website_id}/domain`, "DELETE"); return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] }; } ); - server/index.js:416-418 (schema)Input schema for remove_custom_domain: requires website_id (string).
{ website_id: z.string().describe("The website ID"), }, - server/index.js:419-423 (handler)Handler function: makes DELETE API call to /v1/workspace/website/{website_id}/domain and returns the JSON result.
{ title: "Remove Custom Domain", readOnlyHint: false, destructiveHint: true, openWorldHint: false }, async ({ website_id }) => { const data = await apiCall(`/v1/workspace/website/${website_id}/domain`, "DELETE"); return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] }; } - server/index.js:112-123 (helper)Helper apiCall function that performs authenticated HTTP requests using the API key.
async function apiCall(path, method, body) { const url = `${BASE_URL}${path}`; const res = await fetch(url, { method, headers: { Authorization: `Bearer ${API_KEY}`, "Content-Type": "application/json", }, ...(body ? { body: JSON.stringify(body) } : {}), }); return res.json(); }