WIP! A BB-style forum, on the ATmosphere!
We're still working... we'll be back soon when we have something to show off!
node
typescript
hono
htmx
atproto
1meta {
2 name: Create Topic
3 type: http
4 seq: 2
5}
6
7post {
8 url: {{appview_url}}/api/topics
9}
10
11headers {
12 Content-Type: application/json
13}
14
15body:json {
16 {
17 "title": "My new topic title",
18 "text": "My new topic",
19 "boardUri": "at://{{forum_did}}/space.atbb.forum.board/{{board_rkey}}"
20 }
21}
22
23assert {
24 res.status: eq 201
25 res.body.uri: isDefined
26 res.body.cid: isDefined
27}
28
29docs {
30 Creates a new topic (thread starter post) in a board.
31
32 Requires authentication via session cookie.
33
34 Body parameters:
35 - title: string (required) - Topic title (max 120 graphemes; required)
36 - text: string (required) - Topic text content (1-3000 chars, max 300 graphemes)
37 - boardUri: string (required) - AT URI of the board (at://did/space.atbb.forum.board/rkey)
38
39 Returns:
40 {
41 "uri": "at://did:plc:user/space.atbb.post/rkey",
42 "cid": "bafyrei...",
43 "rkey": "3k..."
44 }
45
46 The post record written to PDS includes:
47 - title (topic title)
48 - forum reference (singleton, auto-configured)
49 - board reference (from boardUri parameter)
50
51 Error codes:
52 - 400: Invalid input (missing or empty title, missing text, invalid boardUri, malformed JSON)
53 - 401: Unauthorized (not authenticated)
54 - 403: Forbidden (user is banned from this forum)
55 - 404: Board not found
56 - 503: Unable to reach PDS or database (temporary, retry later)
57 - 500: Server error
58}