Skip to content

Boxcast API

Endpoints for managing Boxcast broadcasts and integrations.

Overview

Endpoints

Create Broadcast

Create a new Boxcast broadcast.

http
POST /boxcast/create-broadcast

Request Body:

json
{
  "name": "Episode 42: The Future of AI",
  "description": "Join us for an exciting discussion...",
  "scheduledAt": "2026-02-10T14:00:00.000Z",
  "channelId": "abc123",
  "streamSource": {
    "type": "rtmp",
    "url": "rtmp://live.rumble.com/live",
    "key": "stream-key-123"
  },
  "settings": {
    "isPublic": true,
    "chatEnabled": true,
    "dvr": true
  }
}

Parameters:

FieldTypeRequiredDescription
namestringBroadcast title
descriptionstringNoBroadcast description
scheduledAtstringISO date for start time
channelIdstringNoBoxcast channel ID
streamSourceobjectNoRTMP source details
settingsobjectNoBroadcast settings

Response:

json
{
  "success": true,
  "broadcastId": "bc_12345",
  "embedUrl": "https://boxcast.tv/channel/xyz/bc_12345",
  "dashboardUrl": "https://dashboard.boxcast.com/broadcasts/bc_12345"
}

Delete Broadcast

Delete an existing broadcast.

http
POST /boxcast/delete-broadcast

Request Body:

json
{
  "broadcastId": "bc_12345"
}

Response:

json
{
  "success": true,
  "message": "Broadcast deleted"
}

Sync Broadcasts

Sync broadcast status from Boxcast.

http
POST /boxcast/sync

Description: Fetches broadcast status from Boxcast and updates corresponding records in EspoCRM.

Response:

json
{
  "success": true,
  "synced": 5,
  "updated": 2
}

Get Broadcast Status

Check status of a specific broadcast.

http
GET /boxcast/status/:broadcastId

Response:

json
{
  "success": true,
  "broadcast": {
    "id": "bc_12345",
    "name": "Episode 42",
    "status": "live",
    "viewerCount": 234,
    "startedAt": "2026-02-10T14:00:00.000Z",
    "streamHealth": "excellent"
  }
}

Integration Flow

Creating a Boxcast Broadcast with Rumble RTMP

When using Rumble as the primary streaming platform, Boxcast receives the same stream via RTMP restreaming:

Boxcast Entity in EspoCRM

The Boxcast integration includes custom views:

Grid View

Card-based grid display of broadcasts:

Detail View

Full broadcast details with:

  • Embed preview
  • Stream health indicators
  • Viewer analytics
  • Quick actions

Implementation

Create Broadcast Handler

javascript
// routes/boxcast.js
router.post('/create-broadcast', async (req, res) => {
  try {
    const { name, description, scheduledAt, streamSource, settings } = req.body;
    
    // If we have an RTMP source, include it
    const payload = {
      name,
      description,
      scheduledAt,
      settings: {
        isPublic: settings?.isPublic ?? true,
        chatEnabled: settings?.chatEnabled ?? true,
        dvr: settings?.dvr ?? true,
      },
    };
    
    if (streamSource) {
      payload.streamSource = streamSource;
    }
    
    // Forward to X Server
    const result = await xServerClient.post('/boxcast-livestream', payload);
    
    res.json({
      success: true,
      broadcastId: result.broadcastId,
      embedUrl: result.embedUrl,
      dashboardUrl: result.dashboardUrl,
    });
  } catch (error) {
    res.status(500).json({
      success: false,
      error: error.message,
    });
  }
});

Sync Helper

javascript
// helpers/boxcast/sync.js
export async function syncBoxcastBroadcasts() {
  // Get all Boxcast broadcasts from EspoCRM
  const broadcasts = await espoClient.list('BoxcastBroadcast', {
    where: [{ type: 'isNotNull', attribute: 'boxcastId' }],
  });
  
  let updated = 0;
  
  for (const broadcast of broadcasts) {
    // Get status from Boxcast via X Server
    const status = await xServerClient.get(`/boxcast-status/${broadcast.boxcastId}`);
    
    if (status.status !== broadcast.status) {
      await espoClient.update('BoxcastBroadcast', broadcast.id, {
        status: status.status,
        viewerCount: status.viewerCount,
      });
      updated++;
    }
  }
  
  return { synced: broadcasts.length, updated };
}

Error Handling

json
{
  "success": false,
  "error": "Failed to create broadcast",
  "code": "BOXCAST_ERROR",
  "details": "Channel not found"
}

Common Errors:

ErrorCauseSolution
CHANNEL_NOT_FOUNDInvalid channel IDVerify channel exists
RTMP_INVALIDBad RTMP URL/keyCheck source credentials
AUTH_EXPIREDBoxcast session expiredRe-authenticate in X Server
CONFLICTBroadcast time conflictChoose different time

MediaMagic CRM Documentation