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.

Sites & API Keys

Returns all sites owned by the authenticated user.

On this page

List sites

Returns all sites owned by the authenticated user.

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

Response:

{
  "data": [
    {
      "id": 18448,
      "name": "my-site",
      "type": 2,
      "type_label": "Lua",
      "owner_id": 36012,
      "created_at": "2025-03-10T00:00:00Z",
      "config": {}
    }
  ],
  "meta": { "requestId": "req_...", "timestamp": "..." }
}

Site fields

Field Type Description
id int Unique site ID
name string Site subdomain name
type int Engine type (1=TAG, 2=Lua, 3=Native App)
type_label string Human-readable engine type
owner_id int User ID of the site owner
created_at string Creation timestamp (ISO 8601)
config object Site configuration (JSON)

Get a site

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

Returns a single site object. Available to public tokens — site config is shown based on the viewer's permission level.

Lua API wrapper

-- List sites
local sites = api.sites:list()

-- Get a site
local site = api.sites:get(18448)

-- Current site
local current = api.sites.current()

Next: Forums — create and manage discussion boards.

Previous Users Next Forums