Content API
Bella’s Content API organises verified health articles and structured workout sessions into dedicated collections, while sharing one global Cloud CDN media signing endpoint for video and audio streams:
- Articles: Stage- and week-safe educational guides (
type: "article") with companion links and CommonMark Markdown bodies. - Workouts: Structured movement bundles (
type: "workout") with signed cover images and orderedexercises[]video steps. - Get content media: Shared endpoint (
GET /api/v1/content/{content_id}/media) to resolve, switch rendition quality (1080p,720p,540p,360p), or refresh expiring signed Cloud CDN URLs for any exercise or media-backed asset.
Integration architecture
Partner integrations follow a two-tier model so your integration key stays private on your server while heavy media streams directly from Bella’s global CDN (https://media.bellacoach.ai):
- Server-to-server catalogue fetch: Your backend authenticates to
api.bellacoach.aiusingAuthorization: Bearer $BELLA_API_KEYto list or filter articles and workouts and retrieve full objects with pre-signed media URLs. - Direct client rendering & playback: Your backend passes the returned Markdown
body, signedcover_image_url, and signedhttps://media.bellacoach.ai/...video URLs down to your web or mobile client. Client apps render Markdown natively and pass signed URLs straight to<video>,AVPlayer, orExoPlayer— never embedding$BELLA_API_KEYin client apps.
Endpoints
| Group | Method | Endpoint | Description |
|---|---|---|---|
| Articles | GET | /api/v1/content/articles | Browse and filter articles by stage, safe week, category, or tag. |
GET | /api/v1/content/articles/metadata | List article stages, week ranges, categories, and tags. | |
GET | /api/v1/content/articles/{article_id} | Retrieve The Article object with full Markdown body and related_content. | |
| Workouts | GET | /api/v1/content/workouts | Browse and filter workout bundles by category, level, body_focus, length, equipment, goal, or tag. |
GET | /api/v1/content/workouts/metadata | List workout categories, difficulty levels, body focuses, duration brackets, equipment, goals, and tags. | |
GET | /api/v1/content/workouts/{workout_id} | Retrieve The Workout object with signed cover_image_url and ordered exercises[]. | |
| Shared media | GET | /api/v1/content/{content_id}/media | Generate a short-lived signed Cloud CDN URL (or 302 redirect) for video or audio playback. |
Next steps
Last updated on