REST API
Everything the dashboard does, from your own code: videos, live streams, captions, players and more, described by an OpenAPI spec.
import { Crumbcast } from "crumbcast"; const crumbcast = new Crumbcast({ token: process.env.CRUMBCAST_TOKEN, baseUrl: "https://your-crumbcast",}); const video = await crumbcast.videos.getVideo({ id: videoId,}); // Refused: a CrumbcastError, with the API's reasonawait crumbcast.videos.updateVideo({ id: videoId, videoUpdateRequest: { title: "Launch day" },});import os from crumbcast import Crumbcast crumbcast = Crumbcast( token=os.environ["CRUMBCAST_TOKEN"], base_url="https://your-crumbcast",) video = crumbcast.videos.get_video(video_id) # Refused: a CrumbcastError, with the API's reasoncrumbcast.videos.update_video( video_id, body={"title": "Launch day"},)use Crumbcast\Crumbcast; $crumbcast = new Crumbcast( token: getenv('CRUMBCAST_TOKEN'), baseUrl: 'https://your-crumbcast',); $video = $crumbcast->videos->getVideo($videoId); // Refused: a CrumbcastException, with the API's reason$crumbcast->videos->updateVideo($videoId, [ 'title' => 'Launch day',]);const api = "https://your-crumbcast/api/v1"; // A project's API token, from its settings: it goes with every requestconst headers = { Authorization: `Bearer ${process.env.CRUMBCAST_TOKEN}` }; const video = await fetch(`${api}/videos/${videoId}/`, { headers }) .then((response) => response.json());What you get
- An OpenAPI specGenerate a typed client in your language from /api/v1/openapi.public.json.
- A token per projectMake an API token in the project's settings and send it with every request.
- Answers that say whyA feature your plan lacks answers 402 and a role too low 403, so your code knows what to do.
- Uploads straight to storageFiles go from the client to storage directly, never through the API.