Forum API

Read boards, topics, and replies. Create topics and replies on behalf of authenticated users.

Base path: /wp-json/flamenet/v1/forum

GET /forum/boards

Returns all forum boards with cached statistics.

Example request

curl https://flamenet.io/wp-json/flamenet/v1/forum/boards

Example response

[
  {
    "id":             1,
    "title":          "General Discussion",
    "description":   "Talk about anything.",
    "topic_count":   42,
    "post_count":    156,
    "last_post_time":"2026-03-01 14:22:00",
    "last_post_user":"JohnDoe"
  },
  ...
]
GET /forum/boards/{id}

Returns board details and a paginated list of topics (stickies first).

Query parameters

ParameterTypeDefaultDescription
pageinteger1Page number for topic pagination.

Example request

curl "https://flamenet.io/wp-json/flamenet/v1/forum/boards/1?page=2"

Example response

{
  "board":  { "id": 1, "title": "General Discussion", ... },
  "topics": [
    {
      "id":             5,
      "title":          "Welcome to Flamenet!",
      "author_id":     2,
      "author":         "Admin",
      "reply_count":   12,
      "is_sticky":     true,
      "is_locked":     false,
      "created_at":    "2026-01-01T00:00:00+00:00",
      "last_reply":    "2026-02-28 09:14:00",
      "last_reply_user":"JaneSmith"
    }
  ],
  "page":  2,
  "pages": 5,
  "total": 83
}
GET /forum/topics/{id}

Returns topic details and a paginated list of replies (oldest first).

Query parameters

ParameterTypeDefaultDescription
pageinteger1Page number for reply pagination.

Example request

curl "https://flamenet.io/wp-json/flamenet/v1/forum/topics/5"

Example response

{
  "topic": {
    "id":          5,
    "title":       "Welcome to Flamenet!",
    "content":     "Hello everyone...",
    "author_id":  2,
    "author":      "Admin",
    "board_id":   1,
    "board_title":"General Discussion",
    "reply_count":12,
    "is_sticky":  true,
    "is_locked":  false,
    "created_at": "2026-01-01T00:00:00+00:00",
    "last_reply": "2026-02-28 09:14:00"
  },
  "replies": [
    {
      "id":        23,
      "content":  "Thanks for the warm welcome!",
      "author_id":5,
      "author":   "JaneSmith",
      "created_at":"2026-01-02T11:00:00+00:00"
    }
  ],
  "page":  1,
  "pages": 2,
  "total": 12
}
POST /forum/topics AUTH REQUIRED

Creates a new topic in the specified board.

Request body (JSON)

FieldTypeRequiredDescription
board_idintegerYesID of the board to post in.
titlestringYesTopic title (max 200 chars).
contentstringYesTopic body text.

Example request

curl -X POST https://flamenet.io/wp-json/flamenet/v1/forum/topics \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"board_id":1,"title":"My first topic","content":"Hello Flamenet!"}'

Example response — 201 Created

{
  "id":       88,
  "title":    "My first topic",
  "board_id": 1,
  "author":   "YourUsername"
}
POST /forum/topics/{id}/replies AUTH REQUIRED

Posts a reply to the specified topic. Returns 403 if the topic is locked.

Request body (JSON)

FieldTypeRequiredDescription
contentstringYesReply body text.

Example request

curl -X POST https://flamenet.io/wp-json/flamenet/v1/forum/topics/5/replies \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"content":"Great post, thanks!"}'

Example response — 201 Created

{
  "id":       102,
  "topic_id": 5,
  "author":   "YourUsername"
}