Create a publishable key
Mints a read-only key your website's page source can read this
newsletter's public data with. Needs settings: write, and is a write.
The secret is in this response and nowhere else. Commune keeps only a digest of it, so no later call returns it; a key you have lost is a key you rotate.
It is cmn_pk_-prefixed rather than cmn_sk_ because it is meant to be
public: it goes in HTML that anybody can read. What stops that being a
problem is what the key can do, which is read what this newsletter has
already published, from this newsletter's own website origins, inside a
rate limit. Never an email address, never a draft, never a tag-scoped
article, and never another newsletter.
allowed_origins are extra origins, for a development machine or a
staging host. The newsletter's own website origins are always accepted
and do not need listing, which is why the empty default means "the real
website and nowhere else" rather than "nowhere".
This is the one place in this API where a credential mints a credential. An API key cannot mint an API key, because a key that could would outlive its own revocation. Neither half of that holds here: this key can mint nothing, and it reaches one newsletter's published rows by its own row rather than by a grant anybody could widen.
Publishes no event.
Loading...
Waiting for a request to be sent.