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 Reply
3 type: http
4 seq: 1
5}
6
7post {
8 url: {{appview_url}}/api/posts
9}
10
11headers {
12 Content-Type: application/json
13}
14
15body:json {
16 {
17 "text": "This is a reply",
18 "rootPostId": "1",
19 "parentPostId": "1"
20 }
21}
22
23assert {
24 res.status: eq 201
25 res.body.uri: isDefined
26 res.body.cid: isDefined
27 res.body.rkey: isDefined
28}
29
30docs {
31 Create a reply to an existing post.
32
33 Required body:
34 {
35 "text": "Reply text (1-10000 chars, trimmed)",
36 "rootPostId": "1", // Topic (thread starter) ID
37 "parentPostId": "1" // Direct parent post ID (can be same as rootPostId)
38 }
39
40 Returns:
41 {
42 "uri": "at://did:plc:.../space.atbb.post/...",
43 "cid": "...",
44 "rkey": "..."
45 }
46
47 Requires authentication (valid session cookie).
48
49 Validation:
50 - Both rootPostId and parentPostId must exist
51 - Parent must belong to the same thread (parent.rootPostId == rootPostId OR parent is root)
52 - Root post must have a forum reference
53
54 Returns 400 for invalid input or validation failures.
55 Returns 401 if not authenticated.
56 Returns 404 if root or parent post not found.
57 Returns 503 if PDS unreachable (network error).
58 Returns 500 for server errors.
59}