Content API
Secured REST API powering the Freedom Agents - autonomous systems that generate, publish, and manage books, courses, roadmaps, and blog posts on vinodsharma.in. These endpoints enable AI-driven content pipelines to operate independently without manual intervention.
Authentication
All API requests require a Bearer token in the Authorization header.
curl -H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
https://vinodsharma.in/api/v1/booksContact the admin to obtain an API key. Store it securely - do not expose it in client-side code.
Response Format
Success (200/201)
{
"success": true,
"data": { ... }
}Error (4xx/5xx)
{
"error": "Error message"
}Books
/api/v1/booksList all books
Query Parameters
publishedboolean- Filter by published status/api/v1/booksCreate a new book
Request Body (JSON)
titlestringrequired- Book titleslugstring- URL slug (auto-generated from title if omitted)descriptionstring- Full descriptionshort_descriptionstring- Short taglineauthorstring- Author name (default: Vinod Kumar Sharma)price_paisenumber- Price in Indian paise (e.g. 49900 = Rs 499)price_usd_centsnumber- Price in USD cents (e.g. 999 = $9.99)formatstring- pdf | epub | html (default: pdf)cover_image_urlstring- Cover image URLfile_urlstring- Book file name in private/books/preview_pagesstring- Preview page range (e.g. 1-3)total_pagesnumber- Total page countpublishedboolean- Publish immediately (default: false)Example
{
"title": "Microservices with Spring Boot",
"description": "Complete guide to building microservices",
"author": "Vinod Kumar Sharma",
"price_paise": 49900,
"price_usd_cents": 999,
"format": "pdf",
"total_pages": 250,
"preview_pages": "1-12",
"published": true
}/api/v1/booksUpdate a book
Request Body (JSON)
iduuidrequired- Book ID...any- Any book fields to updateExample
{
"id": "abc-123-def",
"title": "Updated Title",
"price_paise": 59900,
"published": true
}/api/v1/books?id=<uuid>Delete a book
Query Parameters
iduuidrequired- Book ID to deleteCourses
/api/v1/coursesList all courses (includes sections and lessons)
Query Parameters
publishedboolean- Filter by published status/api/v1/coursesCreate a new course
Request Body (JSON)
titlestringrequired- Course titleslugstring- URL slugdescriptionstring- Full descriptionshort_descriptionstring- Short taglinethumbnail_urlstring- Thumbnail image URLprice_paisenumber- Price in paiseprice_usd_centsnumber- Price in USD centspublishedboolean- Publish immediately/api/v1/coursesUpdate a course
Request Body (JSON)
iduuidrequired- Course ID...any- Any course fields to update/api/v1/courses?id=<uuid>Delete a course
Query Parameters
iduuidrequired- Course IDBundles
/api/v1/bundlesList all bundles (includes items)
Query Parameters
publishedboolean- Filter by published status/api/v1/bundlesCreate a new bundle
Request Body (JSON)
titlestringrequired- Bundle titleslugstring- URL slugdescriptionstring- Full descriptionshort_descriptionstring- Short taglinecover_image_urlstring- Cover image URLprice_paisenumber- Price in paiseprice_usd_centsnumber- Price in USD centsdiscount_percentnumber- Discount percentage (0-100)publishedboolean- Publish immediately/api/v1/bundlesUpdate a bundle
Request Body (JSON)
iduuidrequired- Bundle ID/api/v1/bundles?id=<uuid>Delete a bundle
Query Parameters
iduuidrequired- Bundle IDRoadmaps
/api/v1/roadmapsList all roadmaps (includes steps)
Query Parameters
publishedboolean- Filter by published status/api/v1/roadmapsCreate a roadmap with steps
Request Body (JSON)
titlestringrequired- Roadmap titleslugstring- URL slugdescriptionstring- Full descriptionprioritynumber- Display order (lower = higher)publishedboolean- Publish immediatelystepsarray- Array of step objectsExample
{
"title": "Platform Engineer",
"description": "Complete path to becoming a Platform Engineer",
"priority": 5,
"published": true,
"steps": [
{
"title": "Linux & Networking Fundamentals",
"summary": "Master Linux and networking basics",
"topics": ["TCP/IP", "DNS", "HTTP", "Linux CLI"],
"tools": ["Ubuntu", "Wireshark", "curl"],
"duration": "4-6 weeks",
"difficulty": "beginner",
"icon": "🐧"
}
]
}/api/v1/roadmapsUpdate a roadmap (pass steps array to replace all steps)
Request Body (JSON)
iduuidrequired- Roadmap IDstepsarray- Replaces all existing steps/api/v1/roadmaps?id=<uuid>Delete a roadmap (cascades to steps)
Query Parameters
iduuidrequired- Roadmap IDBlog
/api/v1/blogList all blog posts
Query Parameters
publishedboolean- Filter by published statuscategorystring- Filter by category slug/api/v1/blogCreate a blog post
Request Body (JSON)
titlestringrequired- Post titleslugstring- URL slugexcerptstring- Short excerptcontentjson[]- Array of content blocks (text, code, image, video)cover_image_urlstring- Cover image URLcategory_iduuid- Blog category IDpublishedboolean- Publish immediatelyExample
{
"title": "Building RAG Pipelines",
"excerpt": "A practical guide to Retrieval Augmented Generation",
"content": [
{ "type": "text", "value": "## Introduction\nRAG is a pattern..." },
{ "type": "code", "language": "python", "value": "from langchain..." },
{ "type": "image", "url": "https://...", "caption": "Architecture" }
],
"published": true
}/api/v1/blogUpdate a blog post
Request Body (JSON)
iduuidrequired- Post ID/api/v1/blog?id=<uuid>Delete a blog post
Query Parameters
iduuidrequired- Post IDQuick Reference
| Resource | List | Create | Update | Delete |
|---|---|---|---|---|
| books | GET /api/v1/books | POST /api/v1/books | PUT /api/v1/books | DEL /api/v1/books?id= |
| courses | GET /api/v1/courses | POST /api/v1/courses | PUT /api/v1/courses | DEL /api/v1/courses?id= |
| bundles | GET /api/v1/bundles | POST /api/v1/bundles | PUT /api/v1/bundles | DEL /api/v1/bundles?id= |
| roadmaps | GET /api/v1/roadmaps | POST /api/v1/roadmaps | PUT /api/v1/roadmaps | DEL /api/v1/roadmaps?id= |
| blog | GET /api/v1/blog | POST /api/v1/blog | PUT /api/v1/blog | DEL /api/v1/blog?id= |