Creator websites

List a newsletter's website pages

Every live page of this newsletter's website, drafts included, in path order. Needs content: read.

The documents are not here. A page holds up to 2MB of HTML and a website holds many, so this is the index: each entry carries its address, its state, the weight of its document and where to look at it. Retrieve a website page for the document itself.

A draft has no public address at all, so its url is null and its preview_url is a signed link that opens that one page and nothing else. An article page is a URL pattern rather than a URL, so its url is null whatever its state.

A deleted page is not here at all, and its path is free for another page to claim.

get/newsletters/{newsletter}/website-pages

Request

  • Base URL: https://api.usecommune.com
  • URL: https://api.usecommune.com/newsletters/{newsletter}/website-pages
  • Auth: one of:
    • HTTP bearer
    • OAuth 2 (authorization code, authorization URL https://usecommune.com/api/oauth/authorize, token URL https://usecommune.com/api/oauth/token, scopes: content:read)

Query parameters

cursorstring

The pagination.next_cursor value from the previous page. Omit it to read the first page. A cursor is opaque, is only valid for the same operation with the same filters, and is not a durable identifier.

limitinteger

How many items to return in this page. This is a page size, not an offset. Fewer items than requested may come back and that does not mean the collection is exhausted, only an absent next_cursor does.

expandstring

Comma-separated list of relationship paths to inline in the response. Unexpanded relationships are returned as a reference object carrying only id and object. Each operation documents the paths it accepts, and an unknown path answers 400. Nested paths use a dot, for example article.newsletter.

fieldsstring

Comma-separated allow-list of top level properties to return on each object, so a client can trim a response it does not need in full. id and object are always returned. An unknown property name answers 400. Properties omitted by an operation, such as content on any article list, cannot be brought back with fields.

kind'page' | 'newsletter' | 'article'

What a website page is for, which also decides what its path means.

page is a fixed path and anything the creator wants. newsletter is the article list, at most one per newsletter, and its path is where Commune points the newsletter's name and avatar. article is a URL pattern containing :article that renders every article, so its path is a pattern rather than an address.

Return only pages of this kind. Repeat the parameter to accept several.

status'draft' | 'published'

Whether a page has a public address. A draft is reachable only through its signed preview_url; an edit to a published page is live on commit, because a creator website has no deploy step.

Return only pages in this state. Omit for both.

Response

A page of website pages.

object'list' required

Always list, so a response is self describing.

Example response

{
  "pagination": {
    "next_cursor": "Y3Vyc29yOjE3NTY0MjM2MDAwMDA6MDE5MmM4"
  },
  "data": [
    {
      "newsletter": {
        "object": "newsletter",
        "id": "9a4c1c6e-0f2b-4f47-9d3f-6d1b1a2c3d4e"
      },
      "path": "/about"
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.