PATCH https://api.usecommune.com/domains/{domain} Production. There is no separate sandbox host.

Change what a website domain serves

Hands one of your hostnames between Commune's two website origins, or takes it back. Needs settings: write, and is a write.

mode is the only property this changes and the only one it accepts. app is the Commune newsletter page, which is the default every hostname starts on and is where readers sign in, chat and highlight. site is your own pages, built through Creator websites, served from an origin that never carries a Commune session.

One host can carry a session or run your JavaScript, never both. That is why this is a mode rather than two features on one hostname, and why switching to site makes Commune clear the cookies and storage it left on that origin: once your own code runs there, anything Commune kept would be readable by it. Switching back clears what your pages left, for the mirror image of the same reason.

A newsletter holds at most one hostname in each mode. Asking for a mode another of your hostnames already holds answers 409; free it first.

What this does not do. Nothing is reprovisioned: the certificate, the records proving you own the hostname and the target your DNS points at are all untouched, because what changes is which Commune origin answers rather than who owns the name. Adding a hostname and proving ownership of it are not operations here at all.

Publishes no event.

Path parameters

  • string Required

Request Headers

  • string Required
  • string

Body

  • string Required
PATCH /domains/{domain}
Loading...

Share your request

Use this link to easily share a pre-filled request of this operation. Everything you filled will be shared apart from the authentication fields.

Request URL

https://api-reference.usecommune.dev/explorer/operation/operation-updatedomain

Send a delete request

It looks like you’re about to send a DELETE request to this API. This type of request carries a risk of permanent and irreversible data loss.

Are you sure you want to continue?
Response
Waiting for a request to be sent.