DocsOForumREST API
Developer

REST API

OForumorravo.com/docs/oforum/rest-api

Base URL: /wp-json/oforum/v1/

All write endpoints require WordPress authentication (nonce via X-WP-Nonce header, or cookie-based auth).

Rooms

MethodEndpointAuthDescription
GET/roomsNoneList all rooms
GET/rooms/{id}NoneGet single room
POST/roomsAdminCreate room
PUT/rooms/{id}AdminUpdate room
DELETE/rooms/{id}AdminDelete room

Threads

MethodEndpointAuthDescription
GET/threads?room_id=XNoneList threads (paginated)
GET/threads/{id}NoneGet single thread
POST/threadsLogged inCreate thread
PUT/threads/{id}Author or ModUpdate thread
DELETE/threads/{id}ModeratorDelete thread

Create thread body:

json{
  "title":   "My thread title",
  "content": "<p>Thread content</p>",
  "type":    "discussion",
  "room_id": 5
}

Replies

MethodEndpointAuthDescription
GET/replies/{id}NoneGet single reply
POST/repliesLogged inPost reply
PUT/replies/{id}Author (within window)Edit reply
DELETE/replies/{id}Author or ModDelete reply

Create reply body:

json{
  "thread_id": 42,
  "parent_id": 0,
  "content":   "<p>My reply</p>"
}

Reactions

MethodEndpointAuthDescription
POST/reactionsLogged inToggle reaction

Body: { "reply_id": 42, "emoji": "👍" }

Response: { "action": "added", "counts": { "👍": 3, "❤️": 1 } }

Search

MethodEndpointAuthDescription
GET/search?q=termNoneFull-text search

Query params: q, room_id, page, per_page


REST API — OForum Docs — Orravo