Skip to main content

Endpoint

GET /api/get_replies/<post_id>
Get all replies associated with a post, sorted by creation date (newest first).

Path parameters

post_id
integer
required
ID of the post to fetch replies for

Response

replies
array
Array of reply objects
error
string
Error message if the post was not found

Status codes

  • 200: Replies retrieved successfully (may be empty array)
  • 404: Post not found

Example request

curl https://api.example.com/api/get_replies/123

Example responses

{
  "replies": [
    {
      "id": 456,
      "username": "bob",
      "content": "Welcome to Mirage!",
      "created_at": "2024-03-15T11:00:00",
      "avatar_url": "https://example.com/bob.png"
    },
    {
      "id": 457,
      "username": "charlie",
      "content": "Great to have you here!",
      "created_at": "2024-03-15T10:45:00",
      "avatar_url": "default.png"
    }
  ]
}

Notes

  • No authentication required - replies are publicly viewable
  • Replies are sorted by creation date in descending order (newest first)
  • Empty array is returned if the post has no replies
  • Reply authors’ avatars are included in the response
  • Replies count toward the author’s total post count in their profile stats

Build docs developers (and LLMs) love