POST https://api.usecommune.com/newsletters/{newsletter}/website-pages Production. There is no separate sandbox host.

Create a website page

Writes a page of this newsletter's website. Needs content: write, and is a write.

A page is free-form HTML, CSS and JavaScript that you own outright. There is no template, no enforced layout and no deploy step: an edit to a published page is live the moment it commits.

kind decides what path means and cannot be changed afterwards.

  • page is a fixed path. Anything you like: /about, /subscribe.
  • newsletter is the article list, and its path is where a reader clicking the newsletter's name or avatar inside Commune arrives. A newsletter may have one.
  • article is a URL pattern that renders every article. It has to contain :article, and may also use :year, :month, :day and :id. A token is a whole path segment. An unknown token answers 422; two patterns that could both serve one URL answer 409.

A fixed path always beats a pattern, so /about and /:article coexist and /about is the page.

status defaults to draft, which has no public address: it is reachable only through the signed preview_url this returns. Publish a website page puts it live.

No versioning. Commune keeps the page you last wrote and nothing else, so keep your site in a repository of your own.

A document over 2MB answers 422. Move images, fonts and shared stylesheets or scripts into Store a website asset and link them.

Publishes no event.

Path parameters

  • string Required

Request Headers

  • string Required
  • string

Body

  • string Required
  • string Required
  • string Required
  • object
  • string
POST /newsletters/{newsletter}/website-pages
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-createsitepage

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.