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
at main 61 lines 1.3 kB view raw
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 403 if the user is banned from the forum. 57 Returns 404 if root or parent post not found. 58 Returns 403 if the topic is locked (no new replies allowed). 59 Returns 503 if PDS or database is temporarily unavailable (retry later). 60 Returns 500 for server errors. 61}