Start a thread
Opens a new conversation in the newsletter's community and returns it.
Needs content: write.
The thread is written by the person the credential belongs to, the
same person createArticle credits, and readers see it exactly as if
they had posted it in Commune. Subscribers are notified the way they
are for any new thread, and an @username in the text mentions that
person.
content is Markdown, as readers write it in Commune: plain text with
light formatting, up to 5,000 characters. It is stored as sent. It can
be left out when media attaches something, so a photo with no
caption is a thread; a body with neither answers 400.
visibility decides where the thread can be read. subscribers, the
default, keeps it inside the newsletter. public also puts it on
Commune's global feed in the same write, which is what
Put a thread on the global feed (POST /threads/{thread}/publish) does
to a thread that already exists.
audience_tag_ids starts the thread as a private room: only people
holding one of the named segments, and the newsletter's team, can read
it or reply in it. Each id has to be a live tag of this newsletter with
is_room set, which
GET /newsletters/{newsletter}/tags?is_room=true lists; anything else
is refused 422 naming the ids that are not rooms, and no thread is
written. null and [] both mean no audience.
Naming a segment needs audience: read as well, because this one
call writes a thread (content) and reads a segment to address it to
(audience), and which segments a newsletter keeps is audience: read
wherever else a credential can ask. A credential without it is refused
403 naming the family, rather than being told whether the id it sent
was a real segment. A thread with no audience needs nothing beyond
content: write.
A private thread is never on the global feed, so visibility: public
together with an audience writes the thread subscribers rather than
refusing: the audience is the stronger statement of the two and the one
the caller composed inside a room.
Publishes thread.created, carrying audience_scoped, and
thread.published with source created_public when the thread is
created public, which a private thread never is.
Loading...
Waiting for a request to be sent.