Skip to content

API Reference

Wisdoverse Nexus provides REST and WebSocket APIs for integration.

Base URL

https://api.wisdoverse.com

All v1 endpoints are prefixed with /v1.

Authentication

All /v1/* API requests require a JWT token in the Authorization header:

Authorization: Bearer <token>

Unauthenticated requests to protected endpoints return 401 Unauthorized.

Endpoints

Health Check

MethodEndpointDescriptionAuth
GET/healthHealth checkNo

Response: 200 OK - Plain text OK

Rooms API

MethodEndpointDescriptionAuth
GET/v1/roomsList roomsYes
POST/v1/roomsCreate a roomYes
GET/v1/rooms/Get room detailsYes
DELETE/v1/rooms/Delete a roomYes
POST/v1/rooms/{id}/inviteInvite memberYes

List Rooms

Query parameters:

  • limit (optional, default: 100, max: 1000) - Max rooms to return
  • offset (optional, default: 0) - Pagination offset

Response:

json
{
  "rooms": [
    {
      "id": "room_abc123",
      "name": "general",
      "topic": "Team chat",
      "member_count": 5
    }
  ],
  "total": 42
}

Create Room

Request:

json
{
  "name": "general",
  "topic": "Team chat"
}

Response: 201 Created

json
{
  "id": "room_abc123",
  "name": "general"
}

Get Room

Response:

json
{
  "id": "room_abc123",
  "name": "general",
  "topic": "Team chat",
  "messages": [
    {
      "id": "msg_xyz",
      "sender": "alice",
      "text": "Hello!",
      "reply_to": null
    }
  ]
}

Delete Room

Response: 204 No Content (empty body)

Messages API

MethodEndpointDescriptionAuth
POST/v1/messagesSend a messageYes

Send Message

Request:

json
{
  "roomId": "room_abc123",
  "sender": "alice",
  "text": "Hello, world!",
  "replyTo": null
}

Response: 201 Created

json
{
  "id": "msg_xyz"
}

Search API

MethodEndpointDescriptionAuth
GET/v1/searchSemantic searchYes
POST/v1/searchSemantic searchYes

Search Messages

Query parameters:

  • q (required) - Search query string
  • limit (optional, default: 10) - Max results
  • min_score (optional) - Minimum relevance score
  • room_id (optional, UUID) - Filter by room

Response:

json
{
  "query": "project updates",
  "results": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "score": 0.95,
      "content": "Here are the latest project updates...",
      "room_id": "550e8400-e29b-41d4-a716-446655440001"
    }
  ],
  "total": 5
}

WebSocket API

Connect to /ws for real-time messaging. No authentication required on the WebSocket endpoint.

Events

  • message:create - New message
  • message:update - Message updated
  • room:join - User joined room
  • room:leave - User left room

Error Handling

All errors return a consistent JSON format:

json
{
  "error": "Human-readable error message",
  "code": "ERROR_CODE"
}

Error Codes

CodeHTTP StatusDescription
BAD_REQUEST400Invalid request parameters
UNAUTHORIZED401Missing or invalid authentication
FORBIDDEN403Insufficient permissions
NOT_FOUND404Resource not found
SERVICE_UNAVAILABLE503Service temporarily unavailable
INTERNAL_ERROR500Internal server error
INVALID_QUERY400Invalid search query
SEARCH_UNAVAILABLE503Search service not configured

Rate Limiting

API endpoints are protected by a write gate to prevent overload. When at capacity, endpoints return 503 Service Unavailable with code SERVICE_UNAVAILABLE.

Source-available under the Wisdoverse Nexus Business Source License 1.1.