{"uid":"cap_zSOlX3xg5BG5ulLkcEKHZ","slug":"site-withzero-ai-attach-custom-domain-to-hosted-site-6b0df014","name":"Attach Custom Domain to Hosted Site","description":"Attach a custom domain (bought via domain-buy) to this slug. Caller must own both. Calls Cloudflare to register the hostname as a Worker Custom Domain on this worker (SSL auto-provisioned).","url":"https://site.withzero.ai/sites/:slug/domains?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","required":["domain"],"properties":{"domain":{"type":"string","pattern":"^[a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?(\\.[a-zA-Z]{2,})+$","maxLength":253,"minLength":3}},"additionalProperties":false},"responseSchema":{"type":"object"},"example":null,"exampleRequest":null,"tags":[],"displayCostAmount":"0","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"proven_free","priceSource":"registry","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"metered","summary":"metered — billed by usage","primary":{"kind":"metered","protocol":"mpp","network":"tempo","amountUsd":null,"per":"call","confidence":"unknown"},"accepted":[{"kind":"metered","protocol":"mpp","network":"tempo","amountUsd":null,"per":"call","confidence":"unknown"}]},"paymentMethods":[{"uid":"pm_BMQgmu8TwYOQMJxViWdZu","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0","costPer":"request","priority":0,"asset":"0x20C000000000000000000000b9537d11c60E8b50","unit":"request","depositMicros":null,"planRef":"make-website-post-sites-slug-domains:1"}],"brandName":"site.withzero.ai","brandSlug":"site-withzero-ai-mpp","brandBaseUrl":"https://site.withzero.ai","brandDocsUrl":null,"whatItDoes":"Attaches a pre-purchased custom domain to a hosted site slug, registering it as a Cloudflare Worker Custom Domain with automatic SSL provisioning.","exampleAgentPrompt":"Attach my custom domain myblog.com to my site slug 'my-portfolio-site' on withzero — I already bought the domain through their domain-buy service.","exampleUseCases":[{"title":"Brand a portfolio with custom domain","prompt":"I set up my portfolio site on withzero with the slug 'john-doe-portfolio' and I bought johndoe.dev through their domain-buy — can you attach johndoe.dev to that slug so visitors go to my own domain?"},{"title":"Launch startup landing page on owned domain","prompt":"I want to point my domain startuplaunch.io to my withzero site slug 'launch-page-v2' that I created earlier — please attach that custom domain so the site is live on my brand URL."},{"title":"Connect client site to purchased domain","prompt":"My client's site is hosted at slug 'acme-corp-landing' on withzero and I purchased acmecorp.com through their domain-buy — attach acmecorp.com to that slug now so it resolves with HTTPS automatically."}],"resultDescription":"A confirmation object indicating the custom domain has been attached to the slug and registered as a Cloudflare Worker Custom Domain, with SSL automatically provisioned for HTTPS access.","failureModes":["Domain not purchased via domain-buy service — returns error if caller doesn't own the domain","Caller does not own the target slug — returns authorization error","Domain already attached to another slug — returns conflict error","Invalid domain format — returns 400 if domain doesn't match required pattern","Cloudflare registration failure — upstream error from Cloudflare hostname registration API","Slug does not exist — returns 404 not found"],"whenToPreferThis":"Use this endpoint when you have already purchased a domain via the domain-buy service and want to map it to a specific hosted site slug on withzero.ai, getting automatic SSL/HTTPS via Cloudflare. Prefer this over manual DNS configuration when hosting on withzero's platform.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-02T04:35:15.823Z","isFirstParty":true,"canonicalSlug":"site-withzero-ai-attach-custom-domain-to-hosted-site-6b0df014"}