meta { name: Unlock Topic type: http seq: 4 } delete { url: {{appview_url}}/api/mod/lock/123456 } headers { Content-Type: application/json } body:json { { "reason": "Discussion can continue constructively" } } assert { res.status: eq 200 res.body.success: eq true res.body.action: eq space.atbb.modAction.unlock } docs { Unlocks a previously locked topic (reversal moderation action). Requires authentication via session cookie and `space.atbb.permission.lockTopics` permission. Path parameters: - topicId: string (required) - Database ID of the topic post to unlock (in URL path) Body parameters: - reason: string (required) - Reason for unlocking (1-3000 characters, cannot be empty) Returns: { "success": true, "action": "space.atbb.modAction.unlock", "postId": "123456", "postUri": "at://user-did/space.atbb.post/rkey", "uri": "at://forum-did/space.atbb.modAction/rkey", "cid": "bafyrei...", "alreadyActive": false } If topic is already unlocked, returns 200 with `alreadyActive: true` (idempotent). Writes a modAction record to the Forum DID's PDS with: - action: "space.atbb.modAction.unlock" - subject: { post: { uri, cid } } - reason: provided reason - createdBy: moderator's DID Error codes: - 400: Invalid input (invalid topicId format, missing/empty reason, malformed JSON) - 401: Unauthorized (not authenticated) - 403: Forbidden (lacks lockTopics permission) - 404: Post not found - 500: ForumAgent not available (server configuration issue) - 503: ForumAgent not authenticated or unable to reach Forum PDS (retry later) Notes: - Unlock writes a distinct "unlock" action type (different from lock) - Read-path logic determines current lock state by checking most recent action chronologically - Additive reversal model: unlock writes new record, doesn't delete lock record }