API Reference

The Lamma+ Central API provides REST endpoints for all platform features. All endpoints are scoped to a tenant via the X-Domain-Id header or automatic domain detection from the request origin.

Authentication

Most endpoints require a Firebase Auth ID token in the Authorization header. Admin endpoints additionally require the admin custom claim.

bash
curl -H "Authorization: Bearer <firebase-id-token>" \
     -H "X-Domain-Id: islamic" \
     https://api.lammaplus.com/api/creators

Creators

CRUD operations for creator profiles. Supports filtering by category, region, and topic.

GET
/api/creators

List creators with pagination, filtering by category, region, topic

GET
/api/creators/:id

Get a single creator profile with enriched data

POST
/api/creators

Create a new creator (admin)

PUT
/api/creators/:id

Update creator profile (admin)

GET
/api/creators/:id/analytics

Get creator engagement analytics

Videos

Video management powered by Mux. Upload, encode, and stream original content.

GET
/api/videos

List videos with pagination and filtering

GET
/api/videos/:id

Get video details including playback URL

POST
/api/videos/upload

Initiate video upload (returns Mux upload URL)

GET
/api/videos/discovery

Curated video discovery feed

GET
/api/clips

List short-form video clips (reels)

Community

Forum posts, comments, reactions, and moderation. Supports premium gating.

GET
/api/community/posts

List forum posts with sorting and filtering

POST
/api/community/posts

Create a new forum post

GET
/api/community/posts/:id

Get post with comments

POST
/api/community/posts/:id/comments

Add a comment to a post

POST
/api/community/posts/:id/reactions

Add/remove reaction to a post

Brands & Campaigns

Brand directory and campaign management for the creator marketplace.

GET
/api/brands

List brands in the directory

GET
/api/brands/:id

Get brand details

GET
/api/campaigns

List campaigns with filtering

POST
/api/campaigns

Create a new campaign

POST
/api/campaigns/:id/deals

Create a deal for a campaign

Channels

Real-time group communication with threads, reactions, and typing indicators.

GET
/api/channels

List available channels

POST
/api/channels

Create a new channel

GET
/api/channels/:id/messages

Get channel messages with pagination

POST
/api/channels/:id/messages

Send a message to a channel

GET
/api/channels/:id/threads/:threadId

Get thread messages

Commerce

Creator commerce features — affiliate links, product tracking, and analytics.

GET
/api/commerce/products/:creatorId

Get products for a creator

POST
/api/commerce/clicks

Track affiliate link click

GET
/api/commerce/analytics

Commerce analytics dashboard data

Tenant Management

Multi-tenant administration — billing, usage, domains, and settings.

GET
/api/tenants/:id

Get tenant details and settings

PUT
/api/tenants/:id

Update tenant settings

GET
/api/tenants/:id/usage

Get resource usage (video, storage)

GET
/api/tenants/:id/billing

Get billing details and subscription status

POST
/api/tenants/:id/domains

Add custom domain to tenant

Response Format

All API responses follow a consistent JSON structure:

json
{
  "success": true,
  "data": { ... },
  "pagination": {
    "page": 1,
    "limit": 20,
    "total": 150,
    "hasMore": true
  }
}

Error responses include a descriptive message:

json
{
  "success": false,
  "error": "Creator not found",
  "code": "NOT_FOUND"
}