Developers

Kothakoli API

A JSON REST API for building apps on Kothakoli: read poems, stories and books, publish writing, follow writers, send gifts, join the forum and receive push notifications.

Base URLhttps://www.kothakoli.in/api/v1

Authentication

Get a token from POST /auth/login, /auth/register or /auth/google, then send it on every request:

Authorization: Bearer 12|Xb3…

Badges show what each endpoint needs: Public Token optional (adds personal fields like my_vote) Token required. Invalid tokens return 401.

Language

Labels and messages follow ?locale=bn or the header X-Locale: bn (default: the user's language). Post feeds can be filtered with ?lang=bn or ?lang=all.

Requests

Send Accept: application/json. Bodies may be JSON or form data; endpoints with files need multipart/form-data.

Pagination

{ "data": [ … ],
  "meta": { "page": 1, "last_page": 8,
            "per_page": 12, "total": 91 } }

Pass ?page=N.

Errors & limits

422 { "message": "The title field is required.",
      "errors": { "title": ["…"] } }

401 unauthenticated · 403 not allowed · 404 not found · 422 validation · 429 too many requests. General limit: 120 requests/minute per client; stricter limits are noted per endpoint.

App configuration

Everything the app needs to render itself. All values are edited in the website admin panel, so read them at launch instead of hard-coding.

GET /config Token optional #

App settings, theme, home layout, languages, categories, gifts, wallet, ads and push status.

If app.maintenance is not null show it and block the app. If the installed version is lower than app.min_version, force an update (app.update_url).

Example response
{
    "app": {
        "name": "Kothakoli",
        "logo": "https://…/logo.png",
        "min_version": "1.0.0",
        "maintenance": null,
        "support_email": "hellokothakoli@gmail.com"
    },
    "theme": {
        "primary": "#166534",
        "accent": "#ea580c",
        "background": "#fbf7ee",
        "radius": 16
    },
    "home_sections": [
        "banner",
        "featured",
        "categories",
        "books",
        "ad_banner",
        "spotlight",
        "classics",
        "feed"
    ],
    "tabs": [
        "home",
        "explore",
        "write",
        "notifications",
        "profile"
    ],
    "languages": [
        {
            "code": "bn",
            "native_name": "বাংলা",
            "is_rtl": false
        }
    ],
    "reactions": [
        "like",
        "love",
        "wow",
        "sad",
        "inspire"
    ],
    "gift_items": [
        {
            "id": 1,
            "name": "Rose",
            "icon": "flower1",
            "coins": 10
        }
    ],
    "wallet": {
        "currency": "₹",
        "packages": [
            100,
            250,
            500
        ]
    },
    "ads": {
        "enabled": true,
        "test_mode": true,
        "units": {
            "banner": "ca-app-pub-…"
        },
        "placements": {
            "home_banner_after_books": true
        },
        "native_every": 6
    },
    "push": {
        "enabled": true
    }
}
cURL
curl -X GET "https://www.kothakoli.in/api/v1/config" \
  -H "Accept: application/json"
Try it live
GET /pages Public #

Published static pages (About, Privacy Policy, Terms…).

Example response
{
    "data": [
        {
            "slug": "privacy-policy",
            "title": "গোপনীয়তা নীতি",
            "in_footer": true,
            "url": "https://kothakoli.in/page/privacy-policy"
        }
    ]
}
cURL
curl -X GET "https://www.kothakoli.in/api/v1/pages" \
  -H "Accept: application/json"
Try it live
GET /pages/{slug} Public #

One static page as HTML and Markdown.

ParameterInTypeDescription
slug*pathstringPage slug, e.g. privacy-policy.
Example response
{
    "slug": "privacy-policy",
    "title": "গোপনীয়তা নীতি",
    "html": "<p>…</p>",
    "markdown": "…",
    "updated_at": "2026-10-09T12:00:00+05:30"
}
cURL
curl -X GET "https://www.kothakoli.in/api/v1/pages/{slug}" \
  -H "Accept: application/json"
Try it live

Authentication

Log in to receive a bearer token, then send it on every request as Authorization: Bearer <token>. Tokens do not expire; call logout to revoke one.

POST /auth/register Public #

Create an account. New members receive the sign-up coin bonus.

ParameterInTypeDescription
name*bodystringDisplay name (max 80).
username*bodystring3–30 letters, numbers, dash or underscore. Unique.
email*bodystringUnique email.
password*bodystringAt least 8 characters.
devicebodystringLabel for the token, e.g. "android".

Returns 201. Limited to 5 requests per minute.

Example response
{
    "token": "12|Xb3…",
    "user": {
        "id": 55,
        "name": "Amit",
        "username": "amit",
        "email": "amit@example.com",
        "coins": 50,
        "unread_notifications": 0
    },
    "message": "Welcome to Kothakoli! You received 50 bonus coins."
}
cURL
curl -X POST "https://www.kothakoli.in/api/v1/auth/register" \
  -H "Accept: application/json" \
  -F "name=…" \
  -F "username=…" \
  -F "email=…" \
  -F "password=…" \
  -F "device=…"
POST /auth/login Public #

Log in with email or username.

ParameterInTypeDescription
login*bodystringEmail or username.
password*bodystring
devicebodystringToken label.

Limited to 10 attempts per minute. Wrong credentials return 422.

Example response
{
    "token": "12|Xb3…",
    "user": {
        "id": 55,
        "name": "Amit",
        "username": "amit",
        "coins": 50,
        "earned_coins": 0,
        "locale": "bn",
        "role": "user"
    }
}
cURL
curl -X POST "https://www.kothakoli.in/api/v1/auth/login" \
  -H "Accept: application/json" \
  -F "login=…" \
  -F "password=…" \
  -F "device=…"
POST /auth/google Public #

Sign in or sign up with Google.

ParameterInTypeDescription
id_token*bodystringID token from Google Sign-In / Credential Manager (use our Web client ID as serverClientId).
devicebodystringToken label.

Existing accounts with the same verified email are linked, not duplicated. 201 when a new account was created.

Example response
{
    "token": "13|Pq9…",
    "user": {
        "id": 56,
        "username": "amit"
    },
    "is_new": true
}
cURL
curl -X POST "https://www.kothakoli.in/api/v1/auth/google" \
  -H "Accept: application/json" \
  -F "id_token=…" \
  -F "device=…"
GET /auth/me Token required #

The signed-in user, with private fields.

Example response
{
    "user": {
        "id": 55,
        "name": "Amit",
        "email": "amit@example.com",
        "coins": 120,
        "earned_coins": 3.5,
        "unread_notifications": 2,
        "locale": "bn"
    }
}
cURL
curl -X GET "https://www.kothakoli.in/api/v1/auth/me" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $TOKEN"
POST /auth/logout Token required #

Revoke the current token.

ParameterInTypeDescription
push_tokenbodystringThis device's FCM token, so it stops receiving this user's notifications.
Example response
{
    "ok": true
}
cURL
curl -X POST "https://www.kothakoli.in/api/v1/auth/logout" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $TOKEN" \
  -F "push_token=…"
POST /push/token Token optional #

Register this device for push notifications (Firebase Cloud Messaging).

ParameterInTypeDescription
token*bodystringFCM registration token.

Call after login and whenever the token refreshes. Guests can register too (for broadcasts). Each notification carries data.url — a website link to open.

Example response
{
    "ok": true
}
cURL
curl -X POST "https://www.kothakoli.in/api/v1/push/token" \
  -H "Accept: application/json" \
  -F "token=…"

Home & discovery

Feeds and listings. All post lists are paginated.

GET /home Token optional #

Home screen sections in one call.

Example response
{
    "featured": [
        {
            "id": 101,
            "slug": "sonar-tori-a1b2c3",
            "title": "সোনার তরী",
            "excerpt": "গগনে গরজে মেঘ, ঘন বরষা…",
            "cover": null,
            "language": "bn",
            "tags": [
                "সোনার তরী",
                "রবীন্দ্রনাথ"
            ],
            "book": "সোনার তরী",
            "status": "published",
            "reading_minutes": 2,
            "views": 1520,
            "reactions_count": 84,
            "comments_count": 12,
            "shares_count": 9,
            "gift_coins": 40,
            "published_at": "2026-10-01T10:00:00+05:30",
            "url": "https://kothakoli.in/p/sonar-tori-a1b2c3",
            "author": {
                "id": 4,
                "name": "Rabindranath Tagore",
                "username": "rabindranath-tagore",
                "avatar": "https://…",
                "is_verified": true,
                "is_classic": true,
                "followers_count": 320
            },
            "category": {
                "id": 1,
                "slug": "poetry",
                "name": "কবিতা",
                "icon": "feather",
                "color": "#166534"
            }
        }
    ],
    "spotlight": {
        "id": 101,
        "slug": "sonar-tori-a1b2c3",
        "title": "সোনার তরী",
        "excerpt": "গগনে গরজে মেঘ, ঘন বরষা…",
        "cover": null,
        "language": "bn",
        "tags": [
            "সোনার তরী",
            "রবীন্দ্রনাথ"
        ],
        "book": "সোনার তরী",
        "status": "published",
        "reading_minutes": 2,
        "views": 1520,
        "reactions_count": 84,
        "comments_count": 12,
        "shares_count": 9,
        "gift_coins": 40,
        "published_at": "2026-10-01T10:00:00+05:30",
        "url": "https://kothakoli.in/p/sonar-tori-a1b2c3",
        "author": {
            "id": 4,
            "name": "Rabindranath Tagore",
            "username": "rabindranath-tagore",
            "avatar": "https://…",
            "is_verified": true,
            "is_classic": true,
            "followers_count": 320
        },
        "category": {
            "id": 1,
            "slug": "poetry",
            "name": "কবিতা",
            "icon": "feather",
            "color": "#166534"
        }
    },
    "classics": [
        {
            "id": 4,
            "name": "Rabindranath Tagore",
            "username": "rabindranath-tagore",
            "avatar": "https://…",
            "is_verified": true,
            "is_classic": true,
            "followers_count": 320,
            "posts_count": 1025
        }
    ],
    "top_writers": [
        {
            "id": 4,
            "name": "Rabindranath Tagore",
            "username": "rabindranath-tagore",
            "avatar": "https://…",
            "is_verified": true,
            "is_classic": true,
            "followers_count": 320
        }
    ],
    "categories": [
        {
            "slug": "poetry",
            "name": "কবিতা",
            "posts_count": 1800
        }
    ],
    "books": [
        {
            "name": "গীতাঞ্জলি",
            "works": 157,
            "hue": 213
        }
    ],
    "stats": {
        "writers": 23,
        "works": 2885,
        "reads": 52000,
        "gifts": 900
    }
}
cURL
curl -X GET "https://www.kothakoli.in/api/v1/home" \
  -H "Accept: application/json"
Try it live
GET /feed Token optional #

Post feed.

ParameterInTypeDescription
tabquerystringlatest (default) | trending | following | featured. "following" needs a token.
pagequeryintegerPage number (default 1).
per_pagequeryintegerUp to 30 (default 12).
Example response
{
    "data": [
        {
            "id": 101,
            "slug": "sonar-tori-a1b2c3",
            "title": "সোনার তরী",
            "excerpt": "গগনে গরজে মেঘ, ঘন বরষা…",
            "cover": null,
            "language": "bn",
            "tags": [
                "সোনার তরী",
                "রবীন্দ্রনাথ"
            ],
            "book": "সোনার তরী",
            "status": "published",
            "reading_minutes": 2,
            "views": 1520,
            "reactions_count": 84,
            "comments_count": 12,
            "shares_count": 9,
            "gift_coins": 40,
            "published_at": "2026-10-01T10:00:00+05:30",
            "url": "https://kothakoli.in/p/sonar-tori-a1b2c3",
            "author": {
                "id": 4,
                "name": "Rabindranath Tagore",
                "username": "rabindranath-tagore",
                "avatar": "https://…",
                "is_verified": true,
                "is_classic": true,
                "followers_count": 320
            },
            "category": {
                "id": 1,
                "slug": "poetry",
                "name": "কবিতা",
                "icon": "feather",
                "color": "#166534"
            }
        }
    ],
    "meta": {
        "page": 1,
        "last_page": 8,
        "per_page": 12,
        "total": 91
    }
}
cURL
curl -X GET "https://www.kothakoli.in/api/v1/feed" \
  -H "Accept: application/json"
Try it live
GET /categories Public #

Active categories with post counts.

Example response
{
    "data": [
        {
            "id": 1,
            "slug": "poetry",
            "name": "কবিতা",
            "icon": "feather",
            "color": "#166534",
            "posts_count": 1800
        }
    ]
}
cURL
curl -X GET "https://www.kothakoli.in/api/v1/categories" \
  -H "Accept: application/json"
Try it live
GET /categories/{slug} Public #

Posts in a category.

ParameterInTypeDescription
slug*pathstringCategory slug.
sortquerystringlatest (default) | popular
pagequeryintegerPage number (default 1).
Example response
{
    "category": {
        "slug": "poetry",
        "name": "কবিতা"
    },
    "data": [
        {
            "id": 101,
            "slug": "sonar-tori-a1b2c3",
            "title": "সোনার তরী",
            "excerpt": "গগনে গরজে মেঘ, ঘন বরষা…",
            "cover": null,
            "language": "bn",
            "tags": [
                "সোনার তরী",
                "রবীন্দ্রনাথ"
            ],
            "book": "সোনার তরী",
            "status": "published",
            "reading_minutes": 2,
            "views": 1520,
            "reactions_count": 84,
            "comments_count": 12,
            "shares_count": 9,
            "gift_coins": 40,
            "published_at": "2026-10-01T10:00:00+05:30",
            "url": "https://kothakoli.in/p/sonar-tori-a1b2c3",
            "author": {
                "id": 4,
                "name": "Rabindranath Tagore",
                "username": "rabindranath-tagore",
                "avatar": "https://…",
                "is_verified": true,
                "is_classic": true,
                "followers_count": 320
            },
            "category": {
                "id": 1,
                "slug": "poetry",
                "name": "কবিতা",
                "icon": "feather",
                "color": "#166534"
            }
        }
    ],
    "meta": {
        "page": 1,
        "last_page": 8,
        "per_page": 12,
        "total": 91
    }
}
cURL
curl -X GET "https://www.kothakoli.in/api/v1/categories/{slug}" \
  -H "Accept: application/json"
Try it live
GET /search Token optional #

Search posts and writers.

ParameterInTypeDescription
q*querystringSearch text (title, tags, body, writer names).
pagequeryintegerPage number (default 1).

"users" is only filled on page 1.

Example response
{
    "users": [
        {
            "id": 4,
            "name": "Rabindranath Tagore",
            "username": "rabindranath-tagore",
            "avatar": "https://…",
            "is_verified": true,
            "is_classic": true,
            "followers_count": 320
        }
    ],
    "data": [
        {
            "id": 101,
            "slug": "sonar-tori-a1b2c3",
            "title": "সোনার তরী",
            "excerpt": "গগনে গরজে মেঘ, ঘন বরষা…",
            "cover": null,
            "language": "bn",
            "tags": [
                "সোনার তরী",
                "রবীন্দ্রনাথ"
            ],
            "book": "সোনার তরী",
            "status": "published",
            "reading_minutes": 2,
            "views": 1520,
            "reactions_count": 84,
            "comments_count": 12,
            "shares_count": 9,
            "gift_coins": 40,
            "published_at": "2026-10-01T10:00:00+05:30",
            "url": "https://kothakoli.in/p/sonar-tori-a1b2c3",
            "author": {
                "id": 4,
                "name": "Rabindranath Tagore",
                "username": "rabindranath-tagore",
                "avatar": "https://…",
                "is_verified": true,
                "is_classic": true,
                "followers_count": 320
            },
            "category": {
                "id": 1,
                "slug": "poetry",
                "name": "কবিতা",
                "icon": "feather",
                "color": "#166534"
            }
        }
    ],
    "meta": {
        "page": 1,
        "last_page": 8,
        "per_page": 12,
        "total": 91
    }
}
cURL
curl -X GET "https://www.kothakoli.in/api/v1/search" \
  -H "Accept: application/json"
Try it live
GET /tags/{tag} Public #

Posts with a tag.

ParameterInTypeDescription
tag*pathstringTag text (URL-encoded).
pagequeryintegerPage number (default 1).
Example response
{
    "data": [
        {
            "id": 101,
            "slug": "sonar-tori-a1b2c3",
            "title": "সোনার তরী",
            "excerpt": "গগনে গরজে মেঘ, ঘন বরষা…",
            "cover": null,
            "language": "bn",
            "tags": [
                "সোনার তরী",
                "রবীন্দ্রনাথ"
            ],
            "book": "সোনার তরী",
            "status": "published",
            "reading_minutes": 2,
            "views": 1520,
            "reactions_count": 84,
            "comments_count": 12,
            "shares_count": 9,
            "gift_coins": 40,
            "published_at": "2026-10-01T10:00:00+05:30",
            "url": "https://kothakoli.in/p/sonar-tori-a1b2c3",
            "author": {
                "id": 4,
                "name": "Rabindranath Tagore",
                "username": "rabindranath-tagore",
                "avatar": "https://…",
                "is_verified": true,
                "is_classic": true,
                "followers_count": 320
            },
            "category": {
                "id": 1,
                "slug": "poetry",
                "name": "কবিতা",
                "icon": "feather",
                "color": "#166534"
            }
        }
    ],
    "meta": {
        "page": 1,
        "last_page": 8,
        "per_page": 12,
        "total": 91
    }
}
cURL
curl -X GET "https://www.kothakoli.in/api/v1/tags/{tag}" \
  -H "Accept: application/json"
Try it live
GET /leaderboard Public #

Rankings.

ParameterInTypeDescription
periodquerystringweek | month (default) | all
Example response
{
    "top_writers": [
        {
            "id": 4,
            "name": "Rabindranath Tagore",
            "username": "rabindranath-tagore",
            "avatar": "https://…",
            "is_verified": true,
            "is_classic": true,
            "followers_count": 320,
            "score": 4200
        }
    ],
    "top_earners": [],
    "top_gifters": [],
    "top_posts": [
        {
            "id": 101,
            "slug": "sonar-tori-a1b2c3",
            "title": "সোনার তরী",
            "excerpt": "গগনে গরজে মেঘ, ঘন বরষা…",
            "cover": null,
            "language": "bn",
            "tags": [
                "সোনার তরী",
                "রবীন্দ্রনাথ"
            ],
            "book": "সোনার তরী",
            "status": "published",
            "reading_minutes": 2,
            "views": 1520,
            "reactions_count": 84,
            "comments_count": 12,
            "shares_count": 9,
            "gift_coins": 40,
            "published_at": "2026-10-01T10:00:00+05:30",
            "url": "https://kothakoli.in/p/sonar-tori-a1b2c3",
            "author": {
                "id": 4,
                "name": "Rabindranath Tagore",
                "username": "rabindranath-tagore",
                "avatar": "https://…",
                "is_verified": true,
                "is_classic": true,
                "followers_count": 320
            },
            "category": {
                "id": 1,
                "slug": "poetry",
                "name": "কবিতা",
                "icon": "feather",
                "color": "#166534"
            }
        }
    ],
    "most_followed": [
        {
            "id": 4,
            "name": "Rabindranath Tagore",
            "username": "rabindranath-tagore",
            "avatar": "https://…",
            "is_verified": true,
            "is_classic": true,
            "followers_count": 320
        }
    ]
}
cURL
curl -X GET "https://www.kothakoli.in/api/v1/leaderboard" \
  -H "Accept: application/json"
Try it live

Books

Poems and chapters grouped into books (কাব্যগ্রন্থ, novels, collections). Every post has a "book" field (or null).

GET /books Public #

All books with their author and number of works.

ParameterInTypeDescription
byquerystringUsername — only this writer's books.

"hue" (0–359) is a stable colour for drawing the cover.

Example response
{
    "data": [
        {
            "name": "গীতাঞ্জলি",
            "works": 157,
            "author": {
                "id": 4,
                "name": "Rabindranath Tagore",
                "username": "rabindranath-tagore",
                "avatar": "https://…",
                "is_verified": true,
                "is_classic": true,
                "followers_count": 320
            },
            "hue": 213
        }
    ]
}
cURL
curl -X GET "https://www.kothakoli.in/api/v1/books" \
  -H "Accept: application/json"
Try it live
GET /books/{name} Public #

All works of one book in reading order.

ParameterInTypeDescription
name*pathstringBook name (URL-encoded), e.g. %E0%A6%97%E0%A7%80…
byquerystringUsername, when several writers have a book with the same name.
pagequeryintegerPage number (default 1).

40 works per page.

Example response
{
    "book": {
        "name": "গীতাঞ্জলি",
        "author": {
            "id": 4,
            "name": "Rabindranath Tagore",
            "username": "rabindranath-tagore",
            "avatar": "https://…",
            "is_verified": true,
            "is_classic": true,
            "followers_count": 320
        },
        "hue": 213
    },
    "more_books": [
        {
            "name": "নৈবেদ্য",
            "works": 100
        }
    ],
    "data": [
        {
            "id": 101,
            "slug": "sonar-tori-a1b2c3",
            "title": "সোনার তরী",
            "excerpt": "গগনে গরজে মেঘ, ঘন বরষা…",
            "cover": null,
            "language": "bn",
            "tags": [
                "সোনার তরী",
                "রবীন্দ্রনাথ"
            ],
            "book": "সোনার তরী",
            "status": "published",
            "reading_minutes": 2,
            "views": 1520,
            "reactions_count": 84,
            "comments_count": 12,
            "shares_count": 9,
            "gift_coins": 40,
            "published_at": "2026-10-01T10:00:00+05:30",
            "url": "https://kothakoli.in/p/sonar-tori-a1b2c3",
            "author": {
                "id": 4,
                "name": "Rabindranath Tagore",
                "username": "rabindranath-tagore",
                "avatar": "https://…",
                "is_verified": true,
                "is_classic": true,
                "followers_count": 320
            },
            "category": {
                "id": 1,
                "slug": "poetry",
                "name": "কবিতা",
                "icon": "feather",
                "color": "#166534"
            }
        }
    ],
    "meta": {
        "page": 1,
        "last_page": 4,
        "per_page": 40,
        "total": 157
    }
}
cURL
curl -X GET "https://www.kothakoli.in/api/v1/books/{name}" \
  -H "Accept: application/json"
Try it live

Posts

Reading, writing and interacting with poems, stories and other works.

GET /posts/{slug} Token optional #

One post with everything the reading screen needs. Counts a unique view.

ParameterInTypeDescription
slug*pathstringPost slug.

Drafts are only visible to their author (404 otherwise). Use prev_chapter / next_chapter to move through a book.

Example response
{
    "post": {
        "id": 101,
        "slug": "sonar-tori-a1b2c3",
        "title": "সোনার তরী",
        "excerpt": "গগনে গরজে মেঘ, ঘন বরষা…",
        "cover": null,
        "language": "bn",
        "tags": [
            "সোনার তরী",
            "রবীন্দ্রনাথ"
        ],
        "book": "সোনার তরী",
        "status": "published",
        "reading_minutes": 2,
        "views": 1520,
        "reactions_count": 84,
        "comments_count": 12,
        "shares_count": 9,
        "gift_coins": 40,
        "published_at": "2026-10-01T10:00:00+05:30",
        "url": "https://kothakoli.in/p/sonar-tori-a1b2c3",
        "author": {
            "id": 4,
            "name": "Rabindranath Tagore",
            "username": "rabindranath-tagore",
            "avatar": "https://…",
            "is_verified": true,
            "is_classic": true,
            "followers_count": 320
        },
        "category": {
            "id": 1,
            "slug": "poetry",
            "name": "কবিতা",
            "icon": "feather",
            "color": "#166534"
        },
        "body": "গগনে গরজে মেঘ, ঘন বরষা।\nকূলে একা বসে আছি, নাহি ভরসা।",
        "allow_comments": true,
        "is_poem": true
    },
    "reactions": {
        "love": 40,
        "like": 30
    },
    "my_reaction": "love",
    "bookmarked": false,
    "following_author": false,
    "can_edit": false,
    "can_gift": false,
    "top_gifters": [],
    "more_by_author": [
        {
            "id": 101,
            "slug": "sonar-tori-a1b2c3",
            "title": "সোনার তরী",
            "excerpt": "গগনে গরজে মেঘ, ঘন বরষা…",
            "cover": null,
            "language": "bn",
            "tags": [
                "সোনার তরী",
                "রবীন্দ্রনাথ"
            ],
            "book": "সোনার তরী",
            "status": "published",
            "reading_minutes": 2,
            "views": 1520,
            "reactions_count": 84,
            "comments_count": 12,
            "shares_count": 9,
            "gift_coins": 40,
            "published_at": "2026-10-01T10:00:00+05:30",
            "url": "https://kothakoli.in/p/sonar-tori-a1b2c3",
            "author": {
                "id": 4,
                "name": "Rabindranath Tagore",
                "username": "rabindranath-tagore",
                "avatar": "https://…",
                "is_verified": true,
                "is_classic": true,
                "followers_count": 320
            },
            "category": {
                "id": 1,
                "slug": "poetry",
                "name": "কবিতা",
                "icon": "feather",
                "color": "#166534"
            }
        }
    ],
    "related": [
        {
            "id": 101,
            "slug": "sonar-tori-a1b2c3",
            "title": "সোনার তরী",
            "excerpt": "গগনে গরজে মেঘ, ঘন বরষা…",
            "cover": null,
            "language": "bn",
            "tags": [
                "সোনার তরী",
                "রবীন্দ্রনাথ"
            ],
            "book": "সোনার তরী",
            "status": "published",
            "reading_minutes": 2,
            "views": 1520,
            "reactions_count": 84,
            "comments_count": 12,
            "shares_count": 9,
            "gift_coins": 40,
            "published_at": "2026-10-01T10:00:00+05:30",
            "url": "https://kothakoli.in/p/sonar-tori-a1b2c3",
            "author": {
                "id": 4,
                "name": "Rabindranath Tagore",
                "username": "rabindranath-tagore",
                "avatar": "https://…",
                "is_verified": true,
                "is_classic": true,
                "followers_count": 320
            },
            "category": {
                "id": 1,
                "slug": "poetry",
                "name": "কবিতা",
                "icon": "feather",
                "color": "#166534"
            }
        }
    ],
    "prev_chapter": null,
    "next_chapter": {
        "slug": "nirudesh-yatra-x1",
        "title": "নিরুদ্দেশ যাত্রা"
    }
}
cURL
curl -X GET "https://www.kothakoli.in/api/v1/posts/{slug}" \
  -H "Accept: application/json"
Try it live
POST /posts Token required #

Publish or save a draft. Send as multipart/form-data.

ParameterInTypeDescription
title*bodystringMax 200.
body*bodystringText; line breaks are kept.
category_id*bodyintegerFrom /categories.
language*bodystringLanguage code from /config.
status*bodystringpublished | draft
tagsbodystringComma separated, up to 8.
bookbodystringBook / collection name.
excerptbodystringShort description (max 500).
allow_commentsbodyboolean1 or 0.
coverfileimageCover image, max 4 MB.

Returns 201. When a post is first published, followers are notified.

Example response
{
    "post": {
        "id": 101,
        "slug": "sonar-tori-a1b2c3",
        "title": "সোনার তরী",
        "excerpt": "গগনে গরজে মেঘ, ঘন বরষা…",
        "cover": null,
        "language": "bn",
        "tags": [
            "সোনার তরী",
            "রবীন্দ্রনাথ"
        ],
        "book": "সোনার তরী",
        "status": "published",
        "reading_minutes": 2,
        "views": 1520,
        "reactions_count": 84,
        "comments_count": 12,
        "shares_count": 9,
        "gift_coins": 40,
        "published_at": "2026-10-01T10:00:00+05:30",
        "url": "https://kothakoli.in/p/sonar-tori-a1b2c3",
        "author": {
            "id": 4,
            "name": "Rabindranath Tagore",
            "username": "rabindranath-tagore",
            "avatar": "https://…",
            "is_verified": true,
            "is_classic": true,
            "followers_count": 320
        },
        "category": {
            "id": 1,
            "slug": "poetry",
            "name": "কবিতা",
            "icon": "feather",
            "color": "#166534"
        }
    }
}
cURL
curl -X POST "https://www.kothakoli.in/api/v1/posts" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $TOKEN" \
  -F "title=…" \
  -F "body=…" \
  -F "category_id=…" \
  -F "language=…" \
  -F "status=…" \
  -F "tags=…" \
  -F "book=…" \
  -F "excerpt=…" \
  -F "allow_comments=…" \
  -F "cover=@image.jpg"
POST /posts/{slug} Token required #

Edit a post (author or admin). Same fields as create.

ParameterInTypeDescription
slug*pathstring
remove_coverbodyboolean1 to delete the cover.

Uses POST so that multipart uploads work.

Example response
{
    "post": {
        "id": 101,
        "slug": "sonar-tori-a1b2c3",
        "title": "সোনার তরী",
        "excerpt": "গগনে গরজে মেঘ, ঘন বরষা…",
        "cover": null,
        "language": "bn",
        "tags": [
            "সোনার তরী",
            "রবীন্দ্রনাথ"
        ],
        "book": "সোনার তরী",
        "status": "published",
        "reading_minutes": 2,
        "views": 1520,
        "reactions_count": 84,
        "comments_count": 12,
        "shares_count": 9,
        "gift_coins": 40,
        "published_at": "2026-10-01T10:00:00+05:30",
        "url": "https://kothakoli.in/p/sonar-tori-a1b2c3",
        "author": {
            "id": 4,
            "name": "Rabindranath Tagore",
            "username": "rabindranath-tagore",
            "avatar": "https://…",
            "is_verified": true,
            "is_classic": true,
            "followers_count": 320
        },
        "category": {
            "id": 1,
            "slug": "poetry",
            "name": "কবিতা",
            "icon": "feather",
            "color": "#166534"
        }
    }
}
cURL
curl -X POST "https://www.kothakoli.in/api/v1/posts/{slug}" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $TOKEN" \
  -F "remove_cover=…"
DELETE /posts/{slug} Token required #

Delete a post (author or admin).

ParameterInTypeDescription
slug*pathstring
Example response
{
    "ok": true
}
cURL
curl -X DELETE "https://www.kothakoli.in/api/v1/posts/{slug}" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $TOKEN"
POST /posts/{slug}/react Token required #

React to a post. Sending the same reaction again removes it.

ParameterInTypeDescription
type*bodystringlike | love | wow | sad | inspire
Example response
{
    "mine": "love",
    "summary": {
        "love": 41
    },
    "total": 85
}
cURL
curl -X POST "https://www.kothakoli.in/api/v1/posts/{slug}/react" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $TOKEN" \
  -F "type=…"
POST /posts/{slug}/bookmark Token required #

Toggle bookmark.

Example response
{
    "saved": true
}
cURL
curl -X POST "https://www.kothakoli.in/api/v1/posts/{slug}/bookmark" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $TOKEN"
POST /posts/{slug}/share Public #

Count a share; returns the link to share.

Example response
{
    "shares": 10,
    "url": "https://kothakoli.in/p/sonar-tori-a1b2c3"
}
cURL
curl -X POST "https://www.kothakoli.in/api/v1/posts/{slug}/share" \
  -H "Accept: application/json"
POST /posts/{slug}/gift Token required #

Send a gift to the writer, paid with coins.

ParameterInTypeDescription
gift_item_id*bodyintegerFrom /config → gift_items.
quantity*bodyinteger1–99.
messagebodystringMax 200.

422 when coins are insufficient, for your own post, or for classic authors.

Example response
{
    "message": "Gift sent! Thank you for supporting the writer.",
    "coins": 70,
    "gift_coins": 50
}
cURL
curl -X POST "https://www.kothakoli.in/api/v1/posts/{slug}/gift" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $TOKEN" \
  -F "gift_item_id=…" \
  -F "quantity=…" \
  -F "message=…"
GET /posts/{slug}/comments Token optional #

Comments (newest first) with one level of replies.

ParameterInTypeDescription
pagequeryintegerPage number (default 1).
Example response
{
    "data": [
        {
            "id": 9,
            "body": "অসাধারণ!",
            "likes_count": 3,
            "liked": false,
            "parent_id": null,
            "created_at": "2026-10-02T09:00:00+05:30",
            "user": {
                "id": 4,
                "name": "Rabindranath Tagore",
                "username": "rabindranath-tagore",
                "avatar": "https://…",
                "is_verified": true,
                "is_classic": true,
                "followers_count": 320
            },
            "replies": []
        }
    ],
    "meta": {
        "page": 1,
        "last_page": 8,
        "per_page": 12,
        "total": 91
    }
}
cURL
curl -X GET "https://www.kothakoli.in/api/v1/posts/{slug}/comments" \
  -H "Accept: application/json"
Try it live
POST /posts/{slug}/comments Token required #

Comment or reply.

ParameterInTypeDescription
body*bodystringMax 3000.
parent_idbodyintegerComment id to reply to.

403 if comments are turned off for the post.

Example response
{
    "comment": {
        "id": 10,
        "body": "ধন্যবাদ"
    }
}
cURL
curl -X POST "https://www.kothakoli.in/api/v1/posts/{slug}/comments" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $TOKEN" \
  -F "body=…" \
  -F "parent_id=…"
DELETE /comments/{id} Token required #

Delete a comment (its author, the post author, or an admin).

Example response
{
    "ok": true
}
cURL
curl -X DELETE "https://www.kothakoli.in/api/v1/comments/{id}" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $TOKEN"
POST /comments/{id}/like Token required #

Toggle like on a comment.

Example response
{
    "liked": true,
    "likes": 4
}
cURL
curl -X POST "https://www.kothakoli.in/api/v1/comments/{id}/like" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $TOKEN"

Writers & profile

Public profiles, following, and the signed-in user's own data.

GET /users/{username} Token optional #

A writer's profile and stats.

Example response
{
    "user": {
        "id": 4,
        "name": "Rabindranath Tagore",
        "username": "rabindranath-tagore",
        "avatar": "https://…",
        "is_verified": true,
        "is_classic": true,
        "followers_count": 320,
        "bio": "…",
        "website": null,
        "cover": null
    },
    "stats": {
        "posts": 1025,
        "followers": 320,
        "following": 0,
        "views": 40000,
        "reactions": 3000,
        "gifts": 0
    },
    "books": [
        {
            "name": "গীতাঞ্জলি",
            "works": 157
        }
    ],
    "is_following": false,
    "is_me": false
}
cURL
curl -X GET "https://www.kothakoli.in/api/v1/users/{username}" \
  -H "Accept: application/json"
Try it live
GET /users/{username}/posts Token optional #

A writer's posts.

ParameterInTypeDescription
tabquerystring"drafts" — your own drafts (token required).
pagequeryintegerPage number (default 1).
Example response
{
    "data": [
        {
            "id": 101,
            "slug": "sonar-tori-a1b2c3",
            "title": "সোনার তরী",
            "excerpt": "গগনে গরজে মেঘ, ঘন বরষা…",
            "cover": null,
            "language": "bn",
            "tags": [
                "সোনার তরী",
                "রবীন্দ্রনাথ"
            ],
            "book": "সোনার তরী",
            "status": "published",
            "reading_minutes": 2,
            "views": 1520,
            "reactions_count": 84,
            "comments_count": 12,
            "shares_count": 9,
            "gift_coins": 40,
            "published_at": "2026-10-01T10:00:00+05:30",
            "url": "https://kothakoli.in/p/sonar-tori-a1b2c3",
            "author": {
                "id": 4,
                "name": "Rabindranath Tagore",
                "username": "rabindranath-tagore",
                "avatar": "https://…",
                "is_verified": true,
                "is_classic": true,
                "followers_count": 320
            },
            "category": {
                "id": 1,
                "slug": "poetry",
                "name": "কবিতা",
                "icon": "feather",
                "color": "#166534"
            }
        }
    ],
    "meta": {
        "page": 1,
        "last_page": 8,
        "per_page": 12,
        "total": 91
    }
}
cURL
curl -X GET "https://www.kothakoli.in/api/v1/users/{username}/posts" \
  -H "Accept: application/json"
Try it live
GET /users/{username}/followers Public #

Followers (also /following).

ParameterInTypeDescription
pagequeryintegerPage number (default 1).
Example response
{
    "data": [
        {
            "id": 4,
            "name": "Rabindranath Tagore",
            "username": "rabindranath-tagore",
            "avatar": "https://…",
            "is_verified": true,
            "is_classic": true,
            "followers_count": 320
        }
    ],
    "meta": {
        "page": 1,
        "last_page": 8,
        "per_page": 12,
        "total": 91
    }
}
cURL
curl -X GET "https://www.kothakoli.in/api/v1/users/{username}/followers" \
  -H "Accept: application/json"
Try it live
POST /users/{username}/follow Token required #

Toggle follow.

Example response
{
    "following": true,
    "followers": 321
}
cURL
curl -X POST "https://www.kothakoli.in/api/v1/users/{username}/follow" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $TOKEN"
POST /me/profile Token required #

Update profile (multipart). Send only fields you change.

ParameterInTypeDescription
namebodystring
usernamebodystring
emailbodystring
biobodystringMax 500.
websitebodyurl
localebodystringLanguage code.
avatar_filefileimageMax 2 MB.
cover_filefileimageMax 4 MB.
Example response
{
    "user": {
        "id": 55
    },
    "message": "Profile updated."
}
cURL
curl -X POST "https://www.kothakoli.in/api/v1/me/profile" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $TOKEN" \
  -F "name=…" \
  -F "username=…" \
  -F "email=…" \
  -F "bio=…" \
  -F "website=…" \
  -F "locale=…" \
  -F "avatar_file=@image.jpg" \
  -F "cover_file=@image.jpg"
POST /me/password Token required #

Change password.

ParameterInTypeDescription
current_password*bodystring
password*bodystringAt least 8 characters.
Example response
{
    "message": "Password changed."
}
cURL
curl -X POST "https://www.kothakoli.in/api/v1/me/password" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $TOKEN" \
  -F "current_password=…" \
  -F "password=…"
GET /me/bookmarks Token required #

Bookmarked posts.

ParameterInTypeDescription
pagequeryintegerPage number (default 1).
Example response
{
    "data": [
        {
            "id": 101,
            "slug": "sonar-tori-a1b2c3",
            "title": "সোনার তরী",
            "excerpt": "গগনে গরজে মেঘ, ঘন বরষা…",
            "cover": null,
            "language": "bn",
            "tags": [
                "সোনার তরী",
                "রবীন্দ্রনাথ"
            ],
            "book": "সোনার তরী",
            "status": "published",
            "reading_minutes": 2,
            "views": 1520,
            "reactions_count": 84,
            "comments_count": 12,
            "shares_count": 9,
            "gift_coins": 40,
            "published_at": "2026-10-01T10:00:00+05:30",
            "url": "https://kothakoli.in/p/sonar-tori-a1b2c3",
            "author": {
                "id": 4,
                "name": "Rabindranath Tagore",
                "username": "rabindranath-tagore",
                "avatar": "https://…",
                "is_verified": true,
                "is_classic": true,
                "followers_count": 320
            },
            "category": {
                "id": 1,
                "slug": "poetry",
                "name": "কবিতা",
                "icon": "feather",
                "color": "#166534"
            }
        }
    ],
    "meta": {
        "page": 1,
        "last_page": 8,
        "per_page": 12,
        "total": 91
    }
}
cURL
curl -X GET "https://www.kothakoli.in/api/v1/me/bookmarks" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $TOKEN"
GET /me/notifications Token required #

Notifications, newest first.

ParameterInTypeDescription
pagequeryintegerPage number (default 1).

kind: reaction, comment, reply, gift, follow, new_post, forum_reply, forum_reply_reply. Forum notifications carry "url" instead of post_slug.

Example response
{
    "data": [
        {
            "id": "uuid",
            "read": false,
            "kind": "comment",
            "actor_name": "Amit",
            "actor_username": "amit",
            "actor_avatar": "https://…",
            "post_title": "সোনার তরী",
            "post_slug": "sonar-tori-a1b2c3",
            "url": null,
            "extra": null,
            "created_at": "2026-10-02T09:00:00+05:30"
        }
    ],
    "meta": {
        "page": 1,
        "last_page": 8,
        "per_page": 12,
        "total": 91
    }
}
cURL
curl -X GET "https://www.kothakoli.in/api/v1/me/notifications" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $TOKEN"
POST /me/notifications/read Token required #

Mark all notifications read.

Example response
{
    "ok": true
}
cURL
curl -X POST "https://www.kothakoli.in/api/v1/me/notifications/read" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $TOKEN"
GET /me/deletion Token required #

Account deletion status and what would be deleted.

status: pending | approved | rejected | cancelled. confirm_with is "password_or_username" for Google sign-up accounts.

Example response
{
    "can_request": true,
    "confirm_with": "password",
    "request": {
        "id": 3,
        "status": "pending",
        "reason": "…",
        "admin_note": null,
        "created_at": "…",
        "processed_at": null
    },
    "will_delete": {
        "posts": 12,
        "comments": 40,
        "forum_topics": 1,
        "forum_replies": 6,
        "followers": 30,
        "coins": 50,
        "earned_coins": 2.5,
        "pending_withdrawals": 0,
        "pending_purchases": 0
    }
}
cURL
curl -X GET "https://www.kothakoli.in/api/v1/me/deletion" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $TOKEN"
POST /me/deletion Token required #

Request deletion of the account and all its data. An admin must approve.

ParameterInTypeDescription
confirm*bodystringThe account password (Google sign-up accounts may send their username).
reasonbodystringMax 1000.

Returns 201. The account stays active until approved; after approval the token stops working (401).

Example response
{
    "message": "Your deletion request was sent…",
    "request": {
        "id": 3,
        "status": "pending"
    }
}
cURL
curl -X POST "https://www.kothakoli.in/api/v1/me/deletion" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $TOKEN" \
  -F "confirm=…" \
  -F "reason=…"
DELETE /me/deletion Token required #

Cancel a pending deletion request.

Example response
{
    "message": "Your deletion request was cancelled."
}
cURL
curl -X DELETE "https://www.kothakoli.in/api/v1/me/deletion" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $TOKEN"

Wallet & rewards

Coins (to send gifts) and earnings (withdrawable).

GET /wallet Token required #

Balances, recent purchases and withdrawals, and transaction history.

ParameterInTypeDescription
pagequeryintegerPage number (default 1).
Example response
{
    "coins": 120,
    "earned_coins": 3.5,
    "earned_from_gifts": 3,
    "earned_from_views": 0.5,
    "purchases": [],
    "withdrawals": [],
    "data": [
        {
            "id": 1,
            "wallet": "coins",
            "type": "bonus",
            "amount": 50,
            "description": "Welcome bonus",
            "created_at": "2026-10-01T10:00:00+05:30"
        }
    ],
    "meta": {
        "page": 1,
        "last_page": 1
    }
}
cURL
curl -X GET "https://www.kothakoli.in/api/v1/wallet" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $TOKEN"
POST /wallet/buy Token required #

Request a coin purchase (verified manually by admin).

ParameterInTypeDescription
coins*bodyintegerOne of /config → wallet.packages.
method*bodystringe.g. UPI.
reference*bodystringUPI / bank transaction reference (UTR).

Returns 201.

Example response
{
    "message": "Purchase request submitted…"
}
cURL
curl -X POST "https://www.kothakoli.in/api/v1/wallet/buy" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $TOKEN" \
  -F "coins=…" \
  -F "method=…" \
  -F "reference=…"
POST /wallet/withdraw Token required #

Request a withdrawal of earnings.

ParameterInTypeDescription
coins*bodynumberAt least /config → wallet.min_withdraw.
method*bodystring
account*bodystringUPI ID or bank account.
Example response
{
    "message": "Withdrawal requested."
}
cURL
curl -X POST "https://www.kothakoli.in/api/v1/wallet/withdraw" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $TOKEN" \
  -F "coins=…" \
  -F "method=…" \
  -F "account=…"
POST /wallet/convert Token required #

Move earnings into spendable coins.

ParameterInTypeDescription
coins*bodyinteger
Example response
{
    "message": "Converted.",
    "coins": 125
}
cURL
curl -X POST "https://www.kothakoli.in/api/v1/wallet/convert" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $TOKEN" \
  -F "coins=…"
POST /ads/reward Token required #

Credit coins after the user watched a rewarded ad.

403 when rewarded ads are off; 429 when the daily limit is reached.

Example response
{
    "message": "You earned 5 coins!",
    "coins": 125,
    "remaining": 4
}
cURL
curl -X POST "https://www.kothakoli.in/api/v1/ads/reward" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $TOKEN"

Forum

Discussion boards with topics, threaded replies and up/down votes.

GET /forum/boards Token optional #

Boards.

"can_post" is true only for signed-in users allowed to post there.

Example response
{
    "data": [
        {
            "id": 3,
            "slug": "poetry-talk",
            "name": "কবিতা-আলোচনা",
            "description": "…",
            "icon": "feather",
            "color": "#15803d",
            "admin_only": false,
            "topics_count": 12,
            "can_post": true
        }
    ]
}
cURL
curl -X GET "https://www.kothakoli.in/api/v1/forum/boards" \
  -H "Accept: application/json"
Try it live
GET /forum/topics Token optional #

Topics.

ParameterInTypeDescription
boardquerystringBoard slug.
sortquerystringhot (default) | new | top | active | unanswered
qquerystringSearch.
tagquerystringTag filter.
pagequeryintegerPage number (default 1).
Example response
{
    "data": [
        {
            "id": 7,
            "slug": "omitrakshar-chhondo-x1",
            "title": "অমিত্রাক্ষর ছন্দ কেন বিশেষ?",
            "excerpt": "…",
            "tags": [
                "ছন্দ"
            ],
            "score": 5,
            "upvotes": 6,
            "downvotes": 1,
            "my_vote": 1,
            "replies_count": 4,
            "views": 80,
            "is_pinned": false,
            "is_locked": false,
            "created_at": "…",
            "last_activity_at": "…",
            "url": "https://kothakoli.in/forum/t/…",
            "author": {
                "id": 4,
                "name": "Rabindranath Tagore",
                "username": "rabindranath-tagore",
                "avatar": "https://…",
                "is_verified": true,
                "is_classic": true,
                "followers_count": 320
            },
            "board": {
                "slug": "poetry-talk"
            }
        }
    ],
    "meta": {
        "page": 1,
        "last_page": 8,
        "per_page": 12,
        "total": 91
    }
}
cURL
curl -X GET "https://www.kothakoli.in/api/v1/forum/topics" \
  -H "Accept: application/json"
Try it live
GET /forum/topics/{slug} Token optional #

One topic (counts a view).

body_html supports **bold**, *italic*, > quotes and links.

Example response
{
    "topic": {
        "id": 7,
        "title": "…",
        "body": "…",
        "body_html": "<strong>…</strong>",
        "score": 5,
        "my_vote": 0
    },
    "can_edit": false,
    "can_reply": true
}
cURL
curl -X GET "https://www.kothakoli.in/api/v1/forum/topics/{slug}" \
  -H "Accept: application/json"
Try it live
GET /forum/topics/{slug}/replies Token optional #

Replies with one level of nested replies.

ParameterInTypeDescription
sortquerystringbest (default) | new | old
pagequeryintegerPage number (default 1).
Example response
{
    "data": [
        {
            "id": 31,
            "body": "…",
            "body_html": "…",
            "parent_id": null,
            "score": 3,
            "my_vote": 0,
            "is_best": true,
            "created_at": "…",
            "user": {
                "id": 4,
                "name": "Rabindranath Tagore",
                "username": "rabindranath-tagore",
                "avatar": "https://…",
                "is_verified": true,
                "is_classic": true,
                "followers_count": 320
            },
            "replies": []
        }
    ],
    "meta": {
        "page": 1,
        "last_page": 8,
        "per_page": 12,
        "total": 91
    }
}
cURL
curl -X GET "https://www.kothakoli.in/api/v1/forum/topics/{slug}/replies" \
  -H "Accept: application/json"
Try it live
POST /forum/topics Token required #

Start a topic.

ParameterInTypeDescription
board_id*bodyintegerBoard where can_post is true.
title*bodystring6–200 characters.
body*bodystring10–20000 characters.
tagsbodystringComma separated, up to 5.

Returns 201. The author's own upvote is added automatically. 6 per minute.

Example response
{
    "topic": {
        "id": 7,
        "slug": "…",
        "score": 1,
        "my_vote": 1
    }
}
cURL
curl -X POST "https://www.kothakoli.in/api/v1/forum/topics" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $TOKEN" \
  -F "board_id=…" \
  -F "title=…" \
  -F "body=…" \
  -F "tags=…"
POST /forum/topics/{slug} Token required #

Edit a topic (author or admin).

Example response
{
    "topic": {
        "id": 7
    }
}
cURL
curl -X POST "https://www.kothakoli.in/api/v1/forum/topics/{slug}" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $TOKEN"
DELETE /forum/topics/{slug} Token required #

Delete a topic and its replies (author or admin).

Example response
{
    "ok": true
}
cURL
curl -X DELETE "https://www.kothakoli.in/api/v1/forum/topics/{slug}" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $TOKEN"
POST /forum/topics/{slug}/replies Token required #

Reply to a topic or to a reply.

ParameterInTypeDescription
body*bodystring2–10000 characters.
parent_idbodyintegerReply id to answer.

Returns 201. 422 when the topic is locked. Notifies the topic author / parent reply author.

Example response
{
    "reply": {
        "id": 32,
        "parent_id": 31
    }
}
cURL
curl -X POST "https://www.kothakoli.in/api/v1/forum/topics/{slug}/replies" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $TOKEN" \
  -F "body=…" \
  -F "parent_id=…"
DELETE /forum/replies/{id} Token required #

Delete a reply and its sub-replies (author or admin).

Example response
{
    "ok": true
}
cURL
curl -X DELETE "https://www.kothakoli.in/api/v1/forum/replies/{id}" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $TOKEN"
POST /forum/replies/{id}/best Token required #

Toggle "most helpful" (topic author or admin).

Example response
{
    "is_best": true
}
cURL
curl -X POST "https://www.kothakoli.in/api/v1/forum/replies/{id}/best" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $TOKEN"
POST /forum/vote Token required #

Vote on a topic or reply. Same value again removes the vote.

ParameterInTypeDescription
type*bodystringtopic | reply
id*bodyinteger
value*bodyinteger1 (up) or -1 (down)

60 votes per minute.

Example response
{
    "score": 5,
    "upvotes": 6,
    "downvotes": 1,
    "mine": 1
}
cURL
curl -X POST "https://www.kothakoli.in/api/v1/forum/vote" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $TOKEN" \
  -F "type=…" \
  -F "id=…" \
  -F "value=…"

API version v1 · 58 endpoints · Questions? Contact us.