{"uid":"cap_ZMlwOZzHM1yk6HoWmE-gP","slug":"stableupload-domain-c3258094","name":"StableUpload Connect Custom Domain","description":"Connect a custom domain to a site. Creates TLS cert and routes the hostname to the site.","url":"https://stableupload.dev/api/site/domain?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","required":["uploadId","hostname"],"properties":{"hostname":{"type":"string","pattern":"^(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\\.)*[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?$","maxLength":253,"minLength":1,"description":"Custom hostname (e.g. www.coolsite.com)"},"uploadId":{"type":"string","minLength":1}}},"responseSchema":{"type":"object","required":["status","hostname","customHostnameId","dnsRecords"],"properties":{"status":{"type":"string"},"hostname":{"type":"string"},"dnsRecords":{"type":"array","items":{"type":"object","required":["type","name","value"],"properties":{"name":{"type":"string"},"type":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false}},"customHostnameId":{"type":"string"}},"additionalProperties":false},"example":null,"exampleRequest":null,"tags":["upload","files","hosting","static-site","cdn","storage"],"displayCostAmount":"0","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"proven_free","priceSource":"registry","requiresHandshake":false,"reviewCount":2,"rating":{"score":"0.96","successRate":"0.88","reviews":2,"stars":"4.8","state":"rated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"free","summary":"Free","primary":{"kind":"free","protocol":"mpp","network":"tempo","amountUsd":null,"per":"call","confidence":"unknown"},"accepted":[{"kind":"free","protocol":"mpp","network":"tempo","amountUsd":null,"per":"call","confidence":"unknown"}]},"paymentMethods":[{"uid":"pm_7Mv7YU2308FVHKpQXZVjG","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0","costPer":"request","priority":0,"asset":"0x20c000000000000000000000b9537d11c60e8b50","unit":"request","depositMicros":null,"planRef":null}],"brandName":"StableUpload","brandSlug":"stableupload","brandBaseUrl":"https://stableupload.dev","brandDocsUrl":"https://stableupload.dev","whatItDoes":"Connects a custom hostname to a StableUpload static site, provisioning a TLS certificate and routing traffic to the site.","exampleAgentPrompt":"Connect the custom domain www.coolsite.com to my StableUpload site with upload ID abc123 — I want to get the TLS cert provisioned and the DNS records I need to set up.","exampleUseCases":null,"resultDescription":"Returns the provisioning status, the connected hostname, a customHostnameId for tracking, and an array of DNS records (type, name, value) that the user must add at their DNS registrar to complete routing.","failureModes":["Invalid hostname format — hostname must be a valid DNS label, returns 400","uploadId not found or not owned by the caller — returns 404 or 403","Hostname already connected to another site — returns 409 conflict","TLS provisioning pending — status will be non-active, must poll /api/site/domain/status","Network or upstream Cloudflare error during custom hostname creation — returns 500"],"whenToPreferThis":"Use this endpoint when you have already uploaded and activated a static site on StableUpload and want to serve it under a custom domain with HTTPS. This is specifically for StableUpload-hosted sites identified by uploadId. After calling this, poll the Status endpoint to confirm TLS becomes active.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":33,"lastUsedAt":"2026-08-27T15:27:44.240Z","lastSuccessfullyRanAt":"2026-08-27T15:27:44.240Z","lastHealthCheckAt":"2026-10-10T00:33:05.949Z","isFirstParty":false,"canonicalSlug":"stableupload-domain-c3258094"}