REST API Reference

Complete REST API reference for managing NoLag programmatically. API keys are project-scoped, so no organization or project IDs are needed in the URLs.

Base URL

https://api.nolag.app/v1

Authentication

All API requests require a project-scoped API key in the Authorization header:

Authorization: Bearer nlg_live_xxx.secret

API keys are created in the NoLag dashboard and are scoped to a specific project. The API key determines which project's resources you can access.

Apps

Apps are containers for rooms and topics within your project.

List Apps

GET /apps

# Query parameters (optional)
?page=1&limit=20&search=chat

Create App

POST /apps

{
  "name": "My Chat App",
  "description": "A real-time chat application",
  "blueprintId": "optional-blueprint-id"
}

Get App

GET /apps/{appId}

Update App

PATCH /apps/{appId}

{
  "name": "Updated Name",
  "description": "Updated description"
}

Delete App

DELETE /apps/{appId}

Rooms

Rooms organize topics within an app. Each room has a unique slug used in topic patterns.

List Rooms

GET /apps/{appId}/rooms

Create Room

POST /apps/{appId}/rooms

{
  "name": "General Chat",
  "slug": "general",
  "description": "General discussion room"
}

Get Room

GET /apps/{appId}/rooms/{roomId}

Update Room

PATCH /apps/{appId}/rooms/{roomId}

{
  "name": "Updated Room Name",
  "description": "Updated description",
  "isEnabled": true
}

Delete Room

DELETE /apps/{appId}/rooms/{roomId}

Note: Only dynamic rooms can be deleted. Static rooms defined in blueprints cannot be deleted.

Actors

Actors represent clients that connect to NoLag (devices, users, or servers). Each actor has an access token used for WebSocket connections.

Important: The access token is only returned when creating an actor. Save it immediately!

List Actors

GET /actors

Create Actor

POST /actors

{
  "name": "Web Client",
  "actorType": "device",
  "description": "Browser-based client",
  "externalId": "user-123",
  "metadata": {
    "platform": "web"
  }
}

Actor types:

  • device - Browser, mobile app, IoT device
  • user - Authenticated user
  • server - Backend service

Get Actor

GET /actors/{actorId}

Update Actor

PATCH /actors/{actorId}

{
  "name": "Updated Name",
  "description": "Updated description",
  "isActive": true,
  "metadata": {
    "platform": "mobile"
  }
}

Delete Actor

DELETE /actors/{actorId}

Topic Patterns

Topics follow the pattern app-slug/room-slug/topic-name:

# Example topic patterns
my-chat-app/general/messages
my-chat-app/general/typing
my-chat-app/private-room/notifications

Response Format

Successful responses return the resource directly:

// Single resource
{
  "appId": "app_123",
  "name": "My App",
  "description": "...",
  "createdAt": "2024-01-01T00:00:00Z"
}

// Paginated list
{
  "data": [...],
  "total": 100,
  "page": 1,
  "limit": 20,
  "totalPages": 5
}

Error responses:

{
  "statusCode": 400,
  "message": "Description of the error",
  "error": "Bad Request"
}

Rate Limits

PlanRequests/minute
Free60
Pro600
EnterpriseCustom

SDKs

For most use cases, we recommend using our official SDKs which wrap this API: