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/books

Contact 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

GET/api/v1/books

List all books

Query Parameters

publishedboolean- Filter by published status
POST/api/v1/books

Create a new book

Request Body (JSON)

titlestringrequired- Book title
slugstring- URL slug (auto-generated from title if omitted)
descriptionstring- Full description
short_descriptionstring- Short tagline
authorstring- 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 URL
file_urlstring- Book file name in private/books/
preview_pagesstring- Preview page range (e.g. 1-3)
total_pagesnumber- Total page count
publishedboolean- 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
}
PUT/api/v1/books

Update a book

Request Body (JSON)

iduuidrequired- Book ID
...any- Any book fields to update

Example

{
  "id": "abc-123-def",
  "title": "Updated Title",
  "price_paise": 59900,
  "published": true
}
DELETE/api/v1/books?id=<uuid>

Delete a book

Query Parameters

iduuidrequired- Book ID to delete

Courses

GET/api/v1/courses

List all courses (includes sections and lessons)

Query Parameters

publishedboolean- Filter by published status
POST/api/v1/courses

Create a new course

Request Body (JSON)

titlestringrequired- Course title
slugstring- URL slug
descriptionstring- Full description
short_descriptionstring- Short tagline
thumbnail_urlstring- Thumbnail image URL
price_paisenumber- Price in paise
price_usd_centsnumber- Price in USD cents
publishedboolean- Publish immediately
PUT/api/v1/courses

Update a course

Request Body (JSON)

iduuidrequired- Course ID
...any- Any course fields to update
DELETE/api/v1/courses?id=<uuid>

Delete a course

Query Parameters

iduuidrequired- Course ID

Bundles

GET/api/v1/bundles

List all bundles (includes items)

Query Parameters

publishedboolean- Filter by published status
POST/api/v1/bundles

Create a new bundle

Request Body (JSON)

titlestringrequired- Bundle title
slugstring- URL slug
descriptionstring- Full description
short_descriptionstring- Short tagline
cover_image_urlstring- Cover image URL
price_paisenumber- Price in paise
price_usd_centsnumber- Price in USD cents
discount_percentnumber- Discount percentage (0-100)
publishedboolean- Publish immediately
PUT/api/v1/bundles

Update a bundle

Request Body (JSON)

iduuidrequired- Bundle ID
DELETE/api/v1/bundles?id=<uuid>

Delete a bundle

Query Parameters

iduuidrequired- Bundle ID

Roadmaps

GET/api/v1/roadmaps

List all roadmaps (includes steps)

Query Parameters

publishedboolean- Filter by published status
POST/api/v1/roadmaps

Create a roadmap with steps

Request Body (JSON)

titlestringrequired- Roadmap title
slugstring- URL slug
descriptionstring- Full description
prioritynumber- Display order (lower = higher)
publishedboolean- Publish immediately
stepsarray- Array of step objects

Example

{
  "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": "🐧"
    }
  ]
}
PUT/api/v1/roadmaps

Update a roadmap (pass steps array to replace all steps)

Request Body (JSON)

iduuidrequired- Roadmap ID
stepsarray- Replaces all existing steps
DELETE/api/v1/roadmaps?id=<uuid>

Delete a roadmap (cascades to steps)

Query Parameters

iduuidrequired- Roadmap ID

Blog

GET/api/v1/blog

List all blog posts

Query Parameters

publishedboolean- Filter by published status
categorystring- Filter by category slug
POST/api/v1/blog

Create a blog post

Request Body (JSON)

titlestringrequired- Post title
slugstring- URL slug
excerptstring- Short excerpt
contentjson[]- Array of content blocks (text, code, image, video)
cover_image_urlstring- Cover image URL
category_iduuid- Blog category ID
publishedboolean- Publish immediately

Example

{
  "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
}
PUT/api/v1/blog

Update a blog post

Request Body (JSON)

iduuidrequired- Post ID
DELETE/api/v1/blog?id=<uuid>

Delete a blog post

Query Parameters

iduuidrequired- Post ID

Quick Reference

ResourceListCreateUpdateDelete
booksGET /api/v1/booksPOST /api/v1/booksPUT /api/v1/booksDEL /api/v1/books?id=
coursesGET /api/v1/coursesPOST /api/v1/coursesPUT /api/v1/coursesDEL /api/v1/courses?id=
bundlesGET /api/v1/bundlesPOST /api/v1/bundlesPUT /api/v1/bundlesDEL /api/v1/bundles?id=
roadmapsGET /api/v1/roadmapsPOST /api/v1/roadmapsPUT /api/v1/roadmapsDEL /api/v1/roadmaps?id=
blogGET /api/v1/blogPOST /api/v1/blogPUT /api/v1/blogDEL /api/v1/blog?id=
HomeCoursesBooksBlogMe