Beta documentation. This is an early preview — content is still in active development. Feedback helps shape the final release. Share your thoughts or join the discussion.

Forums

```bash

On this page

List forums

curl "https://api.wapka.org/v1/forums?parent=0&page=1&limit=20" \
  -H "Authorization: Bearer eyJ..."

Query parameters

Parameter Type Description
parent int Filter by parent forum ID
userid int Filter by owner user ID
search string Search by forum name
page int Page number (default 1)
limit int Items per page (default 20, max 100)

Response

{
  "data": [
    {
      "id": 1,
      "name": "General Discussion",
      "position": 1,
      "parent": null,
      "owner": {
        "id": 36012,
        "username": "admin",
        "avatar": "https://img.wapka.org/u/36012.jpg"
      },
      "permissions": { "create_post": 0, "reply": 0 },
      "created_at": "2025-01-01T00:00:00Z"
    }
  ],
  "pagination": { "page": 1, "limit": 20, "totalItems": 5, "totalPages": 1, "hasNext": false, "hasPrev": false },
  "meta": { "requestId": "req_...", "timestamp": "..." }
}

Forum fields

Field Type Description
id int Unique forum ID
name string Forum name
position int Display order
parent object | null Parent forum reference ({ id, name })
owner object Creator reference ({ id, username, avatar })
permissions object Permission model for posts
created_at string Creation timestamp

Get a forum

curl https://api.wapka.org/v1/forums/1 \
  -H "Authorization: Bearer eyJ..."

Returns the forum with embedded owner and parent references.

Create a forum

Requires a logged-in token.

curl -X POST https://api.wapka.org/v1/forums \
  -H "Authorization: Bearer eyJ..." \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Feature Requests",
    "parent": 0
  }'
Field Required Type Description
name Yes string Forum name
parent No int Parent forum ID (0 for top-level)

Returns 201 Created with the new forum object.

Update a forum

Requires a logged-in token.

curl -X PATCH https://api.wapka.org/v1/forums/1 \
  -H "Authorization: Bearer eyJ..." \
  -H "Content-Type: application/json" \
  -d '{
    "name": "General Chat"
  }'

Only the name field can be updated.

Delete a forum

Requires a logged-in token.

curl -X DELETE https://api.wapka.org/v1/forums/1 \
  -H "Authorization: Bearer eyJ..."

Returns 204 No Content.

Lua API wrapper

-- List forums
local forums = api.forums:list({ parent = 0 })

-- Get a forum
local forum = api.forums:get(1)

-- Create a forum
api.forums:create({ name = "Feature Requests", parent = 0 })

-- Update a forum
api.forums:rename(1, "General Chat")

-- Delete a forum
api.forums:delete(1)

Next: Posts — create and manage forum posts.

Previous Sites & API Keys Next Posts